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.

154 lines
4.9 KiB

  1. #if !defined(AFX_WIZPAGE_H__61D37A46_D552_11D1_9BCC_006008947035__INCLUDED_)
  2. #define AFX_WIZPAGE_H__61D37A46_D552_11D1_9BCC_006008947035__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // Wiz97Pg.h : header file
  7. //
  8. // forward declaration
  9. class CWiz97Sheet;
  10. /////////////////////////////////////////////////////////////////////////////
  11. //
  12. // Base classes for Wiz97 dialogs
  13. //
  14. /////////////////////////////////////////////////////////////////////////////
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CWiz97BasePage base class
  17. // This class is intended to be used for wizard pages. Either OnCanel() or
  18. // OnWizardFinish() is called for every page derived from this class whether
  19. // or not the Finish button is displayed. The default versions of these functions
  20. // provided here do nothing. This means the finishing page should implement
  21. // OnCancel() to call CSnapPage::OnCancel() otherwise it will not get called.
  22. class CWiz97BasePage : public CSnapPage
  23. {
  24. DECLARE_DYNCREATE(CWiz97BasePage)
  25. // Construction
  26. public:
  27. CWiz97BasePage(UINT nIDD, BOOL bWiz97 = TRUE, BOOL bFinishPage = FALSE );
  28. CWiz97BasePage() { ASSERT( FALSE ); }
  29. virtual ~CWiz97BasePage();
  30. // Can initialize the page with either a DSObject OR a SecPolItem, but not
  31. // both because the DSObject() accessor gets confused.
  32. virtual BOOL InitWiz97
  33. (
  34. DWORD dwFlags,
  35. DWORD dwWizButtonFlags = 0,
  36. UINT nHeaderTitle = 0,
  37. UINT nSubTitle = 0,
  38. STACK_INT *pstackPages = NULL
  39. );
  40. virtual BOOL InitWiz97
  41. (
  42. CComObject<CSecPolItem> *pSecPolItem,
  43. DWORD dwFlags,
  44. DWORD dwWizButtonFlags /*= 0*/,
  45. UINT nHeaderTitle /*= 0*/,
  46. UINT nSubTitle /*= 0*/
  47. );
  48. // *pbDoHook set upon exit from PropSheet in derived OnWizardFinish()
  49. void ConnectAfterWizardHook( BOOL *pbDoHook );
  50. public:
  51. virtual BOOL OnSetActive();
  52. // Default handlers since our callback needs something to call.
  53. virtual BOOL OnWizardFinish();
  54. virtual void OnCancel();
  55. // OnWizardRelease is called for each page after the finish page's OnWizardFinish has been called.
  56. virtual void OnWizardRelease() {};
  57. static UINT CALLBACK PropSheetPageCallback( HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp );
  58. protected:
  59. virtual BOOL OnInitDialog();
  60. void SetAfterWizardHook( BOOL bDoHook );
  61. BOOL WasActivated() { return m_bSetActive; }
  62. void SetFinished( BOOL bFinished = TRUE ) { m_static_bFinish = bFinished; }
  63. private:
  64. static BOOL m_static_bFinish; // TRUE if Finish button pressed on last page
  65. static BOOL m_static_bOnCancelCalled; // TRUE if CSnapPage::OnCancel called. Call 1 time only.
  66. BOOL *m_pbDoAfterWizardHook;
  67. BOOL m_bFinishPage; // TRUE if this is the finishing page
  68. BOOL m_bSetActive; // TRUE if this page was ever displayed
  69. BOOL m_bReset; // TRUE if OnCancel was called due to a reset for this page
  70. };
  71. /////////////////////////////////////////////////////////////////////////////
  72. //
  73. // General Name/Properties Wiz97 dialog(s)
  74. //
  75. /////////////////////////////////////////////////////////////////////////////
  76. class CWiz97WirelessPolGenPage : public CWiz97BasePage
  77. {
  78. public:
  79. CWiz97WirelessPolGenPage(UINT nIDD, UINT nInformativeText, BOOL bWiz97 = TRUE);
  80. virtual ~CWiz97WirelessPolGenPage();
  81. // Dialog Data
  82. //{{AFX_DATA(CWiz97WirelessPolGenPage)
  83. enum { IDD = IDD_PROPPAGE_G_NAMEDESCRIPTION};
  84. CEdit m_edName;
  85. CEdit m_edDescription;
  86. //}}AFX_DATA
  87. virtual void Initialize (PWIRELESS_POLICY_DATA pWirelessPolicyData)
  88. {
  89. ASSERT( NULL != pWirelessPolicyData );
  90. m_pPolicy = pWirelessPolicyData;
  91. // let base class continue initialization
  92. CWiz97BasePage::Initialize( NULL);
  93. }
  94. // Overrides
  95. // ClassWizard generate virtual function overrides
  96. //{{AFX_VIRTUAL(CWiz97WirelessPolGenPage)
  97. public:
  98. virtual BOOL OnSetActive();
  99. virtual LRESULT OnWizardBack();
  100. virtual LRESULT OnWizardNext();
  101. virtual BOOL OnApply();
  102. protected:
  103. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  104. //}}AFX_VIRTUAL
  105. // Implementation
  106. protected:
  107. // Generated message map functions
  108. //{{AFX_MSG(CWiz97WirelessPolGenPage)
  109. virtual BOOL OnInitDialog();
  110. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  111. afx_msg void OnChangedName();
  112. afx_msg void OnChangedDescription();
  113. //}}AFX_MSG
  114. DECLARE_MESSAGE_MAP()
  115. BOOL SaveControlData();
  116. UINT m_nInformativeText;
  117. LPWSTR * m_ppwszName;
  118. LPWSTR * m_ppwszDescription;
  119. PWIRELESS_POLICY_DATA m_pPolicy;
  120. };
  121. //{{AFX_INSERT_LOCATION}}
  122. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  123. #endif // !defined(AFX_WIZPAGE_H__61D37A46_D552_11D1_9BCC_006008947035__INCLUDED_)