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.

332 lines
8.1 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. loadrecs.h
  7. dialog to load records from the datbase, includes by owner
  8. and by record type.
  9. FILE HISTORY:
  10. */
  11. #ifndef _LOADRECS_H
  12. #define _LOADRECS_H
  13. #ifndef _DIALOG_H
  14. #include "..\common\dialog.h"
  15. #endif
  16. #ifndef _LISTVIEW_H
  17. #include "listview.h"
  18. #endif
  19. #if _MSC_VER >= 1000
  20. #pragma once
  21. #endif // _MSC_VER >= 1000
  22. /////////////////////////////////////////////////////////////////////////////
  23. // COwnerPage dialog
  24. class COwnerPage : public CPropertyPage
  25. {
  26. // Construction
  27. public:
  28. COwnerPage(); // standard constructor
  29. ~COwnerPage();
  30. DWORD GetOwnerForApi();
  31. // Dialog Data
  32. //{{AFX_DATA(COwnerPage)
  33. enum { IDD = IDD_OWNER_FILTER };
  34. CButton m_btnEnableCache;
  35. CListCtrlExt m_listOwner;
  36. //}}AFX_DATA
  37. int HandleSort(LPARAM lParam1, LPARAM lParam2);
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(COwnerPage)
  41. public:
  42. virtual BOOL OnKillActive();
  43. virtual BOOL OnSetActive();
  44. protected:
  45. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  46. //}}AFX_VIRTUAL
  47. // Implementation
  48. protected:
  49. // Generated message map functions
  50. //{{AFX_MSG(COwnerPage)
  51. virtual BOOL OnInitDialog();
  52. virtual void OnOK();
  53. afx_msg void OnColumnclickListOwner(NMHDR* pNMHDR, LRESULT* pResult);
  54. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  55. afx_msg void OnButtonSelectAll();
  56. afx_msg void OnButtonUnselectAll();
  57. afx_msg void OnButtonLocal();
  58. afx_msg void OnEnableCaching();
  59. afx_msg void OnItemchangedListOwner(NMHDR* pNMHDR, LRESULT* pResult);
  60. //}}AFX_MSG
  61. DECLARE_MESSAGE_MAP()
  62. private:
  63. CImageList m_ImageList;
  64. void FillOwnerInfo();
  65. CString GetVersionInfo(LONG lLowWord, LONG lHighWord);
  66. void Sort(int nCol);
  67. protected:
  68. int m_nSortColumn;
  69. BOOL m_aSortOrder[COLUMN_MAX];
  70. UINT m_nChecked;
  71. public:
  72. CServerInfoArray m_ServerInfoArray;
  73. CDWordArray m_dwaOwnerFilter;
  74. BYTE *m_pbaDirtyFlags;
  75. BOOL m_bDirtyOwners;
  76. public:
  77. DWORD * GetHelpMap() { return WinsGetHelpMap(COwnerPage::IDD); }
  78. };
  79. /////////////////////////////////////////////////////////////////////////////
  80. // CFilterPage dialog
  81. typedef struct
  82. {
  83. BYTE bFlags;
  84. DWORD dwType;
  85. } tDirtyFlags;
  86. class CFilterPage : public CPropertyPage
  87. {
  88. // Construction
  89. public:
  90. CFilterPage(); // standard constructor
  91. ~CFilterPage();
  92. // Dialog Data
  93. //{{AFX_DATA(CFilterPage)
  94. enum { IDD = IDD_FILTER_SELECT };
  95. CButton m_btnEnableCache;
  96. CButton m_buttonDelete;
  97. CButton m_buttonModify;
  98. CListCtrlExt m_listType;
  99. //}}AFX_DATA
  100. // Overrides
  101. // ClassWizard generated virtual function overrides
  102. //{{AFX_VIRTUAL(CFilterPage)
  103. public:
  104. virtual BOOL OnKillActive();
  105. virtual BOOL OnSetActive();
  106. virtual void OnOK();
  107. protected:
  108. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  109. //}}AFX_VIRTUAL
  110. // Implementation
  111. protected:
  112. // Generated message map functions
  113. //{{AFX_MSG(CFilterPage)
  114. virtual BOOL OnInitDialog();
  115. afx_msg void OnItemchangedList1(NMHDR* pNMHDR, LRESULT* pResult);
  116. afx_msg void OnButtonAddType();
  117. afx_msg void OnButtonModifyType();
  118. afx_msg void OnButtonDelete();
  119. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  120. afx_msg void OnButtonSelectAll();
  121. afx_msg void OnButtonUnselectAll();
  122. afx_msg void OnEnableCaching();
  123. //}}AFX_MSG
  124. DECLARE_MESSAGE_MAP()
  125. public:
  126. CTypeFilterInfoArray m_arrayTypeFilter;
  127. NameTypeMapping * m_pNameTypeMap;
  128. BOOL m_bDirtyTypes;
  129. tDirtyFlags *m_pbaDirtyFlags;
  130. UINT m_nDirtyFlags;
  131. private:
  132. CImageList m_ImageList;
  133. void FillTypeInfo();
  134. void CheckItems();
  135. int GetIndex(DWORD dwFound);
  136. BOOL IsDefaultType(DWORD dwType);
  137. public:
  138. DWORD * GetHelpMap() { return WinsGetHelpMap(CFilterPage::IDD); }
  139. };
  140. /////////////////////////////////////////////////////////////////////////////
  141. // CNameTypeDlg dialog
  142. class CNameTypeDlg : public CBaseDialog
  143. {
  144. // Construction
  145. public:
  146. CNameTypeDlg(CWnd* pParent = NULL); // standard constructor
  147. // Dialog Data
  148. //{{AFX_DATA(CNameTypeDlg)
  149. enum { IDD = IDD_NAME_TYPE };
  150. CEdit m_editDescription;
  151. CEdit m_editId;
  152. CString m_strDescription;
  153. CString m_strId;
  154. //}}AFX_DATA
  155. BOOL m_fCreate;
  156. DWORD m_dwId;
  157. NameTypeMapping * m_pNameTypeMap;
  158. // Overrides
  159. // ClassWizard generated virtual function overrides
  160. //{{AFX_VIRTUAL(CNameTypeDlg)
  161. protected:
  162. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  163. //}}AFX_VIRTUAL
  164. // Implementation
  165. protected:
  166. // Generated message map functions
  167. //{{AFX_MSG(CNameTypeDlg)
  168. virtual BOOL OnInitDialog();
  169. virtual void OnOK();
  170. //}}AFX_MSG
  171. DECLARE_MESSAGE_MAP()
  172. public:
  173. virtual DWORD * GetHelpMap() { return WinsGetHelpMap(CNameTypeDlg::IDD);};//return NULL;}
  174. };
  175. /////////////////////////////////////////////////////////////////////////////
  176. // CIPAddrPage dialog
  177. class CIPAddrPage : public CPropertyPage
  178. {
  179. DECLARE_DYNCREATE(CIPAddrPage)
  180. // Construction
  181. public:
  182. CIPAddrPage();
  183. ~CIPAddrPage();
  184. LPCOLESTR GetNameForApi();
  185. DWORD GetIPMaskForFilter(UINT nMask);
  186. // Dialog Data
  187. //{{AFX_DATA(CIPAddrPage)
  188. enum { IDD = IDD_FILTER_IPADDR };
  189. CButton m_ckbMatchCase;
  190. CButton m_ckbIPMask;
  191. CButton m_ckbName;
  192. CButton m_ckbIPAddr;
  193. CButton m_btnEnableCache;
  194. CEdit m_editName;
  195. CIPAddressCtrl m_ctrlIPAddress;
  196. CIPAddressCtrl m_ctrlIPMask;
  197. //}}AFX_DATA
  198. BOOL m_bFilterName;
  199. BOOL m_bMatchCase;
  200. CString m_strName;
  201. BOOL m_bDirtyName;
  202. BOOL m_bFilterIpAddr;
  203. CDWordArray m_dwaIPAddrs;
  204. BOOL m_bDirtyAddr;
  205. BOOL m_bFilterIpMask;
  206. CDWordArray m_dwaIPMasks;
  207. BOOL m_bDirtyMask;
  208. // Overrides
  209. // ClassWizard generate virtual function overrides
  210. //{{AFX_VIRTUAL(CIPAddrPage)
  211. public:
  212. virtual void OnOK();
  213. virtual BOOL OnKillActive();
  214. virtual BOOL OnSetActive();
  215. protected:
  216. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  217. //}}AFX_VIRTUAL
  218. // Implementation
  219. protected:
  220. // Generated message map functions
  221. //{{AFX_MSG(CIPAddrPage)
  222. virtual BOOL OnInitDialog();
  223. afx_msg void OnCheckIpaddr();
  224. afx_msg void OnCheckName();
  225. afx_msg void OnEnableCaching();
  226. afx_msg void OnCheckIpmask();
  227. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  228. //}}AFX_MSG
  229. DECLARE_MESSAGE_MAP()
  230. public:
  231. DWORD * GetHelpMap() { return WinsGetHelpMap(CIPAddrPage::IDD); }
  232. };
  233. /////////////////////////////////////////////////////////////////////////////
  234. // CLoadRecords
  235. #define RESOURCE_API_MASK 0x00000003
  236. #define RESOURCE_API_NAME 0x00000001
  237. #define RESOURCE_API_OWNER 0x00000002
  238. #define RESOURCE_CACHE 0x00000004
  239. class CLoadRecords : public CPropertySheet
  240. {
  241. DECLARE_DYNAMIC(CLoadRecords)
  242. // Construction
  243. public:
  244. CLoadRecords(UINT nIDCaption);
  245. VOID ResetFiltering();
  246. // Attributes
  247. public:
  248. COwnerPage m_pageOwners;
  249. CFilterPage m_pageTypes;
  250. CIPAddrPage m_pageIpAddress;
  251. UINT m_nActivePage;
  252. BOOL m_bCaching;
  253. BOOL m_bEnableCache;
  254. // Operations
  255. public:
  256. // Overrides
  257. // ClassWizard generated virtual function overrides
  258. //{{AFX_VIRTUAL(CLoadRecords)
  259. public:
  260. virtual BOOL OnInitDialog();
  261. //}}AFX_VIRTUAL
  262. // Implementation
  263. public:
  264. virtual ~CLoadRecords();
  265. // Generated message map functions
  266. protected:
  267. //{{AFX_MSG(CLoadRecords)
  268. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  269. //}}AFX_MSG
  270. DECLARE_MESSAGE_MAP()
  271. };
  272. /////////////////////////////////////////////////////////////////////////////
  273. //{{AFX_INSERT_LOCATION}}
  274. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  275. #endif _LOADRECS_H