?? mypropertysheet3.cpp
字號:
// MyPropertySheet3.cpp : implementation file
//
#include "stdafx.h"
#include "../resource.h"
#include "Right_add_new.h"
#include "MyPropertySheet3.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyPropertySheet3
IMPLEMENT_DYNAMIC(CMyPropertySheet3, CPropertySheet)
CMyPropertySheet3::CMyPropertySheet3(CWnd* pWndParent)
: CPropertySheet(IDS_PROPSHT_CAPTION2, pWndParent)
{
// Add all of the property pages here. Note that
// the order that they appear in here will be
// the order they appear in on screen. By default,
// the first page of the set is the active one.
// One way to make a different property page the
// active one is to call SetActivePage().
AddPage(&m_Page1);
AddPage(&m_Page2);
}
CMyPropertySheet3::~CMyPropertySheet3()
{
}
BEGIN_MESSAGE_MAP(CMyPropertySheet3, CPropertySheet)
//{{AFX_MSG_MAP(CMyPropertySheet3)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL CMyPropertySheet3::OnInitDialog ()
{
BOOL bResult = CPropertySheet::OnInitDialog();
int ids [] = { IDCANCEL};//, ID_APPLY_NOW, IDHELP };
// Hide Apply and Help buttons
CWnd *pWnd = GetDlgItem (ID_APPLY_NOW);
pWnd->ShowWindow (FALSE);
pWnd = GetDlgItem (IDHELP);
pWnd->ShowWindow (FALSE);
pWnd = GetDlgItem (IDOK);
pWnd->ShowWindow(FALSE);
pWnd = GetDlgItem (IDCANCEL);
CString m_str;
m_str.Format(IDS_OUT_DLG);
pWnd->SetWindowText(m_str);
CRect rectBtn;
int nSpacing = 6; // space between two buttons...
for( int i =0; i < sizeof(ids)/sizeof(int); i++)
{
GetDlgItem (ids [i])->GetWindowRect (rectBtn);
ScreenToClient (&rectBtn);
int btnWidth = rectBtn.Width();
rectBtn.left = rectBtn.left + (btnWidth + nSpacing)* 2;
rectBtn.right = rectBtn.right + (btnWidth + nSpacing)* 2;
GetDlgItem (ids [i])->MoveWindow(rectBtn);
}
return bResult;
}
LRESULT CMyPropertySheet3::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if(wParam == SC_CLOSE)
{
if(CRight_add_new::m_show_zh_decstate)
{
CRight_add_new::m_show_zh_decstate->DestroyWindow();
delete (CRight_add_new::m_show_zh_decstate);
}
CRight_add_new::m_show_zh_decstate = NULL;
return 0;
}
return CPropertySheet::WindowProc(message, wParam, lParam);
}
/////////////////////////////////////////////////////////////////////////////
// CMyPropertySheet3 message handlers
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -