www.pudn.com > TreePropSheetEx_Demo.zip > PageDates.cpp


// PageDates.cpp : implementation file 
// 
///////////////////////////////////////////////////////////////////////////// 
// 
// Copyright (C) 2004 by Yves Tkaczyk 
// (http://www.tkaczyk.net - yves@tkaczyk.net) 
// 
// The contents of this file are subject to the Artistic License (the "License"). 
// You may not use this file except in compliance with the License.  
// You may obtain a copy of the License at: 
// http://www.opensource.org/licenses/artistic-license.html 
// 
// Documentation: http://www.codeproject.com/property/treepropsheetex.asp 
// CVS tree:      http://sourceforge.net/projects/treepropsheetex 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#include "stdafx.h" 
#include "TreePropSheetEx_Demo.h" 
#include "PageDates.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CPageDates property page 
 
IMPLEMENT_DYNCREATE(CPageDates, CPropertyPage) 
 
CPageDates::CPageDates() : CPropertyPage(CPageDates::IDD) 
{ 
	//{{AFX_DATA_INIT(CPageDates) 
	//}}AFX_DATA_INIT 
 
  m_psp.dwFlags &= (~PSP_HASHELP); 
  m_psp.dwFlags |= PSP_USEHICON; 
  HICON hIconTab = AfxGetApp()->LoadIcon( IDI_DATE_TIME ); 
  m_psp.hIcon = hIconTab; 
} 
 
CPageDates::~CPageDates() 
{ 
} 
 
void CPageDates::DoDataExchange(CDataExchange* pDX) 
{ 
	CPropertyPage::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CPageDates) 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CPageDates, CPropertyPage) 
	//{{AFX_MSG_MAP(CPageDates) 
	ON_WM_CTLCOLOR() 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CPageDates message handlers 
 
HBRUSH CPageDates::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)  
{ 
	if( HasWhiteBackground() ) 
  { 
    pDC->SetBkMode(TRANSPARENT); 
    return ::GetSysColorBrush( COLOR_WINDOW ); 
  } 
 
	return  CPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor); 
}