diff options
author | Stef Walter <stef@thewalter.net> | 2003-09-17 19:07:23 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2003-09-17 19:07:23 +0000 |
commit | 3f95d417d9e623ac0c74df8ef11d7a01846392dd (patch) | |
tree | 45ec73f2dc07eafd7f41a6f62a8cdfbaa279469f /Checklist/NightSecWizard.h |
Diffstat (limited to 'Checklist/NightSecWizard.h')
-rw-r--r-- | Checklist/NightSecWizard.h | 151 |
1 files changed, 151 insertions, 0 deletions
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 <map> +using std::multimap; +typedef multimap < CComponentHolder*, CPropPageHolder* > PropertyPageMap; + +#include <atlprsht.h> + +class ATL_NO_VTABLE CNightSecWizard : + public CComObjectRootEx<CComMultiThreadModel>, + public IDispatchImpl<INightSecSiteInfo, &IID_INightSecSiteInfo, &LIBID_CHECKLISTLib>, + public CPropertySheet, + public CContextHelp<CNightSecWizard> +{ + +// 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<CNightSecWizard>) + 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<CAdvancedWizardT> CAdvancedWizard; + + + +#include "ExtraPage.h" + +#include <vector> +using std::vector; +typedef vector<CExtraPage*> 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<CNormalWizardT> CNormalWizard; + +#endif // !defined(AFX_NIGHTSECWIZARD_H__E7FC7C13_8F86_11D3_BFBC_0020182B97FC__INCLUDED_) |