4 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 #define STATUS_WINDOW 2001
27 #define TREE_WINDOW 2002
28 #define LIST_WINDOW 2003
33 #define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
35 #define PM_MODIFYVALUE 0
37 #define PM_TREECONTEXT 2
40 #define MAX_NEW_KEY_LEN 128
42 extern HINSTANCE hInst
;
44 /******************************************************************************/
47 OPTIONS_AUTO_REFRESH
= 0x01,
48 OPTIONS_READ_ONLY_MODE
= 0x02,
49 OPTIONS_CONFIRM_ON_DELETE
= 0x04,
50 OPTIONS_SAVE_ON_EXIT
= 0x08,
51 OPTIONS_DISPLAY_BINARY_DATA
= 0x10,
52 OPTIONS_VIEW_TREE_ONLY
= 0x20,
53 OPTIONS_VIEW_DATA_ONLY
= 0x40,
62 int nFocusPanel
; /* 0: left 1: right */
65 TCHAR szPath
[MAX_PATH
];
67 extern ChildWnd
* g_pChildWnd
;
69 /*******************************************************************************
72 extern HINSTANCE hInst
;
73 extern HWND hFrameWnd
;
74 extern HMENU hMenuFrame
;
75 extern HWND hStatusBar
;
76 extern HMENU hPopupMenus
;
78 extern enum OPTION_FLAGS Options
;
80 extern TCHAR szTitle
[];
81 extern TCHAR szFrameClass
[];
82 extern TCHAR szChildClass
[];
84 extern const TCHAR g_szGeneralRegKey
[];
87 extern void ShowAboutBox(HWND hWnd
);
90 extern LRESULT CALLBACK
ChildWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
93 extern void ErrorMessageBox(HWND hWnd
, LPCTSTR title
, DWORD code
);
96 extern void FindDialog(HWND hWnd
);
97 extern BOOL
FindNext(HWND hWnd
);
100 extern LRESULT CALLBACK
FrameWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
101 extern void SetupStatusBar(HWND hWnd
, BOOL bResize
);
102 extern void UpdateStatusBar(void);
103 extern BOOL
CopyKeyName(HWND hWnd
, HKEY hRootKey
, LPCTSTR keyName
);
104 extern BOOL
ExportRegistryFile(HWND hWnd
);
107 extern HWND
CreateListView(HWND hwndParent
, HMENU id
);
108 extern BOOL
RefreshListView(HWND hwndLV
, HKEY hKey
, LPCTSTR keyPath
);
109 extern LPCTSTR
GetValueName(HWND hwndLV
, int iStartAt
);
110 extern BOOL
ListWndNotifyProc(HWND hWnd
, WPARAM wParam
, LPARAM lParam
, BOOL
*Result
);
111 extern BOOL
IsDefaultValue(HWND hwndLV
, int i
);
114 extern HWND
CreateTreeView(HWND hwndParent
, LPTSTR pHostName
, HMENU id
);
115 extern BOOL
RefreshTreeView(HWND hWndTV
);
116 extern BOOL
RefreshTreeItem(HWND hwndTV
, HTREEITEM hItem
);
117 extern BOOL
OnTreeExpanding(HWND hWnd
, NMTREEVIEW
* pnmtv
);
118 extern LPCTSTR
GetItemPath(HWND hwndTV
, HTREEITEM hItem
, HKEY
* phRootKey
);
119 extern BOOL
DeleteNode(HWND hwndTV
, HTREEITEM hItem
);
120 extern HTREEITEM
InsertNode(HWND hwndTV
, HTREEITEM hItem
, LPTSTR name
);
121 extern HWND
StartKeyRename(HWND hwndTV
);
122 extern BOOL
CreateNewKey(HWND hwndTV
, HTREEITEM hItem
);
123 extern BOOL
SelectNode(HWND hwndTV
, LPCTSTR keyPath
);
124 extern void DestroyTreeView( void );
125 extern void DestroyListView( HWND hwndLV
);
126 extern void DestroyMainMenu( void );
129 extern BOOL
ModifyValue(HWND hwnd
, HKEY hKey
, LPCTSTR valueName
, BOOL EditBin
);
130 extern BOOL
DeleteKey(HWND hwnd
, HKEY hKeyRoot
, LPCTSTR keyPath
);
131 extern LONG
RenameKey(HKEY hKey
, LPCTSTR lpSubKey
, LPCTSTR lpNewName
);
132 extern LONG
RenameValue(HKEY hKey
, LPCTSTR lpSubKey
, LPCTSTR lpDestValue
, LPCTSTR lpSrcValue
);
133 extern LONG
QueryStringValue(HKEY hKey
, LPCTSTR lpSubKey
, LPCTSTR lpValueName
, LPTSTR pszBuffer
, DWORD dwBufferLen
);
134 extern BOOL
GetKeyName(LPTSTR pszDest
, size_t iDestLength
, HKEY hRootKey
, LPCTSTR lpSubKey
);
137 extern BOOL
RegKeyEditPermissions(HWND hWndOwner
, HKEY hKey
, LPCTSTR lpMachine
, LPCTSTR lpKeyName
);