Source code of Windows XP (NT5)
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.

712 lines
18 KiB

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