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.

141 lines
3.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: editorui.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _EDITORUI_H
  11. #define _EDITORUI_H
  12. #include "attredit.h"
  13. #include "snapdata.h"
  14. #include "aclpage.h"
  15. #include <initguid.h>
  16. #include "IAttrEdt.h"
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CADSIEditPropertyPage
  19. class CADSIEditPropertyPage : public CPropertyPageBase
  20. {
  21. // Construction
  22. public:
  23. CADSIEditPropertyPage();
  24. CADSIEditPropertyPage(CAttrList* pAttrList);
  25. virtual ~CADSIEditPropertyPage()
  26. {
  27. }
  28. // Used to initialize data that is needed in the UI
  29. //
  30. void SetClass(LPCWSTR sClass) { m_sClass = sClass; }
  31. void SetServer(LPCWSTR sServer) { m_sServer = sServer; }
  32. void SetPath(LPCWSTR sPath) { m_sPath = sPath; }
  33. void SetConnectionData(CConnectionData* pConnectData) { m_pConnectData = pConnectData; }
  34. void SetAttrList(CAttrList* pAttrList);
  35. void CopyAttrList(CAttrList* pAttrList);
  36. CAttrList* GetAttrList() { return m_pOldAttrList; }
  37. // Implementation
  38. protected:
  39. // Message map functions
  40. //
  41. virtual BOOL OnInitDialog();
  42. virtual BOOL OnApply();
  43. virtual void OnCancel();
  44. afx_msg void OnSelChangeAttrList();
  45. afx_msg void OnSelChangePropList();
  46. // Helper functions
  47. //
  48. void FillAttrList();
  49. void AddPropertiesToBox(BOOL bMand, BOOL bOpt);
  50. BOOL GetProperties();
  51. // Member data
  52. CString m_sPath;
  53. CString m_sClass;
  54. CString m_sServer;
  55. CConnectionData* m_pConnectData;
  56. CStringList m_sMandatoryAttrList;
  57. CStringList m_sOptionalAttrList;
  58. CAttrEditor m_attrEditor;
  59. CAttrList* m_pOldAttrList;
  60. // REVIEW_JEFFJON : since this is an imbedded member and its destructor deletes everything in the list,
  61. // we have to remove everything in the list that is also in m_pOldAttrList so that it
  62. // doesn't get deleted.
  63. CAttrList m_AttrList;
  64. BOOL m_bExisting;
  65. DECLARE_MESSAGE_MAP()
  66. };
  67. ///////////////////////////////////////////////////////////////////////////////
  68. // CADSIEditPropertyPageHolder
  69. class CADSIEditPropertyPageHolder : public CPropertyPageHolderBase
  70. {
  71. public:
  72. CADSIEditPropertyPageHolder(CADSIEditContainerNode* pRootDataNode, CTreeNode* pContainerNode,
  73. CComponentDataObject* pComponentData, LPCWSTR lpszClass, LPCWSTR lpszServer, LPCWSTR lpszPath);
  74. ~CADSIEditPropertyPageHolder()
  75. {
  76. if (m_pAclEditorPage != NULL)
  77. {
  78. delete m_pAclEditorPage;
  79. m_pAclEditorPage = NULL;
  80. }
  81. }
  82. HRESULT OnAddPage(int nPage, CPropertyPageBase* pPage);
  83. virtual CADSIEditContainerNode* GetContainerNode() { return m_pContainer; }
  84. private:
  85. CAclEditorPage* m_pAclEditorPage;
  86. CComPtr<IDsAttributeEditor> m_spIDsAttributeEditor;
  87. CString m_sPath;
  88. CComPtr<IADs> m_pADs;
  89. CADSIEditContainerNode* m_pContainer;
  90. };
  91. /////////////////////////////////////////////////////////////////////////////////////
  92. // CCreateWizPropertyPageHolder
  93. class CCreateWizPropertyPageHolder : public CPropertyPageHolderBase
  94. {
  95. public:
  96. CCreateWizPropertyPageHolder(CADSIEditContainerNode* pRootDataNode,
  97. CComponentDataObject* pComponentData,
  98. LPCWSTR lpszClass,
  99. LPCWSTR lpszServer,
  100. CAttrList* pAttrList);
  101. ~CCreateWizPropertyPageHolder()
  102. {
  103. }
  104. virtual CADSIEditContainerNode* GetContainerNode() { return m_pContainer; }
  105. private:
  106. CADSIEditPropertyPage m_propPage;
  107. CADSIEditContainerNode* m_pContainer;
  108. };
  109. #endif _EDITORUI_H