Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

669 lines
19 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) Microsoft Corporation
  4. //
  5. // SYNOPSIS
  6. //
  7. // Declares the RAP wizard classes.
  8. //
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef RAPWIZ_H
  11. #define RAPWIZ_H
  12. #pragma once
  13. #include "atltmp.h"
  14. #include "helper.h"
  15. #include "ntgroups.h"
  16. #include "EapProfile.h"
  17. #include "PropertyPage.h"
  18. class CPolicyNode;
  19. #define DIALUP_PORT_CONDITION L"MATCH(\"NAS-Port-Type=^0$|^2$|^3$|^4$\")"
  20. #define VPN_PORT_CONDITION L"MATCH(\"NAS-Port-Type=^5$\")"
  21. #define WIRELESS_PORT_CONDITION L"MATCH(\"NAS-Port-Type=^18$|^19$\")"
  22. #define SWITCH_PORT_CONDITION L"MATCH(\"NAS-Port-Type=^15$\")"
  23. #define DONT_CARE 0xff
  24. void SetWizardLargeFont(HWND hWnd, int controlId);
  25. struct CRapWizScenario
  26. {
  27. DWORD m_dwScenarioID;
  28. // affect authentication, encryption, eap page
  29. BOOL m_bAllowClear;
  30. // TRUE: show the No ENcryption box
  31. // FALSE: not to show
  32. // DONT_CARE: the page is not shown, so when the scenario is used, the encryption attributes should be cleared
  33. // affect EAP
  34. BOOL m_bAllowEncryptionEAP;
  35. BOOL m_bAllowClearEAP;
  36. // Exclude flags
  37. DWORD m_excludeFlag;
  38. // pre-conditions
  39. LPCTSTR m_lpszPreCond;
  40. // write -- manual set to FALSE
  41. BOOL m_bSheetWriteSDO;
  42. // determine page order
  43. DWORD* m_pdwPages;
  44. };
  45. class CIASAttrList;
  46. // policy creation wizard
  47. class CRapWizardData : public CComObjectRootEx<CComSingleThreadModel>, public IUnknown
  48. {
  49. BEGIN_COM_MAP(CRapWizardData)
  50. COM_INTERFACE_ENTRY(IUnknown)
  51. END_COM_MAP()
  52. public:
  53. CRapWizardData();
  54. void SetInfo(LPCTSTR czMachine, CPolicyNode* pNode, ISdoDictionaryOld* pDic, ISdo* pPolicy, ISdo* pProfile, ISdoCollection* pPolicyCol, ISdoCollection* pProfileCol, ISdoServiceControl* pServiceCtrl, CIASAttrList* pAttrList) ;
  55. DWORD GetNextPageId(LPCTSTR pszCurrTemplate);
  56. DWORD GetPrevPageId(LPCTSTR pszCurrTemplate);
  57. BOOL SetScenario(DWORD dwScenario);
  58. CRapWizScenario* GetScenario() { return m_Scenarios[m_dwScenarioIndex]; };
  59. CRapWizScenario** GetAllScenarios() { return m_Scenarios; };
  60. BOOL GetSettingsText(::CString& str);
  61. // called by pages to finish the job
  62. BOOL OnWizardFinish(HWND hWnd);
  63. // called by when entering the finish page
  64. BOOL OnWizardPreFinish(HWND hWnd);
  65. // User bit or group
  66. DWORD m_dwUserOrGroup;
  67. // group
  68. NTGroup_ListView m_NTGroups;
  69. // authentication
  70. BOOL m_bEAP;
  71. DWORD m_dwEAPProvider;
  72. EapProfile m_eapProfile;
  73. BOOL m_bMSCHAP;
  74. BOOL m_bMSCHAP2;
  75. // encryption
  76. BOOL m_bEncrypt_No;
  77. BOOL m_bEncrypt_Basic;
  78. BOOL m_bEncrypt_Strong;
  79. BOOL m_bEncrypt_Strongest;
  80. // Allow/deny dialin
  81. BOOL m_bAllowDialin;
  82. // policy data
  83. // Policy and profile SDO's.
  84. CComPtr<ISdoDictionaryOld> m_spDictionarySdo; // dictionary sdo pointer
  85. CComPtr<ISdo> m_spProfileSdo; // profiles collection sdo pointer
  86. CComPtr<ISdo> m_spPolicySdo; // policy sdo pointer
  87. CComPtr<ISdoCollection> m_spProfilesCollectionSdo; // profile collection Sdo
  88. CComPtr<ISdoCollection> m_spPoliciesCollectionSdo; // policy collection Sdo
  89. CComPtr<ISdoServiceControl> m_spSdoServiceControl;
  90. CIASAttrList* m_pAttrList;
  91. // related to MMC
  92. CPolicyNode *m_pPolicyNode; // policy node pointer
  93. // information for population the finished page
  94. ::CString m_strPolicyName;
  95. ::CString m_strEAPProvider;
  96. protected:
  97. // Scenario
  98. DWORD m_dwScenarioIndex;
  99. // page sequence information
  100. static CRapWizScenario* m_Scenarios[];
  101. };
  102. ///////////////////////////////////////////////////////////////////////////////
  103. //
  104. // CLASS
  105. //
  106. // NewPolicyStartPage
  107. //
  108. // DESCRIPTION
  109. //
  110. // Implements the Welcome page.
  111. //
  112. ///////////////////////////////////////////////////////////////////////////////
  113. class CPolicyWizard_Start : public CIASWizard97Page<CPolicyWizard_Start, 0, 0>
  114. {
  115. public:
  116. CPolicyWizard_Start(
  117. CRapWizardData* WizData
  118. , LONG_PTR hNotificationHandle
  119. , TCHAR* pTitle = NULL
  120. , BOOL bOwnsNotificationHandle = FALSE
  121. ) : m_spWizData(WizData),
  122. CIASWizard97Page<CPolicyWizard_Start, 0, 0>(hNotificationHandle,pTitle, bOwnsNotificationHandle)
  123. {
  124. _ASSERTE(WizData);
  125. };
  126. enum { IDD = IDD_NEWRAPWIZ_WELCOME };
  127. BOOL OnWizardNext()
  128. {
  129. // reset the dirty bit
  130. SetModified(FALSE);
  131. return m_spWizData->GetNextPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);
  132. };
  133. LRESULT OnInitDialog(
  134. UINT uMsg
  135. , WPARAM wParam
  136. , LPARAM lParam
  137. , BOOL& bHandled
  138. )
  139. {
  140. SetWizardLargeFont(m_hWnd, IDC_NEWRAPWIZ_STATIC_LARGE);
  141. return TRUE;
  142. };
  143. virtual BOOL OnSetActive()
  144. {
  145. ::PropSheet_SetWizButtons(GetParent(), PSWIZB_NEXT);
  146. return TRUE;
  147. };
  148. protected:
  149. CComPtr<CRapWizardData> m_spWizData;
  150. public:
  151. BEGIN_MSG_MAP(CPolicyWizard_Start)
  152. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  153. // we have problem with chaining the wizard class, so we chain it's base class instead
  154. // CHAIN_MSG_MAP( CIASWizard97Page<CPolicyWizard_Start, 0, 0> )
  155. CHAIN_MSG_MAP( CIASPropertyPageNoHelp<CPolicyWizard_Start> )
  156. END_MSG_MAP()
  157. };
  158. ///////////////////////////////////////////////////////////////////////////////
  159. //
  160. // CLASS
  161. //
  162. // CPolicyWizard_Finish
  163. //
  164. // DESCRIPTION
  165. //
  166. // Implements the completion page.
  167. //
  168. ///////////////////////////////////////////////////////////////////////////////
  169. class CPolicyWizard_Finish : public CIASWizard97Page<CPolicyWizard_Finish, 0, 0>
  170. {
  171. public:
  172. CPolicyWizard_Finish(CRapWizardData* WizData
  173. , LONG_PTR hNotificationHandle
  174. , TCHAR* pTitle = NULL
  175. , BOOL bOwnsNotificationHandle = FALSE
  176. ) : m_spWizData(WizData),
  177. CIASWizard97Page<CPolicyWizard_Finish, 0, 0>(hNotificationHandle,pTitle, bOwnsNotificationHandle)
  178. {
  179. AfxInitRichEdit();
  180. _ASSERTE(WizData);
  181. };
  182. enum { IDD = IDD_NEWRAPWIZ_COMPLETION };
  183. BEGIN_MSG_MAP(CPolicyWizard_Finish)
  184. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  185. // we have problem with chaining the wizard class, so we chain it's base class instead
  186. // CHAIN_MSG_MAP( CIASWizard97Page<CPolicyWizard_Finish, 0, 0> )
  187. CHAIN_MSG_MAP( CIASPropertyPageNoHelp<CPolicyWizard_Finish> )
  188. END_MSG_MAP()
  189. BOOL OnWizardBack() { return m_spWizData->GetPrevPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);};
  190. virtual BOOL OnWizardFinish()
  191. {
  192. // reset the dirty bit
  193. SetModified(FALSE);
  194. return m_spWizData->OnWizardFinish(m_hWnd);
  195. };
  196. LRESULT OnInitDialog(
  197. UINT uMsg
  198. , WPARAM wParam
  199. , LPARAM lParam
  200. , BOOL& bHandled
  201. )
  202. {
  203. SetWizardLargeFont(m_hWnd, IDC_NEWRAPWIZ_STATIC_LARGE);
  204. return TRUE;
  205. };
  206. virtual BOOL OnSetActive()
  207. {
  208. ::PropSheet_SetWizButtons(GetParent(), PSWIZB_BACK | PSWIZB_FINISH);
  209. m_spWizData->OnWizardPreFinish(m_hWnd);
  210. // populate the text on the page ...
  211. HWND hWnd = GetDlgItem(IDC_NEWRAPWIZ_FINISH_POLICYNAME);
  212. if (hWnd)
  213. ::SetWindowText(hWnd, (LPCTSTR)m_spWizData->m_strPolicyName);
  214. hWnd = GetDlgItem(IDC_NEWRAPWIZ_FINISH_SETTINGS);
  215. ::CString str;
  216. if(hWnd && m_spWizData->GetSettingsText(str))
  217. ::SetWindowText(hWnd, (LPCTSTR)str);
  218. return TRUE;
  219. };
  220. protected:
  221. // CRichEditCtrl tasks;
  222. CComPtr<CRapWizardData> m_spWizData;
  223. };
  224. ////////////////////////////////////////////////////////////////////////////////////////
  225. //
  226. //
  227. //
  228. // CPolicyWizard_Scenarios
  229. //
  230. //
  231. //
  232. ////////////////////////////////////////////////////////////////////////////////////////
  233. class CPolicyWizard_Scenarios : public CIASWizard97Page<CPolicyWizard_Scenarios, IDS_NEWRAPWIZ_SCENARIO_TITLE, IDS_NEWRAPWIZ_SCENARIO_SUBTITLE>
  234. {
  235. public :
  236. // ISSUE: how is base class initialization going to work with subclassing???
  237. CPolicyWizard_Scenarios(
  238. CRapWizardData* WizData
  239. , LONG_PTR hNotificationHandle
  240. , TCHAR* pTitle = NULL
  241. , BOOL bOwnsNotificationHandle = FALSE
  242. );
  243. ~CPolicyWizard_Scenarios();
  244. // This is the ID of the dialog resource we want for this class.
  245. // An enum is used here because the correct value of
  246. // IDD must be initialized before the base class's constructor is called
  247. enum { IDD = IDD_NEWRAPWIZ_SCENARIO };
  248. BEGIN_MSG_MAP(CPolicyWizard_Scenarios)
  249. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  250. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_SCENARIO_VPN, OnScenario)
  251. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_SCENARIO_DIALUP, OnScenario)
  252. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_SCENARIO_WIRELESS, OnScenario)
  253. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_SCENARIO_SWITCH, OnScenario)
  254. CHAIN_MSG_MAP(CIASPropertyPageNoHelp<CPolicyWizard_Scenarios>)
  255. END_MSG_MAP()
  256. LRESULT OnInitDialog(
  257. UINT uMsg
  258. , WPARAM wParam
  259. , LPARAM lParam
  260. , BOOL& bHandled
  261. );
  262. LRESULT OnScenario(
  263. UINT uMsg
  264. , WPARAM wParam
  265. , HWND hWnd
  266. , BOOL& bHandled
  267. );
  268. BOOL OnWizardNext();
  269. BOOL OnWizardBack() { return m_spWizData->GetPrevPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);};
  270. BOOL OnSetActive();
  271. public:
  272. protected:
  273. CComPtr<CRapWizardData> m_spWizData;
  274. };
  275. ////////////////////////////////////////////////////////////////////////////////////////
  276. //
  277. //
  278. //
  279. // CPolicyWizard_Groups
  280. //
  281. //
  282. //
  283. ////////////////////////////////////////////////////////////////////////////////////////
  284. class CPolicyWizard_Groups : public CIASWizard97Page<CPolicyWizard_Groups, IDS_NEWRAPWIZ_GROUP_TITLE, IDS_NEWRAPWIZ_GROUP_SUBTITLE>
  285. {
  286. public :
  287. // ISSUE: how is base class initialization going to work with subclassing???
  288. CPolicyWizard_Groups(
  289. CRapWizardData* WizData
  290. , LONG_PTR hNotificationHandle
  291. , TCHAR* pTitle = NULL
  292. , BOOL bOwnsNotificationHandle = FALSE
  293. );
  294. ~CPolicyWizard_Groups();
  295. // This is the ID of the dialog resource we want for this class.
  296. // An enum is used here because the correct value of
  297. // IDD must be initialized before the base class's constructor is called
  298. enum { IDD = IDD_NEWRAPWIZ_GROUP };
  299. BEGIN_MSG_MAP(CPolicyWizard_Groups)
  300. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  301. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_GROUP_USER, OnUserOrGroup)
  302. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_GROUP_GROUP, OnUserOrGroup)
  303. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_GROUP_ADDGROUP, OnAddGroups)
  304. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_GROUP_REMOVEGROUP, OnRemoveGroup)
  305. NOTIFY_CODE_HANDLER(LVN_ITEMCHANGED, OnListViewItemChanged)
  306. CHAIN_MSG_MAP(CIASPropertyPageNoHelp<CPolicyWizard_Groups>)
  307. END_MSG_MAP()
  308. LRESULT OnInitDialog(
  309. UINT uMsg
  310. , WPARAM wParam
  311. , LPARAM lParam
  312. , BOOL& bHandled
  313. );
  314. LRESULT OnUserOrGroup(
  315. UINT uMsg
  316. , WPARAM wParam
  317. , HWND hWnd
  318. , BOOL& bHandled
  319. );
  320. LRESULT OnRemoveGroup(
  321. UINT uMsg
  322. , WPARAM wParam
  323. , HWND hWnd
  324. , BOOL& bHandled
  325. );
  326. LRESULT OnAddGroups(
  327. UINT uMsg
  328. , WPARAM wParam
  329. , HWND hWnd
  330. , BOOL& bHandled
  331. );
  332. void SetBtnState();
  333. LRESULT OnListViewItemChanged(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
  334. BOOL OnWizardNext();
  335. BOOL OnWizardBack() { return m_spWizData->GetPrevPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);};
  336. BOOL OnSetActive();
  337. public:
  338. protected:
  339. CComPtr<CRapWizardData> m_spWizData;
  340. };
  341. ////////////////////////////////////////////////////////////////////////////////////////
  342. //
  343. //
  344. //
  345. // CPolicyWizard_Authentication
  346. //
  347. //
  348. //
  349. ////////////////////////////////////////////////////////////////////////////////////////
  350. class CPolicyWizard_Authentication : public
  351. CIASWizard97Page<CPolicyWizard_Authentication, IDS_NEWRAPWIZ_AUTHENTICATION_TITLE, IDS_NEWRAPWIZ_AUTHENTICATION_SUBTITLE>
  352. {
  353. public :
  354. // ISSUE: how is base class initialization going to work with subclassing???
  355. CPolicyWizard_Authentication(
  356. CRapWizardData* WizData
  357. , LONG_PTR hNotificationHandle
  358. , TCHAR* pTitle = NULL
  359. , BOOL bOwnsNotificationHandle = FALSE
  360. );
  361. ~CPolicyWizard_Authentication();
  362. // This is the ID of the dialog resource we want for this class.
  363. // An enum is used here because the correct value of
  364. // IDD must be initialized before the base class's constructor is called
  365. enum { IDD = IDD_NEWRAPWIZ_AUTHENTICATION };
  366. BEGIN_MSG_MAP(CPolicyWizard_Authentication)
  367. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  368. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_AUTH_EAP, OnAuthSelect)
  369. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_AUTH_MSCHAP2, OnAuthSelect)
  370. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_AUTH_MSCHAP, OnAuthSelect)
  371. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_AUTH_CONFIGEAP, OnConfigEAP)
  372. COMMAND_CODE_HANDLER(CBN_SELCHANGE, OnSelectedEAPChanged)
  373. CHAIN_MSG_MAP(CIASPropertyPageNoHelp<CPolicyWizard_Authentication>)
  374. END_MSG_MAP()
  375. virtual LRESULT OnInitDialog(
  376. UINT uMsg
  377. , WPARAM wParam
  378. , LPARAM lParam
  379. , BOOL& bHandled
  380. );
  381. LRESULT OnAuthSelect(
  382. UINT uMsg
  383. , WPARAM wParam
  384. , HWND hWnd
  385. , BOOL& bHandled
  386. );
  387. LRESULT OnConfigEAP(
  388. UINT uMsg
  389. , WPARAM wParam
  390. , HWND hWnd
  391. , BOOL& bHandled
  392. );
  393. LRESULT OnSelectedEAPChanged(
  394. UINT uMsg
  395. , WPARAM wParam
  396. , HWND hwnd
  397. , BOOL& bHandled
  398. );
  399. virtual BOOL OnWizardNext();
  400. virtual BOOL OnWizardBack() { return m_spWizData->GetPrevPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);};
  401. virtual BOOL OnSetActive();
  402. protected:
  403. CComboBox m_EapBox;
  404. AuthProviderArray m_EAPProviders;
  405. CComPtr<CRapWizardData> m_spWizData;
  406. void ResetEAPList();
  407. };
  408. ////////////////////////////////////////////////////////////////////////////////////////
  409. //
  410. //
  411. //
  412. // CPolicyWizard_EAP
  413. //
  414. //
  415. //
  416. ////////////////////////////////////////////////////////////////////////////////////////
  417. class CPolicyWizard_EAP : public CPolicyWizard_Authentication
  418. {
  419. public :
  420. // ISSUE: how is base class initialization going to work with subclassing???
  421. CPolicyWizard_EAP(
  422. CRapWizardData* WizData
  423. , LONG_PTR hNotificationHandle
  424. , TCHAR* pTitle = NULL
  425. , BOOL bOwnsNotificationHandle = FALSE
  426. ) : CPolicyWizard_Authentication(WizData, hNotificationHandle, pTitle, bOwnsNotificationHandle)
  427. {
  428. // otherwise the ATL frame work will take the CPolicyWizard_Authentication's IDD
  429. ((PROPSHEETPAGE*)(*this))->pszTemplate = MAKEINTRESOURCE(IDD);
  430. SetTitleIds(IDS_NEWRAPWIZ_EAP_TITLE, IDS_NEWRAPWIZ_EAP_SUBTITLE);
  431. _ASSERTE(WizData);
  432. };
  433. ~CPolicyWizard_EAP(){};
  434. // This is the ID of the dialog resource we want for this class.
  435. // An enum is used here because the correct value of
  436. // IDD must be initialized before the base class's constructor is called
  437. enum { IDD = IDD_NEWRAPWIZ_EAP };
  438. BEGIN_MSG_MAP(CPolicyWizard_EAP)
  439. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  440. CHAIN_MSG_MAP(CPolicyWizard_Authentication)
  441. END_MSG_MAP()
  442. LRESULT OnInitDialog(
  443. UINT uMsg
  444. , WPARAM wParam
  445. , LPARAM lParam
  446. , BOOL& bHandled
  447. );
  448. BOOL OnWizardNext()
  449. { // reset the dirty bit
  450. SetModified(FALSE);
  451. return m_spWizData->GetNextPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);
  452. };
  453. BOOL OnWizardBack() { return m_spWizData->GetPrevPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);};
  454. BOOL OnSetActive();
  455. };
  456. ////////////////////////////////////////////////////////////////////////////////////////
  457. //
  458. //
  459. //
  460. // CPolicyWizard_Encryption
  461. //
  462. //
  463. //
  464. ////////////////////////////////////////////////////////////////////////////////////////
  465. class CPolicyWizard_Encryption : public
  466. CIASWizard97Page<CPolicyWizard_Encryption, IDS_NEWRAPWIZ_ENCRYPTION_TITLE, IDS_NEWRAPWIZ_ENCRYPTION_SUBTITLE>
  467. {
  468. public :
  469. // ISSUE: how is base class initialization going to work with subclassing???
  470. CPolicyWizard_Encryption(
  471. CRapWizardData* WizData
  472. , LONG_PTR hNotificationHandle
  473. , TCHAR* pTitle = NULL
  474. , BOOL bOwnsNotificationHandle = FALSE
  475. );
  476. ~CPolicyWizard_Encryption();
  477. // This is the ID of the dialog resource we want for this class.
  478. // An enum is used here because the correct value of
  479. // IDD must be initialized before the base class's constructor is called
  480. enum { IDD = IDD_NEWRAPWIZ_ENCRYPTION };
  481. BEGIN_MSG_MAP(CPolicyWizard_Encryption)
  482. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  483. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_ENCRY_NO, OnEncryptionSelect)
  484. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_ENCRY_BASIC, OnEncryptionSelect)
  485. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_ENCRY_STRONG, OnEncryptionSelect)
  486. COMMAND_ID_HANDLER( IDC_NEWRAPWIZ_ENCRY_STRONGEST, OnEncryptionSelect)
  487. CHAIN_MSG_MAP(CIASPropertyPageNoHelp<CPolicyWizard_Encryption>)
  488. END_MSG_MAP()
  489. LRESULT OnInitDialog(
  490. UINT uMsg
  491. , WPARAM wParam
  492. , LPARAM lParam
  493. , BOOL& bHandled
  494. );
  495. LRESULT OnEncryptionSelect(
  496. UINT uMsg
  497. , WPARAM wParam
  498. , HWND hWnd
  499. , BOOL& bHandled
  500. );
  501. BOOL OnWizardNext();
  502. BOOL OnWizardBack() { return m_spWizData->GetPrevPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);};
  503. BOOL OnSetActive();
  504. public:
  505. protected:
  506. CComPtr<CRapWizardData> m_spWizData;
  507. };
  508. ////////////////////////////////////////////////////////////////////////////////////////
  509. //
  510. //
  511. //
  512. // CPolicyWizard_Encryption_VPN
  513. //
  514. //
  515. //
  516. ////////////////////////////////////////////////////////////////////////////////////////
  517. class CPolicyWizard_Encryption_VPN : public CPolicyWizard_Encryption
  518. {
  519. public:
  520. // This is the ID of the dialog resource we want for this class.
  521. // An enum is used here because the correct value of
  522. // IDD must be initialized before the base class's constructor is called
  523. enum { IDD = IDD_NEWRAPWIZ_ENCRYPTION_VPN };
  524. // ISSUE: how is base class initialization going to work with subclassing???
  525. CPolicyWizard_Encryption_VPN(
  526. CRapWizardData* WizData
  527. , LONG_PTR hNotificationHandle
  528. , TCHAR* pTitle = NULL
  529. , BOOL bOwnsNotificationHandle = FALSE
  530. ) : CPolicyWizard_Encryption(WizData, hNotificationHandle, pTitle, bOwnsNotificationHandle)
  531. {
  532. // otherwise the ATL frame work will take the CPolicyWizard_Authentication's IDD
  533. ((PROPSHEETPAGE*)(*this))->pszTemplate = MAKEINTRESOURCE(IDD);
  534. };
  535. };
  536. #endif // RAPWIZ_H