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.

278 lines
7.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // GrpProp.cpp
  7. //
  8. // Abstract:
  9. // Definition of the group property sheet and pages.
  10. //
  11. // Author:
  12. // David Potter (davidp) May 14, 1996
  13. //
  14. // Revision History:
  15. //
  16. // Notes:
  17. //
  18. /////////////////////////////////////////////////////////////////////////////
  19. #ifndef _GRPPROP_H_
  20. #define _GRPPROP_H_
  21. /////////////////////////////////////////////////////////////////////////////
  22. // Include Files
  23. /////////////////////////////////////////////////////////////////////////////
  24. #ifndef _BASEPAGE_H_
  25. #include "BasePPag.h" // for CBasePropertyPage
  26. #endif
  27. #ifndef _BASESHT_H_
  28. #include "BasePSht.h" // for CBasePropertySheet
  29. #endif
  30. #ifndef _GROUP_H_
  31. #include "Group.h" // for CGroup
  32. #endif
  33. #ifndef _NODE_H_
  34. #include "Node.h" // for CNodeList
  35. #endif
  36. /////////////////////////////////////////////////////////////////////////////
  37. // Forward Class Declarations
  38. /////////////////////////////////////////////////////////////////////////////
  39. class CGroupGeneralPage;
  40. class CGroupFailoverPage;
  41. class CGroupFailbackPage;
  42. class CGroupPropSheet;
  43. /////////////////////////////////////////////////////////////////////////////
  44. // External Class Declarations
  45. /////////////////////////////////////////////////////////////////////////////
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CGroupGeneralPage dialog
  48. /////////////////////////////////////////////////////////////////////////////
  49. class CGroupGeneralPage : public CBasePropertyPage
  50. {
  51. DECLARE_DYNCREATE(CGroupGeneralPage)
  52. // Construction
  53. public:
  54. CGroupGeneralPage(void);
  55. virtual BOOL BInit(IN OUT CBaseSheet * psht);
  56. // Dialog Data
  57. //{{AFX_DATA(CGroupGeneralPage)
  58. enum { IDD = IDD_PP_GROUP_GENERAL };
  59. CEdit m_editDesc;
  60. CButton m_pbPrefOwnersModify;
  61. CListBox m_lbPrefOwners;
  62. CEdit m_editName;
  63. CString m_strName;
  64. CString m_strDesc;
  65. CString m_strState;
  66. CString m_strNode;
  67. //}}AFX_DATA
  68. CNodeList m_lpciPreferredOwners;
  69. const CNodeList & LpciPreferredOwners(void) const { return m_lpciPreferredOwners; }
  70. // Overrides
  71. // ClassWizard generate virtual function overrides
  72. //{{AFX_VIRTUAL(CGroupGeneralPage)
  73. public:
  74. virtual BOOL OnApply();
  75. protected:
  76. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  77. //}}AFX_VIRTUAL
  78. // Implementation
  79. protected:
  80. CGroupPropSheet * PshtGroup(void) { return (CGroupPropSheet *) Psht(); }
  81. CGroup * PciGroup(void) { return (CGroup *) Pci(); }
  82. void FillPrefOwners(void);
  83. // Generated message map functions
  84. //{{AFX_MSG(CGroupGeneralPage)
  85. afx_msg void OnModifyPreferredOwners();
  86. virtual BOOL OnInitDialog();
  87. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  88. afx_msg void OnDblClkPreferredOwners();
  89. //}}AFX_MSG
  90. afx_msg void OnProperties();
  91. DECLARE_MESSAGE_MAP()
  92. }; //*** class CGroupGeneralPage
  93. /////////////////////////////////////////////////////////////////////////////
  94. // CGroupFailoverPage dialog
  95. /////////////////////////////////////////////////////////////////////////////
  96. class CGroupFailoverPage : public CBasePropertyPage
  97. {
  98. DECLARE_DYNCREATE(CGroupFailoverPage)
  99. // Construction
  100. public:
  101. CGroupFailoverPage(void);
  102. virtual BOOL BInit(IN OUT CBaseSheet * psht);
  103. // Dialog Data
  104. //{{AFX_DATA(CGroupFailoverPage)
  105. enum { IDD = IDD_PP_GROUP_FAILOVER };
  106. CEdit m_editThreshold;
  107. CEdit m_editPeriod;
  108. //}}AFX_DATA
  109. DWORD m_nThreshold;
  110. DWORD m_nPeriod;
  111. // Overrides
  112. // ClassWizard generate virtual function overrides
  113. //{{AFX_VIRTUAL(CGroupFailoverPage)
  114. public:
  115. virtual BOOL OnApply();
  116. protected:
  117. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  118. //}}AFX_VIRTUAL
  119. // Implementation
  120. protected:
  121. CGroupPropSheet * PshtGroup(void) { return (CGroupPropSheet *) Psht(); }
  122. CGroup * PciGroup(void) { return (CGroup *) Pci(); }
  123. // Generated message map functions
  124. //{{AFX_MSG(CGroupFailoverPage)
  125. virtual BOOL OnInitDialog();
  126. //}}AFX_MSG
  127. DECLARE_MESSAGE_MAP()
  128. }; //*** class CGroupFailoverPage
  129. /////////////////////////////////////////////////////////////////////////////
  130. // CGroupFailbackPage dialog
  131. /////////////////////////////////////////////////////////////////////////////
  132. class CGroupFailbackPage : public CBasePropertyPage
  133. {
  134. DECLARE_DYNCREATE(CGroupFailbackPage)
  135. // Construction
  136. public:
  137. CGroupFailbackPage(void);
  138. virtual BOOL BInit(IN OUT CBaseSheet * psht);
  139. // Dialog Data
  140. //{{AFX_DATA(CGroupFailbackPage)
  141. enum { IDD = IDD_PP_GROUP_FAILBACK };
  142. CButton m_rbPreventFailback;
  143. CButton m_rbAllowFailback;
  144. CButton m_rbFBImmed;
  145. CButton m_rbFBWindow;
  146. CStatic m_staticFBWindow1;
  147. CStatic m_staticFBWindow2;
  148. CEdit m_editStart;
  149. CSpinButtonCtrl m_spinStart;
  150. CEdit m_editEnd;
  151. CSpinButtonCtrl m_spinEnd;
  152. //}}AFX_DATA
  153. CGAFT m_cgaft;
  154. BOOL m_bNoFailbackWindow;
  155. DWORD m_nStart;
  156. DWORD m_nEnd;
  157. // Overrides
  158. // ClassWizard generate virtual function overrides
  159. //{{AFX_VIRTUAL(CGroupFailbackPage)
  160. public:
  161. virtual BOOL OnApply();
  162. protected:
  163. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  164. //}}AFX_VIRTUAL
  165. // Implementation
  166. protected:
  167. CGroupPropSheet * PshtGroup(void) { return (CGroupPropSheet *) Psht(); }
  168. CGroup * PciGroup(void) { return (CGroup *) Pci(); }
  169. // Generated message map functions
  170. //{{AFX_MSG(CGroupFailbackPage)
  171. afx_msg void OnClickedPreventFailback(void);
  172. afx_msg void OnClickedAllowFailback(void);
  173. afx_msg void OnClickedFailbackImmediate(void);
  174. afx_msg void OnClickedFailbackInWindow(void);
  175. virtual BOOL OnInitDialog();
  176. //}}AFX_MSG
  177. DECLARE_MESSAGE_MAP()
  178. }; //*** class CGroupFailbackPage
  179. /////////////////////////////////////////////////////////////////////////////
  180. // CGroupPropSheet
  181. /////////////////////////////////////////////////////////////////////////////
  182. class CGroupPropSheet : public CBasePropertySheet
  183. {
  184. DECLARE_DYNAMIC(CGroupPropSheet)
  185. // Construction
  186. public:
  187. CGroupPropSheet(
  188. IN OUT CWnd * pParentWnd = NULL,
  189. IN UINT iSelectPage = 0
  190. );
  191. virtual BOOL BInit(
  192. IN OUT CClusterItem * pciCluster,
  193. IN IIMG iimgIcon
  194. );
  195. // Attributes
  196. protected:
  197. CBasePropertyPage * m_rgpages[3];
  198. // Pages
  199. CGroupGeneralPage m_pageGeneral;
  200. CGroupFailoverPage m_pageFailover;
  201. CGroupFailbackPage m_pageFailback;
  202. CGroupGeneralPage & PageGeneral(void) { return m_pageGeneral; }
  203. CGroupFailoverPage & PageFailover(void) { return m_pageFailover; }
  204. CGroupFailbackPage & PageFailback(void) { return m_pageFailback; }
  205. public:
  206. CGroup * PciGroup(void) const { return (CGroup *) Pci(); }
  207. virtual CBasePropertyPage ** Ppages(void);
  208. virtual int Cpages(void);
  209. // Operations
  210. public:
  211. // Overrides
  212. // ClassWizard generated virtual function overrides
  213. //{{AFX_VIRTUAL(CGroupPropSheet)
  214. //}}AFX_VIRTUAL
  215. // Implementation
  216. protected:
  217. // Generated message map functions
  218. //{{AFX_MSG(CGroupPropSheet)
  219. // NOTE - the ClassWizard will add and remove member functions here.
  220. //}}AFX_MSG
  221. DECLARE_MESSAGE_MAP()
  222. }; //*** class CGroupPropSheet
  223. /////////////////////////////////////////////////////////////////////////////
  224. #endif // _GRPPROP_H_