|
// ResizablePage.cpp : implementation file
//
/////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2000-2001 by Paolo Messina
// (http://www.geocities.com/ppescher - ppescher@yahoo.com)
//
// 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
//
// If you find this code useful, credits would be nice!
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ResizablePage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CResizablePage
IMPLEMENT_DYNCREATE(CResizablePage, CPropertyPage)
inline void CResizablePage::Construct()
{
m_bInitDone = FALSE;
}
CResizablePage::CResizablePage()
{
Construct();
}
CResizablePage::CResizablePage(UINT nIDTemplate, UINT nIDCaption)
: CPropertyPage(nIDTemplate, nIDCaption)
{
Construct();
}
CResizablePage::CResizablePage(LPCTSTR lpszTemplateName, UINT nIDCaption)
: CPropertyPage(lpszTemplateName, nIDCaption)
{
Construct();
}
CResizablePage::~CResizablePage()
{
}
BEGIN_MESSAGE_MAP(CResizablePage, CPropertyPage)
//{{AFX_MSG_MAP(CResizablePage)
ON_WM_SIZE()
ON_WM_ERASEBKGND()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CResizablePage message handlers
BOOL CResizablePage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
/* // gets the initial size as the min track size
CRect rc;
GetWindowRect(&rc);
*/
m_bInitDone = TRUE;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CResizablePage::OnSize(UINT nType, int cx, int cy)
{
CWnd::OnSize(nType, cx, cy);
if (m_bInitDone)
ArrangeLayout();
}
BOOL CResizablePage::OnEraseBkgnd(CDC* pDC)
{
ClipChildren(pDC);
return CPropertyPage::OnEraseBkgnd(pDC);
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here