www.pudn.com > IE_Style_Wizard.rar > IEProperSheet.cpp


// IEProperSheet.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "IE_Style_Wizard.h" 
#include "IEProperSheet.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CIEProperSheet 
 
IMPLEMENT_DYNAMIC(CIEProperSheet, CPropertySheet) 
 
CIEProperSheet::CIEProperSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) 
	:CPropertySheet(nIDCaption, pParentWnd, iSelectPage) 
{ 
} 
 
CIEProperSheet::CIEProperSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) 
:CPropertySheet(pszCaption, pParentWnd, iSelectPage) 
{ 
	//往属性表中添加三个属性页 
	this->AddPage(&page1); 
	this->AddPage(&page2); 
	this->AddPage(&page3); 
	//启用向导模式 
	SetWizardMode(); 
	 
} 
 
CIEProperSheet::~CIEProperSheet() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CIEProperSheet, CPropertySheet) 
	//{{AFX_MSG_MAP(CIEProperSheet) 
	ON_WM_PAINT() 
	ON_WM_ERASEBKGND() 
	ON_WM_CTLCOLOR() 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CIEProperSheet message handlers 
 
BOOL CIEProperSheet::OnInitDialog()  
{ 
	BOOL bResult = CPropertySheet::OnInitDialog(); 
	CRect rectWnd; 
	GetWindowRect(rectWnd); 
/*	SetWindowPos(NULL, 0, 0, 
	rectWnd.Width(), 
	rectWnd.Height()+20, 
	SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE); 
	this->page1.GetOwner()->SetWindowText("第一步");*/ 
	//CenterWindow(); 
		return bResult; 
} 
 
void CIEProperSheet::OnPaint()  
{ 
	CPaintDC dc(this); // device context for painting 
	 
	// TODO: Add your message handler code here 
	 
	// Do not call CPropertySheet::OnPaint() for painting messages 
} 
 
BOOL CIEProperSheet::OnEraseBkgnd(CDC* pDC)  
{ 
	 
 
  
	return CPropertySheet::OnEraseBkgnd(pDC); 
 
} 
 
HBRUSH CIEProperSheet::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)  
{ 
	HBRUSH hbr = CPropertySheet::OnCtlColor(pDC, pWnd, nCtlColor); 
	//强行设置属性表的背景色为白色 
	hbr=CreateSolidBrush(RGB(255,255,255));;	 
	return hbr; 
}