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.

157 lines
3.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: createwiz.h
  8. //
  9. //--------------------------------------------------------------------------
  10. /////////////////////////////////////////////////////////////////////////
  11. // createwiz.h
  12. #ifndef _CREATEWIZ_H
  13. #define _CREATEWIZ_H
  14. #include "attredit.h"
  15. #include "editor.h"
  16. enum
  17. {
  18. first,
  19. middle,
  20. last
  21. };
  22. //////////////////////////////////////////////////////////////////////////
  23. // CCreateClassPage
  24. class CCreateClassPage : public CPropertyPageBase
  25. {
  26. public:
  27. CCreateClassPage(CADSIEditContainerNode* pCurrentNode);
  28. ~CCreateClassPage();
  29. virtual BOOL OnSetActive();
  30. virtual LRESULT OnWizardNext();
  31. virtual BOOL OnInitDialog();
  32. protected:
  33. void FillList();
  34. CADSIEditContainerNode* m_pCurrentNode;
  35. CString m_sClass;
  36. DECLARE_MESSAGE_MAP()
  37. };
  38. ////////////////////////////////////////////////////////////////////////
  39. // CCreateAttributePage
  40. class CCreateAttributePage : public CPropertyPageBase
  41. {
  42. public:
  43. CCreateAttributePage(UINT nID, CADSIAttr* pAttr);
  44. ~CCreateAttributePage();
  45. virtual BOOL OnSetActive();
  46. virtual BOOL OnInitDialog();
  47. virtual LRESULT OnWizardNext();
  48. virtual void OnEditChangeValue();
  49. CADSIAttr* GetAttr() { return m_pAttr; }
  50. virtual void GetValue(CString& sVal);
  51. void SetSyntax(CString sAttr);
  52. void SetADsType(CString sProp);
  53. protected:
  54. CADSIAttr* m_pAttr;
  55. CStringList m_sAttrValue;
  56. BOOL m_bInitialized;
  57. BOOL m_bNumber;
  58. long m_lMaxRange;
  59. long m_lMinRange;
  60. DECLARE_MESSAGE_MAP()
  61. };
  62. ////////////////////////////////////////////////////////////////////////
  63. // CCreateFinishPage
  64. class CCreateFinishPage : public CPropertyPageBase
  65. {
  66. public:
  67. CCreateFinishPage(UINT nID);
  68. ~CCreateFinishPage();
  69. virtual BOOL OnSetActive();
  70. virtual BOOL OnInitDialog();
  71. virtual BOOL OnWizardFinish();
  72. virtual void OnMore();
  73. protected:
  74. BOOL m_bInitialized;
  75. DECLARE_MESSAGE_MAP()
  76. };
  77. /////////////////////////////////////////////////////////////////////////
  78. // CPropertyPageList
  79. typedef CList<CPropertyPageBase*,CPropertyPageBase*> CPropertyPageListBase;
  80. class CPropertyPageList : public CPropertyPageListBase
  81. {
  82. public:
  83. void RemoveAll()
  84. {
  85. while (!IsEmpty())
  86. delete RemoveTail();
  87. }
  88. };
  89. ////////////////////////////////////////////////////////////////////////
  90. // CCreatePageHolder
  91. class CCreatePageHolder : public CPropertyPageHolderBase
  92. {
  93. public:
  94. CCreatePageHolder(CContainerNode* pContNode, CADSIEditContainerNode* pNode,
  95. CComponentDataObject* pComponentData);
  96. ~CCreatePageHolder();
  97. void AddAttrPage(CString sClass); //Adds the dynamic attribute pages
  98. void RemoveAllPages();
  99. void GetMandatoryAttr(CString sClass, CStringList* sMandList);
  100. void RemovePresetAttr(CStringList* sMandList);
  101. void SetName(CString sName) { m_sName = m_sNamingAttr.GetHead() + _T("=") + sName; }
  102. void GetNamingAttribute(CString& sNamingAttr) { sNamingAttr = m_sNamingAttr.GetHead(); }
  103. void GetSchemaPath(CString sClass, CString& schema);
  104. HRESULT EscapePath(CString& sEscapedName, const CString& sName);
  105. void GetDN(PWSTR pwszName, CString& sDN);
  106. CAttrList* GetAttrList() { return &m_AttrList; }
  107. BOOL OnFinish();
  108. void OnMore();
  109. protected:
  110. CPropertyPageList m_pageList;
  111. CCreateClassPage* m_pClassPage;
  112. CString m_sClass;
  113. CString m_sName;
  114. CStringList m_sNamingAttr;
  115. CAttrList m_AttrList;
  116. CADSIEditContainerNode* m_pCurrentNode;
  117. CComponentDataObject* m_pComponentData;
  118. };
  119. #endif _CREATEWIZ_H