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.

177 lines
4.8 KiB

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