// Page0.cpp : implementation file // #include "stdafx.h" #include "dicommwl.h" #include "Page0.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CPage0 property page IMPLEMENT_DYNCREATE(CPage0, CPropertyPage) CPage0::CPage0() : CPropertyPage(CPage0::IDD, IDS_PAGE0) { //{{AFX_DATA_INIT(CPage0) m_nTimerMax = 0; m_strStaticInstructions = _T(""); //}}AFX_DATA_INIT NO_PAGE_HELP(); m_pSheet = NULL; } CPage0::~CPage0() { } void CPage0::DoDataExchange(CDataExchange* pDX) { CPropertyPage::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPage0) DDX_Text(pDX, IDC_EDIT_TIMERMAX, m_nTimerMax); DDV_MinMaxUInt(pDX, m_nTimerMax, 1, 300); DDX_Text(pDX, IDC_STATIC_INSTRUCTIONS, m_strStaticInstructions); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CPage0, CPropertyPage) //{{AFX_MSG_MAP(CPage0) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CPage0 message handlers BOOL CPage0::OnInitDialog() { m_nTimerMax = CGlobals::m_nTimerMax; CPropertyPage::OnInitDialog(); m_strStaticInstructions.LoadString(IDS_PAGE0_INSTR); UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } LRESULT CPage0::OnWizardNext() { if (0==UpdateData(TRUE)) return -1; CGlobals::m_nTimerMax = m_nTimerMax; CGlobals::SaveRegKeys(); return CPropertyPage::OnWizardNext(); } BOOL CPage0::OnSetActive() { m_pSheet = (CMyPropertySheet *)GetParent(); m_pSheet->SetWizardButtons(PSWIZB_NEXT); return CPropertyPage::OnSetActive(); }