?? wizardpage.cpp
字號:
// WizardPage.cpp實(shí)現(xiàn)文件
#include "stdafx.h"
#include "WizardPage.h"
// CWizardPage 對話框
IMPLEMENT_DYNAMIC(CWizardPage, CDialog)
CWizardPage::CWizardPage(LPCTSTR lpszTemplateName, CWnd* pParent)
:CDialog(lpszTemplateName,pParent)
{
m_bCreated = FALSE;
m_bActive = FALSE;
m_nDialogID = 0;
m_pParent = NULL;
}
CWizardPage::CWizardPage(UINT nIDTemplate, CWnd* pParent)
:CDialog(nIDTemplate,pParent)
{
m_bCreated = FALSE;
m_bActive = FALSE;
m_nDialogID = nIDTemplate;
m_pParent = NULL;
}
CWizardPage::~CWizardPage()
{
}
void CWizardPage::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CWizardPage)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CWizardPage, CDialog)
//{{AFX_MSG_MAP(CWizardPage)
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
BOOL CWizardPage::OnInitDialog()
{
CDialog::OnInitDialog();
//創(chuàng)建字體
m_LargeFont.CreateFont(-16, 0, 0, 0,
FW_BOLD, FALSE, FALSE, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, _T("MS Sans Serif"));
DWORD style = GetStyle();
ASSERT((style & WS_CHILD) != 0);
ASSERT((style & WS_BORDER) == 0);
ASSERT((style & WS_DISABLED) != 0);
m_Brush.CreateSolidBrush(RGB(255, 255, 255));
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CWizardPage::OnCreatePage()
{
return TRUE;
}
void CWizardPage::OnDestroyPage()
{
}
HBRUSH CWizardPage::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
switch (nCtlColor)
{
//支持系統(tǒng)使用控件允許文本或背景顏色自定義,則屏蔽掉下面的默認(rèn)顏色設(shè)置
//當(dāng)前系統(tǒng)使用自定義顏色的CColorStatic
case CTLCOLOR_STATIC:
//pDC->SetTextColor(RGB(0, 0, 0));
pDC->SetBkColor(RGB(255,255,255));
break;
case CTLCOLOR_EDIT:
pDC->SetTextColor(RGB(0, 0, 0));
pDC->SetBkColor(RGB(255,255,255));
break;
case CTLCOLOR_LISTBOX:
pDC->SetTextColor(RGB(0, 0, 0));
pDC->SetBkColor(RGB(255,255,255));
break;
case CTLCOLOR_SCROLLBAR:
pDC->SetTextColor(RGB(0, 0, 0));
pDC->SetBkColor(RGB(255,255,255));
break;
case CTLCOLOR_BTN:
pDC->SetTextColor(RGB(0, 0, 0));
pDC->SetBkColor(RGB(255,255,255));
break;
case CTLCOLOR_DLG:
return m_Brush;
}
// TODO: Return a different brush if the default is not desired
return m_Brush;
}
void CWizardPage::OnCancel()
{
}
BOOL CWizardPage::OnKillingActive()
{
return TRUE;
}
void CWizardPage::OnSettingActive()
{
}
void CWizardPage::OnSettedActive()
{
}
BOOL CWizardPage::OnQueryCancel()
{
return TRUE;
}
// refer to CPropertyPage class members for a description of this function
// return -1 to prevent changing pages
// to move to a page other than the previous one, return the
// Dialog resource ID of the page to display
LRESULT CWizardPage::OnWizardBack()
{
return 0;
}
// refer to CPropertyPage class members for a description of this function
// return -1 to prevent changing pages
// to move to a page other than the next one, return the
// Dialog resource ID of the page to display
LRESULT CWizardPage::OnWizardNext()
{
return 0;
}
// refer to CPropertyPage class members for a description of this function
BOOL CWizardPage::OnWizardFinish()
{
return TRUE;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -