ResizablePage.cpp

00001 // ResizablePage.cpp : implementation file
00002 //
00004 //
00005 // Copyright (C) 2000-2002 by Paolo Messina
00006 // (http://www.geocities.com/ppescher - [email protected])
00007 //
00008 // The contents of this file are subject to the Artistic License (the "License").
00009 // You may not use this file except in compliance with the License. 
00010 // You may obtain a copy of the License at:
00011 // http://www.opensource.org/licenses/artistic-license.html
00012 //
00013 // If you find this code useful, credits would be nice!
00014 //
00016 
00017 #include "stdafx.h"
00018 #include "ResizablePage.h"
00019 
00020 #ifdef _DEBUG
00021 #define new DEBUG_NEW
00022 #undef THIS_FILE
00023 static char THIS_FILE[] = __FILE__;
00024 #endif
00025 
00027 // CResizablePage
00028 
00029 IMPLEMENT_DYNCREATE(CResizablePage, CPropertyPage)
00030 
00031 CResizablePage::CResizablePage()
00032 {
00033 }
00034 
00035 CResizablePage::CResizablePage(UINT nIDTemplate, UINT nIDCaption)
00036         : CPropertyPage(nIDTemplate, nIDCaption)
00037 {
00038 }
00039 
00040 CResizablePage::CResizablePage(LPCTSTR lpszTemplateName, UINT nIDCaption)
00041         : CPropertyPage(lpszTemplateName, nIDCaption)
00042 {
00043 }
00044 
00045 CResizablePage::~CResizablePage()
00046 {
00047 }
00048 
00049 
00050 BEGIN_MESSAGE_MAP(CResizablePage, CPropertyPage)
00051         //{{AFX_MSG_MAP(CResizablePage)
00052         ON_WM_SIZE()
00053         ON_WM_ERASEBKGND()
00054         //}}AFX_MSG_MAP
00055 END_MESSAGE_MAP()
00056 
00057 
00059 // CResizablePage message handlers
00060 
00061 void CResizablePage::OnSize(UINT nType, int cx, int cy) 
00062 {
00063         CWnd::OnSize(nType, cx, cy);
00064         
00065         ArrangeLayout();
00066 }
00067 
00068 BOOL CResizablePage::OnEraseBkgnd(CDC* pDC) 
00069 {
00070         // Windows XP doesn't like clipping regions ...try this!
00071         EraseBackground(pDC);
00072         return TRUE;
00073 
00074 /*      ClipChildren(pDC);      // old-method (for safety)
00075         
00076         return CPropertyPage::OnEraseBkgnd(pDC);
00077 */
00078 }

Generated on Tue Dec 13 14:47:57 2005 for guliverkli by  doxygen 1.4.5