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.

110 lines
3.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: regdlg.h
  7. //
  8. // Contents: definition of CRegistryDialog
  9. //
  10. //----------------------------------------------------------------------------
  11. #if !defined(AFX_REGISTRYDIALOG_H__C84DDDBB_D7CA_11D0_9C69_00C04FB6C6FA__INCLUDED_)
  12. #define AFX_REGISTRYDIALOG_H__C84DDDBB_D7CA_11D0_9C69_00C04FB6C6FA__INCLUDED_
  13. #if _MSC_VER >= 1000
  14. #pragma once
  15. #endif // _MSC_VER >= 1000
  16. #include "snapmgr.h"
  17. #include "HelpDlg.h"
  18. // This structure is used by CResistryDialog to save the HKEY value
  19. // and enumeration state of a HTREEITEM
  20. typedef struct _tag_TI_KEYINFO
  21. {
  22. HKEY hKey; // HKEY value of this tree item
  23. bool Enum; // true if the item has already been enumerated
  24. } TI_KEYINFO, *LPTI_KEYINFO;
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CRegistryDialog dialog
  27. // Used to select a registry item. If the dialog returns IDOK
  28. // 'm_strReg' will contain the full path of the registry item.
  29. /////////////////////////////////////////////////////////////////////////////
  30. class CRegistryDialog : public CHelpDialog
  31. {
  32. // Construction
  33. public:
  34. void SetCookie(MMC_COOKIE cookie);
  35. void SetConsole(LPCONSOLE pConsole);
  36. void SetComponentData(CComponentDataImpl *pComponentData);
  37. void SetDataObj(LPDATAOBJECT pDataObj) { m_pDataObj = pDataObj; }
  38. void SetProfileInfo(PEDITTEMPLATE pspi, FOLDER_TYPES ft);
  39. void SetHandle(PVOID hDB) { m_dbHandle = hDB; };
  40. virtual ~CRegistryDialog();
  41. CRegistryDialog(); // standard constructor
  42. // Create a new TI_KEYINFO structure
  43. static LPTI_KEYINFO CreateKeyInfo(HKEY hKey = 0, bool Enum = 0);
  44. // Checks to see if strReg is a valid registry key
  45. BOOL IsValidRegPath(LPCTSTR strReg);
  46. // Add subkeys to a tree item as children.
  47. void EnumerateChildren(HTREEITEM hParent);
  48. // Makes the last item in the path visible.
  49. void MakePathVisible(LPCTSTR strReg);
  50. // Dialog Data
  51. //{{AFX_DATA(CRegistryDialog)
  52. enum { IDD = IDD_REGISTRY_DIALOG };
  53. CTreeCtrl m_tcReg;
  54. CString m_strReg;
  55. //}}AFX_DATA
  56. // Overrides
  57. // ClassWizard generated virtual function overrides
  58. //{{AFX_VIRTUAL(CRegistryDialog)
  59. protected:
  60. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  61. //}}AFX_VIRTUAL
  62. // Implementation
  63. protected:
  64. // Generated message map functions
  65. //{{AFX_MSG(CRegistryDialog)
  66. virtual void OnOK();
  67. virtual BOOL OnInitDialog();
  68. afx_msg void OnItemexpandingRegtree(NMHDR* pNMHDR, LRESULT* pResult);
  69. afx_msg void OnDeleteitemRegtree(NMHDR* pNMHDR, LRESULT* pResult);
  70. afx_msg void OnSelchangedRegtree(NMHDR* pNMHDR, LRESULT* pResult);
  71. afx_msg void OnChangeRegkey();
  72. afx_msg void OnSetFocus();
  73. //}}AFX_MSG
  74. DECLARE_MESSAGE_MAP()
  75. // Public data members
  76. public:
  77. PEDITTEMPLATE m_pTemplate;
  78. PVOID m_dbHandle;
  79. private:
  80. MMC_COOKIE m_cookie;
  81. CComponentDataImpl * m_pComponentData;
  82. LPCONSOLE m_pConsole;
  83. WTL::CImageList m_pIl; // The image list used
  84. // by the tree ctrl.
  85. LPDATAOBJECT m_pDataObj;
  86. BOOL m_bNoUpdate; // When we don't want the edit
  87. // control to be updated because
  88. // of a selection
  89. };
  90. //{{AFX_INSERT_LOCATION}}
  91. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  92. #endif // !defined(AFX_REGISTRYDIALOG_H__C84DDDBB_D7CA_11D0_9C69_00C04FB6C6FA__INCLUDED_)