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.

238 lines
6.2 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // GrpWiz.h
  7. //
  8. // Abstract:
  9. // Definition of the CCreateGroupWizard class and all pages specific
  10. // to a group wizard.
  11. //
  12. // Implementation File:
  13. // GrpWiz.cpp
  14. //
  15. // Author:
  16. // David Potter (davidp) July 22, 1996
  17. //
  18. // Revision History:
  19. //
  20. // Notes:
  21. //
  22. /////////////////////////////////////////////////////////////////////////////
  23. #ifndef _GRPWIZ_H_
  24. #define _GRPWIZ_H_
  25. /////////////////////////////////////////////////////////////////////////////
  26. // Include Files
  27. /////////////////////////////////////////////////////////////////////////////
  28. #ifndef _BASEWIZ_H_
  29. #include "BaseWiz.h" // for CBaseWizard
  30. #endif
  31. #ifndef _BASEWPAG_H_
  32. #include "BaseWPag.h" // for CBaseWizardPage
  33. #endif
  34. #ifndef _LCPRPAGE_H_
  35. #include "LCPrWPag.h" // for CListCtrlPairWizPage
  36. #endif
  37. /////////////////////////////////////////////////////////////////////////////
  38. // Forward Class Declarations
  39. /////////////////////////////////////////////////////////////////////////////
  40. class CNewGroupNamePage;
  41. class CCreateGroupWizard;
  42. /////////////////////////////////////////////////////////////////////////////
  43. // External Class Declarations
  44. /////////////////////////////////////////////////////////////////////////////
  45. class CGroup;
  46. class CClusterDoc;
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CNewGroupNamePage property page
  49. /////////////////////////////////////////////////////////////////////////////
  50. class CNewGroupNamePage : public CBaseWizardPage
  51. {
  52. DECLARE_DYNCREATE(CNewGroupNamePage)
  53. // Construction
  54. public:
  55. CNewGroupNamePage(void);
  56. // Dialog Data
  57. //{{AFX_DATA(CNewGroupNamePage)
  58. enum { IDD = IDD_WIZ_GROUP_NAME };
  59. CEdit m_editDesc;
  60. CEdit m_editName;
  61. CString m_strName;
  62. CString m_strDesc;
  63. //}}AFX_DATA
  64. // Overrides
  65. // ClassWizard generate virtual function overrides
  66. //{{AFX_VIRTUAL(CNewGroupNamePage)
  67. public:
  68. virtual BOOL OnSetActive();
  69. protected:
  70. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  71. //}}AFX_VIRTUAL
  72. virtual BOOL BApplyChanges(void);
  73. // Implementation
  74. protected:
  75. CCreateGroupWizard * PwizGroup(void) const { return (CCreateGroupWizard *) Pwiz(); }
  76. // Generated message map functions
  77. //{{AFX_MSG(CNewGroupNamePage)
  78. afx_msg void OnChangeGroupName();
  79. afx_msg void OnKillFocusGroupName();
  80. //}}AFX_MSG
  81. DECLARE_MESSAGE_MAP()
  82. }; //*** class CNewGroupNamePage
  83. /////////////////////////////////////////////////////////////////////////////
  84. // CNewGroupOwnersPage dialog
  85. /////////////////////////////////////////////////////////////////////////////
  86. class CNewGroupOwnersPage : public CListCtrlPairWizPage
  87. {
  88. DECLARE_DYNCREATE(CNewGroupOwnersPage)
  89. // Construction
  90. public:
  91. CNewGroupOwnersPage(void);
  92. // Dialog Data
  93. //{{AFX_DATA(CNewGroupOwnersPage)
  94. enum { IDD = IDD_WIZ_PREFERRED_OWNERS };
  95. CStatic m_staticNote;
  96. //}}AFX_DATA
  97. // Callback functions
  98. static void CALLBACK GetColumn(
  99. IN OUT CObject * pobj,
  100. IN int iItem,
  101. IN int icol,
  102. IN OUT CDialog * pdlg,
  103. OUT CString & rstr,
  104. OUT int * piimg
  105. );
  106. static BOOL CALLBACK BDisplayProperties(IN OUT CObject * pobj);
  107. // Overrides
  108. // ClassWizard generate virtual function overrides
  109. //{{AFX_VIRTUAL(CNewGroupOwnersPage)
  110. protected:
  111. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  112. //}}AFX_VIRTUAL
  113. virtual BOOL BApplyChanges(void);
  114. // Implementation
  115. protected:
  116. CCreateGroupWizard * PwizGroup(void) const { return (CCreateGroupWizard *) Pwiz(); }
  117. CGroup * PciGroup(void) const;
  118. BOOL BInitLists(void);
  119. // Generated message map functions
  120. //{{AFX_MSG(CNewGroupOwnersPage)
  121. virtual BOOL OnInitDialog();
  122. //}}AFX_MSG
  123. DECLARE_MESSAGE_MAP()
  124. }; //*** class CNewGroupOwnersPage
  125. /////////////////////////////////////////////////////////////////////////////
  126. // CCreateGroupWizard
  127. /////////////////////////////////////////////////////////////////////////////
  128. class CCreateGroupWizard : public CBaseWizard
  129. {
  130. friend class CNewGroupNamePage;
  131. friend class CNewGroupOwnersPage;
  132. DECLARE_DYNAMIC(CCreateGroupWizard)
  133. // Construction
  134. public:
  135. CCreateGroupWizard(IN OUT CClusterDoc * pdoc, IN OUT CWnd * pParentWnd);
  136. BOOL BInit(void);
  137. // Attributes
  138. protected:
  139. CWizPage m_rgpages[2];
  140. CClusterDoc * m_pdoc;
  141. CString m_strName;
  142. CString m_strDescription;
  143. CStringList m_lstrPreferredOwners;
  144. public:
  145. CClusterDoc * Pdoc(void) const { return m_pdoc; }
  146. const CString & StrName(void) const { return m_strName; }
  147. const CString & StrDescription(void) const { return m_strDescription; }
  148. const CStringList & LstrPreferredOwners(void) const { return m_lstrPreferredOwners; }
  149. // Operations
  150. public:
  151. BOOL BSetName(IN const CString & rstrName);
  152. BOOL BSetDescription(IN const CString & rstrDescription);
  153. // Overrides
  154. protected:
  155. virtual void OnCancel(void);
  156. virtual CWizPage * Ppages(void);
  157. virtual int Cpages(void);
  158. // ClassWizard generated virtual function overrides
  159. //{{AFX_VIRTUAL(CCreateGroupWizard)
  160. //}}AFX_VIRTUAL
  161. // Implementation
  162. public:
  163. virtual ~CCreateGroupWizard(void);
  164. protected:
  165. CNewGroupNamePage m_pageName;
  166. CNewGroupOwnersPage m_pageOwners;
  167. CStringList m_lstrAllNodes;
  168. CGroup * m_pciGroup;
  169. BOOL m_bCreated;
  170. const CStringList & LstrAllNodes(void) const { return m_lstrAllNodes; }
  171. CGroup * PciGroup(void) const { return m_pciGroup; }
  172. BOOL BCreated(void) const { return m_bCreated; }
  173. // Generated message map functions
  174. protected:
  175. //{{AFX_MSG(CCreateGroupWizard)
  176. //}}AFX_MSG
  177. DECLARE_MESSAGE_MAP()
  178. }; //*** class CCreateGroupWizard
  179. /////////////////////////////////////////////////////////////////////////////
  180. // Inline Function Definitions
  181. /////////////////////////////////////////////////////////////////////////////
  182. inline CGroup * CNewGroupOwnersPage::PciGroup(void) const
  183. {
  184. ASSERT_VALID(PwizGroup());
  185. return PwizGroup()->PciGroup();
  186. }
  187. /////////////////////////////////////////////////////////////////////////////
  188. #endif // _GRPWIZ_H_