1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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
}
|