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.

173 lines
4.7 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. ) { return ERROR_SUCCESS; }
  106. virtual BOOL BApplyChanges(void);
  107. virtual void BuildPropList(IN OUT CClusPropList & rcpl);
  108. virtual const CObjectProperty * Pprops(void) const { return NULL; }
  109. virtual DWORD Cprops(void) const { return 0; }
  110. // Implementation
  111. protected:
  112. BOOL m_bBackPressed;
  113. const DWORD * m_pdwWizardHelpMap;
  114. BOOL m_bDoDetach;
  115. BOOL BBackPressed(void) const { return m_bBackPressed; }
  116. BOOL BWizard(void) const;
  117. HCLUSTER Hcluster(void) const;
  118. DWORD DwParseProperties(IN const CClusPropList & rcpl);
  119. DWORD DwSetCommonProps(IN const CClusPropList & rcpl);
  120. void SetHelpMask(IN DWORD dwMask) { m_dlghelp.SetHelpMask(dwMask); }
  121. CDialogHelp m_dlghelp;
  122. // Generated message map functions
  123. //{{AFX_MSG(CBasePropertyPage)
  124. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  125. afx_msg void OnDestroy();
  126. virtual BOOL OnInitDialog();
  127. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  128. afx_msg LRESULT OnCommandHelp(WPARAM wParam, LPARAM lParam);
  129. //}}AFX_MSG
  130. virtual afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  131. afx_msg void OnChangeCtrl();
  132. DECLARE_MESSAGE_MAP()
  133. }; //*** class CBasePropertyPage
  134. /////////////////////////////////////////////////////////////////////////////
  135. // CPageList
  136. /////////////////////////////////////////////////////////////////////////////
  137. typedef CList<CBasePropertyPage *, CBasePropertyPage *> CPageList;
  138. /////////////////////////////////////////////////////////////////////////////
  139. #endif // _BASEPAGE_H_