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.

183 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1994-1998 Microsoft Corporation
  3. Module Name :
  4. idlg.h
  5. Abstract:
  6. Inheritance Dialog Definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #ifndef __IDLG__H__
  14. #define __IDLG__H__
  15. class COMDLL CInheritanceDlg : public CDialog
  16. /*++
  17. Class Description:
  18. Inheritance override checker dialog.
  19. Public Interface:
  20. CInheritanceDlg : Constructor
  21. IsEmpty : Check to see if there are overrides.
  22. Notes:
  23. There are two constructors. One which assumes GetDataPaths() has
  24. already been called, and which takes the results from GetDataPaths()
  25. as a CStringList, and a second constructor which will make the GetDataPaths
  26. automatically.
  27. In either case, the calling process should check IsEmpty() right after
  28. constructing the dialog to see if DoModal() needs to be called. If
  29. IsEmpty() returns TRUE, there's no reason to call DoModal().
  30. --*/
  31. {
  32. //
  33. // fWrite parameter helper definitions
  34. //
  35. #define FROM_WRITE_PROPERTY (TRUE)
  36. #define FROM_DELETE_PROPERTY (FALSE)
  37. //
  38. // Construction
  39. //
  40. public:
  41. //
  42. // Standard constructor (GetDataPaths() already called)
  43. //
  44. CInheritanceDlg(
  45. IN DWORD dwMetaID,
  46. IN BOOL fWrite,
  47. IN LPCTSTR lpstrServer,
  48. IN LPCTSTR lpstrMetaRoot,
  49. IN CStringList & strlMetaChildNodes,
  50. IN LPCTSTR lpstrPropertyName = NULL,
  51. IN CWnd * pParent = NULL
  52. );
  53. //
  54. // Constructor which will call GetDataPaths()
  55. //
  56. CInheritanceDlg(
  57. IN DWORD dwMetaID,
  58. IN BOOL fWrite,
  59. IN LPCTSTR lpstrServer,
  60. IN LPCTSTR lpstrMetaRoot,
  61. IN LPCTSTR lpstrPropertyName = NULL,
  62. IN CWnd * pParent = NULL
  63. );
  64. //
  65. // Constructor which will call GetDataPaths(), and which
  66. // does not use the predefined property table unless
  67. // fTryToFindInTable is TRUE, in which case it will attempt
  68. // to use the table first, and use the specified parameters
  69. // only if the property ID is not found in the table.
  70. //
  71. CInheritanceDlg(
  72. IN BOOL fTryToFindInTable,
  73. IN DWORD dwMDIdentifier,
  74. IN DWORD dwMDAttributes,
  75. IN DWORD dwMDUserType,
  76. IN DWORD dwMDDataType,
  77. IN LPCTSTR lpstrPropertyName,
  78. IN BOOL fWrite,
  79. IN LPCTSTR lpstrServer,
  80. IN LPCTSTR lpstrMetaRoot,
  81. IN CWnd * pParent = NULL
  82. );
  83. //
  84. // Access
  85. //
  86. public:
  87. virtual INT_PTR DoModal();
  88. //
  89. // Check to see if there's a reason to continue displaying
  90. // the dialog.
  91. //
  92. BOOL IsEmpty() const { return m_fEmpty; }
  93. //
  94. // Dialog Data
  95. //
  96. protected:
  97. //{{AFX_DATA(CInheritanceDlg)
  98. enum { IDD = IDD_INHERITANCE };
  99. CListBox m_list_ChildNodes;
  100. //}}AFX_DATA
  101. //
  102. // Overrides
  103. //
  104. protected:
  105. // ClassWizard generated virtual function overrides
  106. //{{AFX_VIRTUAL(CInheritanceDlg)
  107. protected:
  108. virtual void DoDataExchange(CDataExchange * pDX);
  109. //}}AFX_VIRTUAL
  110. //
  111. // Implementation
  112. //
  113. protected:
  114. // Generated message map functions
  115. //{{AFX_MSG(CInheritanceDlg)
  116. virtual BOOL OnInitDialog();
  117. virtual void OnOK();
  118. afx_msg void OnButtonSelectAll();
  119. //}}AFX_MSG
  120. DECLARE_MESSAGE_MAP()
  121. void Initialize();
  122. HRESULT GetDataPaths();
  123. BOOL FriendlyInstance(
  124. IN CString & strMetaRoot,
  125. OUT CString & strFriendly
  126. );
  127. CString & CleanDescendantPath(
  128. IN OUT CString & strMetaPath
  129. );
  130. private:
  131. BOOL m_fWrite;
  132. BOOL m_fEmpty;
  133. BOOL m_fHasInstanceInMaster;
  134. BOOL m_fUseTable;
  135. DWORD m_dwMDIdentifier;
  136. DWORD m_dwMDAttributes;
  137. DWORD m_dwMDUserType;
  138. DWORD m_dwMDDataType;
  139. CString m_strMetaRoot;
  140. CString m_strServer;
  141. CString m_strPropertyName;
  142. CStringListEx m_strlMetaChildNodes;
  143. CMetaKey m_mk;
  144. };
  145. #endif // __IDLG__H__