summaryrefslogtreecommitdiff
path: root/Checklist/AdvancedPage.h
blob: 08531ca6395acd835246ce0d6334c16d5af55b79 (plain)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//////////////////////////////////////////////////////////////////
// 
// AdvancedPage.h : header file
//
// Holds one Page for the Advanced Wizard
//
// Uses the Type, IDD, and Position passed to constructor
// to behave correctly in Wizard
//
//////////////////////////////////////////////////////////////////
 
 
#if !defined(AFX_AdvancedPage_H__F447FE42_1843_11D2_B2D4_0020182B97FC__INCLUDED_)
#define AFX_AdvancedPage_H__F447FE42_1843_11D2_B2D4_0020182B97FC__INCLUDED_



#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "NightSecWizard.h"
#include "resource.h"
#include "ContextHelp.h"
#include <atlctrls.h>
#include <atlprsht.h>
#include <atllstbx.h>

/////////////////////////////////////////////////////////////////////////////
// CAdvancedPage dialog

class CAdvancedPage 
	: public CPropertyPage,
	  public CContextHelp<CAdvancedPage>
{

// Construction
public:
	CAdvancedPage(CNightSecWizard* pParent, UINT nType, UINT nIDD, UINT nPos = WIZPAGE_MIDDLE);
	~CAdvancedPage();

	// Puts a Components PropPage on display
	void SetCurrentComponent();
	void SetCurrentPage();

	CDragListBoxEx	m_ctlDrag;
	CCheckListBox	m_ctlCheck;
//	CListBox	m_ctlCheck;
	CTabCtrl		m_ctlTabs;

BEGIN_MSG_MAP(CAdvancedPage)
	MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
	MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
	NOTIFY_CODE_HANDLER(PSN_SETACTIVE, OnSetActive)
	NOTIFY_CODE_HANDLER(PSN_WIZFINISH, OnWizFinish)
	NOTIFY_CODE_HANDLER(PSN_WIZBACK, OnWizBack)
	NOTIFY_CODE_HANDLER(PSN_WIZNEXT, OnWizNext)
	NOTIFY_CODE_HANDLER(PSN_HELP, OnHelp)
	COMMAND_HANDLER(IDC_COMPONENTS, LBN_SELCHANGE, OnComponentsSelChange)
	NOTIFY_HANDLER(IDC_PAGETABS, TCN_SELCHANGE, OnPageSelChange)
	REFLECT_NOTIFICATIONS()
	REFLECT_DRAGLIST()
	CHAIN_MSG_MAP(CContextHelp<CAdvancedPage>)
END_MSG_MAP()

BEGIN_HELP_MAP("nightsec.hlp")
	HELP_ID(IDC_COMPONENTS, 3502)
END_HELP_MAP

// Messages
public:
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
	LRESULT OnComponentsSelChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
	LRESULT OnPageSelChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnWizFinish(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnSetActive(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnWizBack(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnWizNext(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
	LRESULT OnHelp(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);

// Implementation
protected:

	////////////////////////////////////////////////////
	// Pointer to Wizard Parent
	// Needed for Setting Back and Next Buttons
	CNightSecWizard* m_pParentSheet; 

	// Position in the Wizard (WIZPAGE_FIRST, WIZPAGE_MIDDLE 
	// or WIZPAGE_LAST)
	const UINT m_nPos;	

	// Either COMPONENT_WIN or COMPONENT_DOS
	const UINT m_nType;	


	//////////////////////////////////////////////////////
	// Component Property Pages
	// Pointer to Current Property Page (or NULL if none)
	CPropPageHolder* m_pCurPropPage;  

	// Current Index of Property Page
	CComponentHolder* m_pCurComponent;

	// Rectangle for Property Page
	RECT m_rcPropPage;


	// Saves Each Components Position and Enabled Status
	HRESULT SaveChanges();

};


#endif // !defined(AFX_AdvancedPage_H__F447FE42_1843_11D2_B2D4_0020182B97FC__INCLUDED_)