From 3f95d417d9e623ac0c74df8ef11d7a01846392dd Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Sep 2003 19:07:23 +0000 Subject: Initial Import --- Checklist/NightSecWizard.h | 151 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 Checklist/NightSecWizard.h (limited to 'Checklist/NightSecWizard.h') diff --git a/Checklist/NightSecWizard.h b/Checklist/NightSecWizard.h new file mode 100644 index 0000000..3f2d1f0 --- /dev/null +++ b/Checklist/NightSecWizard.h @@ -0,0 +1,151 @@ +// NightSecWizard.h: interface for the CNightSecWizard class. +// +////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_NIGHTSECWIZARD_H__E7FC7C13_8F86_11D3_BFBC_0020182B97FC__INCLUDED_) +#define AFX_NIGHTSECWIZARD_H__E7FC7C13_8F86_11D3_BFBC_0020182B97FC__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#include "Checklist.h" +#include "../common/Interfaces.h" +#include "../common/proppageholder.h" + +#include "contexthelp.h" + +#define countof(a) (sizeof(a) / sizeof(a[0])) + +#include +using std::multimap; +typedef multimap < CComponentHolder*, CPropPageHolder* > PropertyPageMap; + +#include + +class ATL_NO_VTABLE CNightSecWizard : + public CComObjectRootEx, + public IDispatchImpl, + public CPropertySheet, + public CContextHelp +{ + +// Construction +public: + CNightSecWizard() + : CPropertySheet(_T("Night Security Checklist"), NULL, 0) + { + SetWizardMode(); + SetHelp(true); + } + + virtual ~CNightSecWizard(); + +// For Base Classes +protected: + HRESULT LoadPropertyPages(CComponentHolder* pComponent); + IUnknown* GetIUnknown(bool bAddRef = false); + void SetSite(IUnknown* pSite = NULL); + void ClearSite(); + +// COM Interface support +DECLARE_PROTECT_FINAL_CONSTRUCT() + +BEGIN_COM_MAP(CNightSecWizard) + COM_INTERFACE_ENTRY(IDispatch) + COM_INTERFACE_ENTRY(INightSecSiteInfo) +END_COM_MAP() + +BEGIN_MSG_MAP(CNightSecWizard) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + CHAIN_MSG_MAP(CContextHelp) + CHAIN_MSG_MAP(CPropertySheet) +END_MSG_MAP() + +BEGIN_HELP_MAP(NS_HELP_FILE) + HELP_ID(ID_WIZBACK, 502) + HELP_ID(ID_WIZNEXT, 501) + HELP_ID(ID_WIZFINISH, 503) +END_HELP_MAP + + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + +// Data +public: + PropertyPageMap m_mapPages; +}; + + +class CAdvancedWizardT : public CNightSecWizard +{ +public: + CAdvancedWizardT() + { } + virtual ~CAdvancedWizardT() {} + +// Message Map +BEGIN_MSG_MAP(CAdvancedWizardT) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + CHAIN_MSG_MAP(CNightSecWizard) +END_MSG_MAP() + +// Message Handlers +protected: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + +// INightSecSiteInfo +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecSiteInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + +}; + +typedef CComObjectMember CAdvancedWizard; + + + +#include "ExtraPage.h" + +#include +using std::vector; +typedef vector ExtraPageArray; + + +class CNormalWizardT : public CNightSecWizard +{ +public: + CNormalWizardT() + { + m_bSiteSet = false; + } + virtual ~CNormalWizardT(); + +// Message Map +BEGIN_MSG_MAP(CNormalWizardT) + MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) + MESSAGE_HANDLER(WM_DESTROY, OnDestroy) + CHAIN_MSG_MAP(CNightSecWizard) +END_MSG_MAP() + +// Message Handlers +protected: + LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); + +// Operations +public: + void AddExtraPages(); + +// INightSecSiteInfo +public: + STDMETHOD(get_Info)(/*[in]*/ NightSecSiteInfo nsItem, /*[out, retval]*/ VARIANT* pvVal); + +protected: + ExtraPageArray m_aPages; + bool m_bSiteSet; +}; + +typedef CComObjectMember CNormalWizard; + +#endif // !defined(AFX_NIGHTSECWIZARD_H__E7FC7C13_8F86_11D3_BFBC_0020182B97FC__INCLUDED_) -- cgit v1.2.3