summaryrefslogtreecommitdiff
path: root/Checklist/FirstPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Checklist/FirstPage.cpp')
-rw-r--r--Checklist/FirstPage.cpp76
1 files changed, 76 insertions, 0 deletions
diff --git a/Checklist/FirstPage.cpp b/Checklist/FirstPage.cpp
new file mode 100644
index 0000000..3bdba17
--- /dev/null
+++ b/Checklist/FirstPage.cpp
@@ -0,0 +1,76 @@
+// FirstPage.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "FirstPage.h"
+
+
+/////////////////////////////////////////////////////////////////////////////
+// CFirstPage property page
+
+CFirstPage::CFirstPage(CPropertySheet* pParent, UINT nPos /*= WIZPAGE_MIDDLE*/)
+ : CPropertyPage(CFirstPage::IDD),
+
+ m_nPos(nPos) // Position in the Wizard (WIZPAGE_FIRST, WIZPAGE_MIDDLE
+ // or WIZPAGE_LAST)
+
+{
+ ASSERT(pParent); // Have to have a valid parent
+ m_pParentSheet = pParent; // or we can't survive
+ SetHelp(true);
+}
+
+CFirstPage::~CFirstPage()
+{
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// CFirstPage message handlers
+
+LRESULT CFirstPage::OnAdvanced(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
+{
+ // Pass IDC_ADVANCED advanced to caller
+ // as a signal to start advanced wizard
+ m_pParentSheet->EndDialog(IDC_ADVANCED);
+
+ return 1;
+}
+
+LRESULT CFirstPage::OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
+{
+ WinHelp(NS_HELP_FILE, HELP_FINDER, 0);
+ return 1;
+}
+
+LRESULT CFirstPage::OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
+{
+ DWORD dwButtons;
+
+ // Depening on our Position in the Wizard
+ // Set the Buttons at the bottom on and off
+
+ switch(m_nPos){
+ case WIZPAGE_FIRST:
+ dwButtons = PSWIZB_NEXT;
+ break;
+ case WIZPAGE_LAST:
+ dwButtons = PSWIZB_BACK | PSWIZB_FINISH;
+ break;
+ default:
+ dwButtons = PSWIZB_BACK | PSWIZB_NEXT;
+ break;
+ }
+
+ m_pParentSheet->SetWizardButtons(dwButtons);
+
+ return 0;
+}
+
+LRESULT CFirstPage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+ // Set the Help ID for our Help File
+// m_nIDHelp = 200;
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}