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.

180 lines
5.2 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1997-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // BasePage.h
  7. //
  8. // Description:
  9. // Definition of the CBasePropertyPage class. This class provides base
  10. // functionality for extension DLL property pages.
  11. //
  12. // Implementation File:
  13. // BasePage.cpp
  14. //
  15. // Maintained By:
  16. // David Potter (DavidP) Mmmm DD, 1997
  17. //
  18. // Revision History:
  19. //
  20. // Notes:
  21. //
  22. /////////////////////////////////////////////////////////////////////////////
  23. #ifndef _BASEPAGE_H_
  24. #define _BASEPAGE_H_
  25. /////////////////////////////////////////////////////////////////////////////
  26. // Include Files
  27. /////////////////////////////////////////////////////////////////////////////
  28. #ifndef _cluadmex_h__
  29. #include <CluAdmEx.h>
  30. #endif
  31. #ifndef _DLGHELP_H_
  32. #include "DlgHelp.h" // for CDialogHelp
  33. #endif
  34. #ifndef _EXTOBJ_H_
  35. #include "ExtObj.h" // for CExtObject
  36. #endif
  37. #ifndef _PROPLIST_H_
  38. #include "PropList.h" // for CClusPropList, CObjectProperty
  39. #endif
  40. /////////////////////////////////////////////////////////////////////////////
  41. // Forward Class Declarations
  42. /////////////////////////////////////////////////////////////////////////////
  43. class CBasePropertyPage;
  44. /////////////////////////////////////////////////////////////////////////////
  45. // External Class Declarations
  46. /////////////////////////////////////////////////////////////////////////////
  47. class CExtObject;
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CBasePropertyPage dialog
  50. /////////////////////////////////////////////////////////////////////////////
  51. class CBasePropertyPage : public CPropertyPage
  52. {
  53. DECLARE_DYNCREATE(CBasePropertyPage)
  54. // Construction
  55. public:
  56. CBasePropertyPage(void);
  57. CBasePropertyPage(
  58. IN UINT idd,
  59. IN const DWORD * pdwHelpMap,
  60. IN const DWORD * pdwWizardHelpMap,
  61. IN UINT nIDCaption = 0
  62. );
  63. virtual ~CBasePropertyPage(void) { }
  64. // Second phase construction.
  65. virtual BOOL BInit(IN OUT CExtObject * peo);
  66. BOOL BCreateParamsKey(void);
  67. protected:
  68. void CommonConstruct(void);
  69. // Attributes
  70. protected:
  71. CExtObject * m_peo;
  72. HPROPSHEETPAGE m_hpage;
  73. IDD m_iddPropertyPage;
  74. IDD m_iddWizardPage;
  75. IDS m_idsCaption;
  76. CExtObject * Peo(void) const { return m_peo; }
  77. HPROPSHEETPAGE Hpage(void) const { return m_hpage; }
  78. IDD IddPropertyPage(void) const { return m_iddPropertyPage; }
  79. IDD IddWizardPage(void) const { return m_iddWizardPage; }
  80. IDS IdsCaption(void) const { return m_idsCaption; }
  81. public:
  82. void SetHpage(IN OUT HPROPSHEETPAGE hpage) { m_hpage = hpage; }
  83. CLUADMEX_OBJECT_TYPE Cot(void) const;
  84. // Dialog Data
  85. //{{AFX_DATA(CBasePropertyPage)
  86. enum { IDD = 0 };
  87. //}}AFX_DATA
  88. CStatic m_staticIcon;
  89. CStatic m_staticTitle;
  90. CString m_strTitle;
  91. // Overrides
  92. // ClassWizard generate virtual function overrides
  93. //{{AFX_VIRTUAL(CBasePropertyPage)
  94. public:
  95. virtual BOOL OnSetActive();
  96. virtual BOOL OnApply();
  97. protected:
  98. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  99. //}}AFX_VIRTUAL
  100. protected:
  101. virtual DWORD DwParseUnknownProperty(
  102. IN LPCWSTR pwszName,
  103. IN const CLUSPROP_BUFFER_HELPER & rvalue,
  104. IN DWORD cbBuf
  105. )
  106. {
  107. UNREFERENCED_PARAMETER( pwszName );
  108. UNREFERENCED_PARAMETER( rvalue );
  109. UNREFERENCED_PARAMETER( cbBuf );
  110. return ERROR_SUCCESS;
  111. }
  112. virtual BOOL BApplyChanges(void);
  113. virtual void BuildPropList(IN OUT CClusPropList & rcpl);
  114. virtual const CObjectProperty * Pprops(void) const { return NULL; }
  115. virtual DWORD Cprops(void) const { return 0; }
  116. // Implementation
  117. protected:
  118. BOOL m_bBackPressed;
  119. const DWORD * m_pdwWizardHelpMap;
  120. BOOL m_bDoDetach;
  121. BOOL BBackPressed(void) const { return m_bBackPressed; }
  122. BOOL BWizard(void) const;
  123. HCLUSTER Hcluster(void) const;
  124. DWORD DwParseProperties(IN const CClusPropList & rcpl);
  125. DWORD DwSetCommonProps(IN const CClusPropList & rcpl);
  126. void SetHelpMask(IN DWORD dwMask) { m_dlghelp.SetHelpMask(dwMask); }
  127. CDialogHelp m_dlghelp;
  128. // Generated message map functions
  129. //{{AFX_MSG(CBasePropertyPage)
  130. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  131. afx_msg void OnDestroy();
  132. virtual BOOL OnInitDialog();
  133. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  134. afx_msg LRESULT OnCommandHelp(WPARAM wParam, LPARAM lParam);
  135. //}}AFX_MSG
  136. virtual afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  137. afx_msg void OnChangeCtrl();
  138. DECLARE_MESSAGE_MAP()
  139. }; //*** class CBasePropertyPage
  140. /////////////////////////////////////////////////////////////////////////////
  141. // CPageList
  142. /////////////////////////////////////////////////////////////////////////////
  143. typedef CList<CBasePropertyPage *, CBasePropertyPage *> CPageList;
  144. /////////////////////////////////////////////////////////////////////////////
  145. #endif // _BASEPAGE_H_