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.

156 lines
3.4 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1997 - 1999
  4. Module Name:
  5. AddPolicyWizardPage2.h
  6. Abstract:
  7. Header file for the CNewRAPWiz_Condition class.
  8. This is our handler class for the first CPolicyNode property page.
  9. See AddPolicyWizardPage2.cpp for implementation.
  10. Revision History:
  11. mmaguire 12/15/97 - created
  12. --*/
  13. //////////////////////////////////////////////////////////////////////////////
  14. #if !defined(_NAP_ADD_POLICY_WIZPAGE_2_H_)
  15. #define _NAP_ADD_POLICY_WIZPAGE_2_H_
  16. //////////////////////////////////////////////////////////////////////////////
  17. // BEGIN INCLUDES
  18. //
  19. // where we can find what this class derives from:
  20. //
  21. #include "PropertyPage.h"
  22. //
  23. //
  24. // where we can find what this class has or uses:
  25. //
  26. class CPolicyNode;
  27. #include "Condition.h"
  28. #include "IASAttrList.h"
  29. #include "SelCondAttr.h"
  30. #include "atltmp.h"
  31. #include "rapwiz.h"
  32. //
  33. // END INCLUDES
  34. //////////////////////////////////////////////////////////////////////////////
  35. class CNewRAPWiz_Condition : public CIASWizard97Page<CNewRAPWiz_Condition, IDS_NEWRAPWIZ_CONDITION_TITLE, IDS_NEWRAPWIZ_CONDITION_SUBTITLE>
  36. {
  37. public :
  38. // ISSUE: how is base class initialization going to work with subclassing???
  39. CNewRAPWiz_Condition(
  40. CRapWizardData* pWizData,
  41. LONG_PTR hNotificationHandle
  42. , CIASAttrList *pIASAttrList
  43. , TCHAR* pTitle = NULL
  44. , BOOL bOwnsNotificationHandle = FALSE
  45. );
  46. ~CNewRAPWiz_Condition();
  47. // This is the ID of the dialog resource we want for this class.
  48. // An enum is used here because the correct value of
  49. // IDD must be initialized before the base class's constructor is called
  50. enum { IDD = IDD_NEWRAPWIZ_CONDITION };
  51. BEGIN_MSG_MAP(CNewRAPWiz_Condition)
  52. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  53. COMMAND_ID_HANDLER(IDC_BUTTON_CONDITION_ADD, OnConditionAdd)
  54. COMMAND_ID_HANDLER(IDC_BUTTON_CONDITION_REMOVE, OnConditionRemove)
  55. COMMAND_ID_HANDLER(IDC_LIST_CONDITIONS, OnConditionList)
  56. COMMAND_ID_HANDLER(IDC_BUTTON_CONDITION_EDIT, OnConditionEdit)
  57. CHAIN_MSG_MAP(CIASPropertyPageNoHelp<CNewRAPWiz_Condition>)
  58. END_MSG_MAP()
  59. LRESULT OnInitDialog(
  60. UINT uMsg
  61. , WPARAM wParam
  62. , LPARAM lParam
  63. , BOOL& bHandled
  64. );
  65. LRESULT OnConditionAdd(
  66. UINT uMsg
  67. , WPARAM wParam
  68. , HWND hWnd
  69. , BOOL& bHandled
  70. );
  71. LRESULT OnConditionRemove(
  72. UINT uMsg
  73. , WPARAM wParam
  74. , HWND hWnd
  75. , BOOL& bHandled
  76. );
  77. LRESULT OnConditionList(
  78. UINT uNotifyCode,
  79. UINT uID,
  80. HWND hWnd,
  81. BOOL &bHandled
  82. );
  83. LRESULT OnConditionEdit(
  84. UINT uNotifyCode,
  85. UINT uID,
  86. HWND hWnd,
  87. BOOL &bHandled
  88. );
  89. void AdjustHoritontalScroll();
  90. BOOL OnWizardNext();
  91. BOOL OnSetActive();
  92. BOOL OnQueryCancel();
  93. BOOL OnWizardBack() { return m_spWizData->GetPrevPageId(((PROPSHEETPAGE*)(*this))->pszTemplate);};
  94. public:
  95. protected:
  96. HRESULT PopulateConditions();
  97. HRESULT StripCondTextPrefix(
  98. ATL::CString& strExternCondText,
  99. ATL::CString& strCondText,
  100. ATL::CString& strCondAttr,
  101. CONDITIONTYPE* pdwCondType
  102. );
  103. CIASAttrList *m_pIASAttrList; // condition attribute list
  104. BOOL GetSdoPointers();
  105. // condition collection -- created in the page
  106. CComPtr<ISdoCollection> m_spConditionCollectionSdo; // condition collection
  107. //
  108. // condition list pointer
  109. //
  110. CSimpleArray<CCondition*> m_ConditionList;
  111. // wizard shareed data
  112. CComPtr<CRapWizardData> m_spWizData;
  113. };
  114. #endif // _NAP_ADD_POLICY_WIZPAGE_2_H_