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 St, Fifth Floor, Boston, MA 02110-1301, 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 MAX_NEW_KEY_LEN 128
40 #define PM_NEW_VALUE 2
41 #define PM_MODIFY_VALUE 3
44 #define HEM_SETDATA (WM_USER+0)
45 #define HEM_GETDATA (WM_USER+1)
47 /******************************************************************************/
50 OPTIONS_AUTO_REFRESH
= 0x01,
51 OPTIONS_READ_ONLY_MODE
= 0x02,
52 OPTIONS_CONFIRM_ON_DELETE
= 0x04,
53 OPTIONS_SAVE_ON_EXIT
= 0x08,
54 OPTIONS_DISPLAY_BINARY_DATA
= 0x10,
55 OPTIONS_VIEW_TREE_ONLY
= 0x20,
56 OPTIONS_VIEW_DATA_ONLY
= 0x40,
63 SEARCH_CONTENT
= 0x08,
70 int nFocusPanel
; /* 0: left 1: right */
73 WCHAR szPath
[MAX_PATH
];
75 extern ChildWnd
* g_pChildWnd
;
77 typedef struct tagLINE_INFO
85 /*******************************************************************************
88 extern HINSTANCE hInst
;
89 extern HWND hFrameWnd
;
90 extern HMENU hMenuFrame
;
91 extern HWND hStatusBar
;
92 extern HMENU hPopupMenus
;
94 extern enum OPTION_FLAGS Options
;
96 extern WCHAR szTitle
[];
97 extern const WCHAR szFrameClass
[];
98 extern const WCHAR szChildClass
[];
99 extern const WCHAR szHexEditClass
[];
100 extern WCHAR g_pszDefaultValueName
[];
102 extern DWORD g_columnToSort
;
103 extern BOOL g_invertSort
;
104 extern WCHAR
*g_currentPath
;
105 extern HKEY g_currentRootKey
;
107 /* Registry class names and their indexes */
108 extern const WCHAR
* reg_class_namesW
[];
109 #define INDEX_HKEY_LOCAL_MACHINE 0
110 #define INDEX_HKEY_USERS 1
111 #define INDEX_HKEY_CLASSES_ROOT 2
112 #define INDEX_HKEY_CURRENT_CONFIG 3
113 #define INDEX_HKEY_CURRENT_USER 4
114 #define INDEX_HKEY_DYN_DATA 5
119 extern void ShowAboutBox(HWND hWnd
);
122 extern LPWSTR
GetItemFullPath(HWND hwndTV
, HTREEITEM hItem
, BOOL bFull
);
123 extern LRESULT CALLBACK
ChildWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
126 extern LRESULT CALLBACK
FrameWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
127 extern void SetupStatusBar(HWND hWnd
, BOOL bResize
);
128 extern void UpdateStatusBar(void);
131 extern BOOL
update_listview_path(const WCHAR
*path
);
132 extern void format_value_data(HWND hwndLV
, int index
, DWORD type
, void *data
, DWORD size
);
133 extern int AddEntryToList(HWND hwndLV
, WCHAR
*Name
, DWORD dwValType
, void *ValBuf
, DWORD dwCount
, int pos
);
134 extern void OnGetDispInfo(NMLVDISPINFOW
*plvdi
);
135 extern HWND
CreateListView(HWND hwndParent
, UINT id
);
136 extern int CALLBACK
CompareFunc(LPARAM lParam1
, LPARAM lParam2
, LPARAM lParamSort
);
137 extern BOOL
RefreshListView(HWND hwndLV
, HKEY hKeyRoot
, LPCWSTR keyPath
, LPCWSTR highlightValue
);
138 extern HWND
StartValueRename(HWND hwndLV
);
139 extern LPWSTR
GetItemText(HWND hwndLV
, UINT item
);
140 extern LPCWSTR
GetValueName(HWND hwndLV
);
141 extern BOOL
ListWndNotifyProc(HWND hWnd
, WPARAM wParam
, LPARAM lParam
, BOOL
*Result
);
142 extern BOOL
IsDefaultValue(HWND hwndLV
, int i
);
145 extern HWND
CreateTreeView(HWND hwndParent
, LPWSTR pHostName
, UINT id
);
146 extern BOOL
RefreshTreeView(HWND hWndTV
);
147 extern BOOL
OnTreeExpanding(HWND hWnd
, NMTREEVIEWW
* pnmtv
);
148 extern LPWSTR
GetItemPath(HWND hwndTV
, HTREEITEM hItem
, HKEY
* phRootKey
);
149 extern BOOL
DeleteNode(HWND hwndTV
, HTREEITEM hItem
);
150 extern HTREEITEM
InsertNode(HWND hwndTV
, HTREEITEM hItem
, LPWSTR name
);
151 extern HWND
StartKeyRename(HWND hwndTV
);
152 extern HTREEITEM
FindPathInTree(HWND hwndTV
, LPCWSTR lpKeyName
);
153 extern HTREEITEM
FindNext(HWND hwndTV
, HTREEITEM hItem
, LPCWSTR sstring
, int mode
, int *row
);
156 extern BOOL
CreateKey(HWND hwnd
, HKEY hKeyRoot
, LPCWSTR keyPath
, LPWSTR newKeyName
);
157 extern BOOL
CreateValue(HWND hwnd
, HKEY hKeyRoot
, LPCWSTR keyPath
, DWORD valueType
, LPWSTR valueName
);
158 extern BOOL
ModifyValue(HWND hwnd
, HKEY hKeyRoot
, LPCWSTR keyPath
, LPCWSTR valueName
);
159 extern BOOL
DeleteKey(HWND hwnd
, HKEY hKeyRoot
, LPCWSTR keyPath
);
160 extern BOOL
DeleteValue(HWND hwnd
, HKEY hKeyRoot
, LPCWSTR keyPath
, LPCWSTR valueName
, BOOL showMessageBox
);
161 extern BOOL
RenameValue(HWND hwnd
, HKEY hRootKey
, LPCWSTR keyPath
, LPCWSTR oldName
, LPCWSTR newName
);
162 extern BOOL
RenameKey(HWND hwnd
, HKEY hRootKey
, LPCWSTR keyPath
, LPCWSTR newName
);
163 extern int WINAPIV
messagebox(HWND hwnd
, int buttons
, int titleId
, int resId
, ...);
166 extern void HexEdit_Register(void);
168 #endif /* __MAIN_H__ */