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.

306 lines
7.7 KiB

  1. #if !defined(AFX_ACTDLG_H__190377E2_727F_11D2_B499_00A0C9063765__INCLUDED_)
  2. #define AFX_ACTDLG_H__190377E2_727F_11D2_B499_00A0C9063765__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ActDlg.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CActionDlg dialog
  10. class CItemData;
  11. class CLogicalVolumeData;
  12. class CFreeSpaceData;
  13. class CActionDlg : public CDialog
  14. {
  15. // Construction
  16. public:
  17. CActionDlg(CObArray* parrVolumeData, UINT nIDTemplate = IDD_GENERIC_ACTION ,
  18. BOOL bChangeOrder = TRUE, CWnd* pParent = NULL); // standard constructor
  19. // Dialog Data
  20. //{{AFX_DATA(CActionDlg)
  21. enum { IDD = IDD_GENERIC_ACTION };
  22. CButton m_buttonDown;
  23. CButton m_buttonUp;
  24. CListCtrl m_listVol;
  25. //}}AFX_DATA
  26. // Overrides
  27. // ClassWizard generated virtual function overrides
  28. //{{AFX_VIRTUAL(CActionDlg)
  29. protected:
  30. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  31. //}}AFX_VIRTUAL
  32. // Protected data members
  33. protected:
  34. // Array of CItemData. The list of volumes to display in the "Members" list ctrl
  35. CObArray* m_parrVolumeData;
  36. // Should the user be allowed to change the order of the volumes in list-view m_listVol ?
  37. BOOL m_bChangeOrder;
  38. // Image lists for all list controls
  39. CImageList m_ImageListSmall; // Small (16x16) icons
  40. // Implementation
  41. protected:
  42. // Generated message map functions
  43. //{{AFX_MSG(CActionDlg)
  44. virtual BOOL OnInitDialog();
  45. afx_msg void OnDestroy();
  46. afx_msg void OnButtonUp();
  47. afx_msg void OnButtonDown();
  48. afx_msg void OnItemchangedListVolumes(NMHDR* pNMHDR, LRESULT* pResult);
  49. virtual void OnOK();
  50. afx_msg void OnKeydownListVolumes(NMHDR* pNMHDR, LRESULT* pResult);
  51. afx_msg void OnClickListVolumes(NMHDR* pNMHDR, LRESULT* pResult);
  52. //}}AFX_MSG
  53. DECLARE_MESSAGE_MAP()
  54. // Insert a item ( with the given data ) at a certain position in the given list ctrl
  55. BOOL InsertItem( CListCtrl& listCtrl, int iIndex, CItemData* pData );
  56. // Move an item from the old index to a new index in the given list ctrl
  57. BOOL MoveItem( CListCtrl& listCtrl, int iOldIndex, int iNewIndex );
  58. // Prepare the given control list to display volume information
  59. void ConfigureList ( CListCtrl& listCtrl );
  60. // Populate the given control list with the given volumes data
  61. // parrData should point to an array of CItemData objects
  62. void PopulateList ( CListCtrl& listCtrl, CObArray* parrData );
  63. };
  64. /////////////////////////////////////////////////////////////////////////////
  65. // CCreateStripeDlg dialog
  66. class CCreateStripeDlg : public CActionDlg
  67. {
  68. // Construction
  69. public:
  70. CCreateStripeDlg(CObArray* parrVolumeData, UINT nIDTemplate = IDD_CREATE_STRIPE ,CWnd* pParent = NULL); // standard constructor
  71. // Public data members
  72. public:
  73. // Dialog Data
  74. //{{AFX_DATA(CCreateStripeDlg)
  75. // enum { IDD = IDD_CREATE_STRIPE };
  76. CComboBox m_comboStripeSize;
  77. //}}AFX_DATA
  78. ULONG m_ulStripeSize;
  79. // Overrides
  80. // ClassWizard generated virtual function overrides
  81. //{{AFX_VIRTUAL(CCreateStripeDlg)
  82. protected:
  83. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  84. //}}AFX_VIRTUAL
  85. // Implementation
  86. protected:
  87. // Generated message map functions
  88. //{{AFX_MSG(CCreateStripeDlg)
  89. virtual BOOL OnInitDialog();
  90. virtual void OnOK();
  91. //}}AFX_MSG
  92. DECLARE_MESSAGE_MAP()
  93. };
  94. /////////////////////////////////////////////////////////////////////////////
  95. // CBreakDlg dialog
  96. class CBreakDlg : public CActionDlg
  97. {
  98. // Construction
  99. public:
  100. CBreakDlg( CLogicalVolumeData *pSetData, CObArray* parrMembersData,
  101. UINT nIDTemplate = IDD_BREAK , CWnd* pParent = NULL); // standard constructor
  102. // Dialog Data
  103. //{{AFX_DATA(CBreakDlg)
  104. enum { IDD = IDD_BREAK };
  105. CString m_staticSetName;
  106. //}}AFX_DATA
  107. int m_nWinnerIndex;
  108. // Overrides
  109. // ClassWizard generated virtual function overrides
  110. //{{AFX_VIRTUAL(CBreakDlg)
  111. protected:
  112. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  113. //}}AFX_VIRTUAL
  114. // Protected data members
  115. protected:
  116. // Pointer to the data of the set to be broken
  117. CLogicalVolumeData* m_pSetData;
  118. // The item having focus ( and selection )
  119. int m_nFocusedItem;
  120. // Implementation
  121. protected:
  122. // Generated message map functions
  123. //{{AFX_MSG(CBreakDlg)
  124. virtual BOOL OnInitDialog();
  125. virtual void OnOK();
  126. afx_msg void OnItemchangingListVolumes(NMHDR* pNMHDR, LRESULT* pResult);
  127. afx_msg void OnClickListVolumes(NMHDR* pNMHDR, LRESULT* pResult);
  128. //}}AFX_MSG
  129. DECLARE_MESSAGE_MAP()
  130. };
  131. /////////////////////////////////////////////////////////////////////////////
  132. // CSwapDlg dialog
  133. class CSwapDlg : public CActionDlg
  134. {
  135. // Construction
  136. public:
  137. CSwapDlg( CLogicalVolumeData *pParentData, CLogicalVolumeData *pMemberData,
  138. CObArray* parrReplacementsData, UINT nIDTemplate = IDD_SWAP , CWnd* pParent = NULL); // standard constructor
  139. // Dialog Data
  140. //{{AFX_DATA(CSwapDlg)
  141. enum { IDD = IDD_SWAP };
  142. CString m_staticTitle;
  143. //}}AFX_DATA
  144. int m_nReplacementIndex;
  145. // Overrides
  146. // ClassWizard generated virtual function overrides
  147. //{{AFX_VIRTUAL(CSwapDlg)
  148. protected:
  149. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  150. //}}AFX_VIRTUAL
  151. // Protected data members
  152. protected:
  153. // Pointer to the data of the parent set
  154. CLogicalVolumeData* m_pParentData;
  155. // Pointer to the data of the member to replace
  156. CLogicalVolumeData* m_pMemberData;
  157. // Implementation
  158. protected:
  159. // Generated message map functions
  160. //{{AFX_MSG(CSwapDlg)
  161. virtual BOOL OnInitDialog();
  162. virtual void OnOK();
  163. //}}AFX_MSG
  164. DECLARE_MESSAGE_MAP()
  165. };
  166. /////////////////////////////////////////////////////////////////////////////
  167. // CAssignDlg dialog
  168. class CAssignDlg : public CDialog
  169. {
  170. // Construction
  171. public:
  172. CAssignDlg(CItemData* pVolumeData, CWnd* pParent = NULL); // standard constructor
  173. // Dialog Data
  174. //{{AFX_DATA(CAssignDlg)
  175. enum { IDD = IDD_ASSIGN_DRIVE_LETTER };
  176. CComboBox m_comboDriveLetters;
  177. CString m_staticName;
  178. int m_radioAssign;
  179. //}}AFX_DATA
  180. BOOL m_bAssign;
  181. TCHAR m_cDriveLetter;
  182. // Overrides
  183. // ClassWizard generated virtual function overrides
  184. //{{AFX_VIRTUAL(CAssignDlg)
  185. protected:
  186. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  187. //}}AFX_VIRTUAL
  188. // Implementation
  189. protected:
  190. // Data of the volume
  191. CItemData* m_pVolumeData;
  192. // Generated message map functions
  193. //{{AFX_MSG(CAssignDlg)
  194. virtual BOOL OnInitDialog();
  195. virtual void OnOK();
  196. afx_msg void OnRadioAssign();
  197. afx_msg void OnRadioDoNotAssign();
  198. //}}AFX_MSG
  199. DECLARE_MESSAGE_MAP()
  200. BOOL FillDriveLettersCombo();
  201. };
  202. /////////////////////////////////////////////////////////////////////////////
  203. // CCreatePartitionDlg dialog
  204. class CCreatePartitionDlg : public CDialog
  205. {
  206. // Construction
  207. public:
  208. CCreatePartitionDlg( CFreeSpaceData* pFreeData, LONGLONG llPartStartOffset,
  209. BOOL bExtendedPartition = FALSE, CWnd* pParent = NULL); // standard constructor
  210. // Dialog Data
  211. //{{AFX_DATA(CCreatePartitionDlg)
  212. enum { IDD = IDD_CREATE_PARTITION };
  213. CStatic m_staticPartitionType;
  214. CEdit m_editPartitionSize;
  215. CStatic m_staticMinimumSize;
  216. CStatic m_staticMaximumSize;
  217. //}}AFX_DATA
  218. LONGLONG m_llPartitionSize;
  219. // Overrides
  220. // ClassWizard generated virtual function overrides
  221. //{{AFX_VIRTUAL(CCreatePartitionDlg)
  222. protected:
  223. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  224. //}}AFX_VIRTUAL
  225. // Implementation
  226. protected:
  227. // Pointer to the data of the free space
  228. CFreeSpaceData* m_pFreeData;
  229. // Partition starting offset
  230. LONGLONG m_llPartStartOffset;
  231. // Should we create an extended partition?
  232. BOOL m_bExtendedPartition;
  233. // Generated message map functions
  234. //{{AFX_MSG(CCreatePartitionDlg)
  235. virtual BOOL OnInitDialog();
  236. virtual void OnOK();
  237. //}}AFX_MSG
  238. DECLARE_MESSAGE_MAP()
  239. };
  240. //{{AFX_INSERT_LOCATION}}
  241. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  242. #endif // !defined(AFX_ACTDLG_H__190377E2_727F_11D2_B499_00A0C9063765__INCLUDED_)