|
// EZPropertyPage.cpp : implementation file
//
#include "stdafx.h"
#include "EZPropertyPage.h"
#include "EZOptionsDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEZPropertyPage property page
IMPLEMENT_DYNCREATE(CEZPropertyPage, CPropertyPage)
CEZPropertyPage::CEZPropertyPage(UINT nIDResource) : CPropertyPage(nIDResource)
{
//{{AFX_DATA_INIT(CEZPropertyPage)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_nIDResource = nIDResource;
}
CEZPropertyPage::~CEZPropertyPage()
{
}
void CEZPropertyPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEZPropertyPage)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CEZPropertyPage, CPropertyPage)
//{{AFX_MSG_MAP(CEZPropertyPage)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEZPropertyPage message handlers
//////////////////
// CDialog class to get the size of a dialog.
// Assumes dialog is invisible (no WS_VISIBLE).
// From Sept 98 MSJ Paul DILascia
class CTempDlg : public CDialog {
public:
CRect m_rcDlg;
protected:
virtual BOOL OnInitDialog();
};
////////////////
// Initialize dialog: save size, then quit.
//
BOOL CTempDlg::OnInitDialog()
{
GetWindowRect(&m_rcDlg);
m_rcDlg -= m_rcDlg.TopLeft();
EndDialog(0);
return TRUE;
}
CSize CEZPropertyPage::GetDialogSize(UINT nIDTemplate,CWnd* pParentWnd)
{
CTempDlg dlg;
dlg.Create(nIDTemplate,pParentWnd);
return dlg.m_rcDlg.Size();
}
CSize CEZPropertyPage::GetPageSize()
{
return m_size;
}
BOOL CEZPropertyPage::Create(CWnd* pParentWnd)
{
// TODO: Add your specialized code here and/or call the base class
m_size = GetDialogSize(m_nIDResource,pParentWnd);
return CPropertyPage::Create(m_nIDResource,pParentWnd);
}
BOOL CEZPropertyPage::IsButtonEnabled(int iButton)
{
return ((CEZOptionsDlg*)GetParent())->IsButtonEnabled(iButton);
}
|
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
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.