⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wizardpage.cpp

📁 数据库部署程序
💻 CPP
字号:
// WizardPage.cpp实现文件

#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();

	//创建字体
	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)
	{	   
	//支持系统使用控件允许文本或背景颜色自定义,则屏蔽掉下面的默认颜色设置
	//当前系统使用自定义颜色的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;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -