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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #define STATUS_WINDOW 2001
28 #define TREE_WINDOW 2002
29 #define LIST_WINDOW 2003
33 #define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
35 #define PM_MODIFYVALUE 0
38 #define MAX_NEW_KEY_LEN 128
40 #define WM_NOTIFY_REFLECT (WM_USER+1024)
43 #define HEXEDIT_CLASS TEXT("HexEdit")
44 #define HEM_SETDATA (WM_USER+0)
45 #define HEM_GETDATA (WM_USER+1)
47 extern HINSTANCE hInst;
49 /******************************************************************************/
52 OPTIONS_AUTO_REFRESH = 0x01,
53 OPTIONS_READ_ONLY_MODE = 0x02,
54 OPTIONS_CONFIRM_ON_DELETE = 0x04,
55 OPTIONS_SAVE_ON_EXIT = 0x08,
56 OPTIONS_DISPLAY_BINARY_DATA = 0x10,
57 OPTIONS_VIEW_TREE_ONLY = 0x20,
58 OPTIONS_VIEW_DATA_ONLY = 0x40,
65 int nFocusPanel; /* 0: left 1: right */
68 TCHAR szPath[MAX_PATH];
70 extern ChildWnd* g_pChildWnd;
72 /*******************************************************************************
75 extern HINSTANCE hInst;
76 extern HWND hFrameWnd;
77 extern HMENU hMenuFrame;
78 extern HWND hStatusBar;
79 extern HMENU hPopupMenus;
81 extern enum OPTION_FLAGS Options;
83 extern TCHAR szTitle[];
84 extern TCHAR szFrameClass[];
85 extern TCHAR szChildClass[];
86 extern LPCTSTR g_pszDefaultValueName;
89 extern void ShowAboutBox(HWND hWnd);
92 extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
95 extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
96 extern void SetupStatusBar(HWND hWnd, BOOL bResize);
97 extern void UpdateStatusBar(void);
100 extern HWND CreateListView(HWND hwndParent, int id);
101 extern BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR highlightValue);
102 extern HWND StartValueRename(HWND hwndLV);
103 extern LPCTSTR GetValueName(HWND hwndLV);
104 extern BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
105 extern BOOL IsDefaultValue(HWND hwndLV, int i);
108 extern HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id);
109 extern BOOL RefreshTreeView(HWND hWndTV);
110 extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
111 extern void OnTreeSelectionChanged(HWND hwndTV, HWND hwndLV, HTREEITEM hItem, BOOL bRefreshLV);
112 extern LPCTSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
113 extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
114 extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPTSTR name);
115 extern HWND StartKeyRename(HWND hwndTV);
118 extern BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPTSTR newKeyName);
119 extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, DWORD valueType, LPTSTR valueName);
120 extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName);
121 extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath);
122 extern BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName);
123 extern BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR oldName, LPCTSTR newName);
124 extern BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR newName);
127 extern void HexEdit_Register(void);
128 extern void HexEdit_Unregister(void);
130 #endif /* __MAIN_H__ */