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.

135 lines
3.9 KiB

  1. #if !defined __BROWSER_H__
  2. #define __BROWSER_H__
  3. #include "cproppg.h"
  4. #define PAGETYPE_DOMAINS 0
  5. #define PAGETYPE_SITES 1
  6. #define PAGETYPE_COMPUTERS 2
  7. #define PAGETYPE_ALL 3
  8. #define ITEMTYPE_SITE 0
  9. #define ITEMTYPE_DOMAIN 1
  10. #define ITEMTYPE_OU 2
  11. #define ITEMTYPE_GPO 3
  12. #define ITEMTYPE_FOREST 4
  13. #define CLASSNAME_OU L"organizationalUnit"
  14. #define CLASSNAME_DOMAIN L"domainDNS"
  15. typedef struct tag_MYLISTEL
  16. {
  17. LPWSTR szName;
  18. LPWSTR szData;
  19. UINT nType;
  20. BOOL bDisabled;
  21. } MYLISTEL;
  22. #define BUTTONSIZE 16
  23. #define SMALLICONSIZE 16
  24. #define LARGEICONSIZE 32
  25. #define INDENT 10
  26. typedef struct tag_LOOKDATA
  27. {
  28. LPWSTR szName;
  29. UINT nIndent;
  30. UINT nType;
  31. LPWSTR szData;
  32. struct tag_LOOKDATA * pSibling;
  33. struct tag_LOOKDATA * pParent;
  34. struct tag_LOOKDATA * pChild;
  35. } LOOKDATA;
  36. LOOKDATA * BuildDomainList(WCHAR * szServerName);
  37. VOID FreeDomainInfo (LOOKDATA * pEntry);
  38. class CBrowserPP : CHlprPropPage
  39. {
  40. // Construction
  41. public:
  42. CBrowserPP();
  43. HPROPSHEETPAGE Initialize(DWORD dwPageType, LPGPOBROWSEINFO pGBI, void ** ppActive);
  44. ~CBrowserPP();
  45. INT AddElement(MYLISTEL * pel, INT index);
  46. public:
  47. virtual BOOL OnSetActive();
  48. virtual BOOL OnApply();
  49. protected:
  50. // Implementation
  51. protected:
  52. virtual BOOL OnInitDialog();
  53. void OnContextMenu(LPARAM lParam);
  54. void OnDoubleclickList(NMHDR* pNMHDR, LRESULT* pResult);
  55. void OnDetails();
  56. void OnList();
  57. void OnLargeicons();
  58. void OnSmallicons();
  59. void OnArrangeAuto();
  60. void OnArrangeByname();
  61. void OnArrangeBytype();
  62. void OnDelete();
  63. void OnEdit();
  64. void OnNew();
  65. void OnProperties();
  66. void OnRefresh();
  67. void OnRename();
  68. void OnTopLineupicons();
  69. void OnBeginlabeleditList(NMHDR* pNMHDR, LRESULT* pResult);
  70. void OnEndlabeleditList(NMHDR* pNMHDR, LRESULT* pResult);
  71. void OnBegindragList(NMHDR* pNMHDR, LRESULT* pResult);
  72. void OnDeleteitemList(NMHDR* pNMHDR, LRESULT* pResult);
  73. void OnColumnclickList(NMHDR* pNMHDR, LRESULT* pResult);
  74. void OnKeyDownList(NMHDR * pNMHDR, LRESULT * pResult);
  75. void OnItemChanged(NMHDR * pNMHDR, LRESULT * pResult);
  76. void OnComboChange();
  77. void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  78. void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
  79. int CompareItem(LPCOMPAREITEMSTRUCT lpCompareItemStruct);
  80. void DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct);
  81. void RefreshDomains(void);
  82. void RefreshSites(void);
  83. void RefreshAll(void);
  84. void SetButtonState(void);
  85. LPOLESTR GetCurrentObject();
  86. LPOLESTR GetCurrentDomain();
  87. BOOL IsCurrentObjectAForest();
  88. BOOL FillDomainList();
  89. BOOL SetInitialOU();
  90. BOOL FillSitesList();
  91. BOOL AddGPOsForDomain();
  92. BOOL AddGPOsLinkedToObject();
  93. void TrimComboBox();
  94. BOOL AddChildContainers();
  95. BOOL CreateLink(LPOLESTR szObject, LPOLESTR szContainer);
  96. BOOL DeleteLink(LPOLESTR szObject, LPOLESTR szContainer);
  97. LPTSTR GetFullPath (LPTSTR lpGPO, HWND hParent);
  98. virtual BOOL DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  99. HWND m_hwndDlg;
  100. HWND m_hList;
  101. HWND m_hCombo;
  102. HWND m_toolbar;
  103. HIMAGELIST m_ilSmall;
  104. HIMAGELIST m_ilLarge;
  105. void ** m_ppActive;
  106. LPGPOBROWSEINFO m_pGBI;
  107. DWORD m_dwPageType;
  108. WCHAR m_szTitle[256];
  109. LOOKDATA * m_pPrevSel;
  110. LPTSTR m_szServerName;
  111. LPTSTR m_szDomainName;
  112. BOOL DoBackButton();
  113. BOOL DoNewGPO();
  114. BOOL DeleteGPO();
  115. BOOL DoRotateView();
  116. };
  117. #endif // __BROWSE_H__