extrac32: Create directory for extracted file if need.
[wine.git] / programs / regedit / main.h
blob8b6eede01abe5691758a3d546bf38bd643a559e3
1 /*
2 * Regedit definitions
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
21 #ifndef __MAIN_H__
22 #define __MAIN_H__
24 #include "resource.h"
27 #define STATUS_WINDOW 2001
28 #define TREE_WINDOW 2002
29 #define LIST_WINDOW 2003
31 #define SPLIT_WIDTH 5
33 #define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
35 #define PM_MODIFYVALUE 0
36 #define PM_NEW 1
38 #define MAX_NEW_KEY_LEN 128
40 #define WM_NOTIFY_REFLECT (WM_USER+1024)
42 /* HexEdit Class */
43 #define HEM_SETDATA (WM_USER+0)
44 #define HEM_GETDATA (WM_USER+1)
46 extern HINSTANCE hInst;
48 /******************************************************************************/
50 enum OPTION_FLAGS {
51 OPTIONS_AUTO_REFRESH = 0x01,
52 OPTIONS_READ_ONLY_MODE = 0x02,
53 OPTIONS_CONFIRM_ON_DELETE = 0x04,
54 OPTIONS_SAVE_ON_EXIT = 0x08,
55 OPTIONS_DISPLAY_BINARY_DATA = 0x10,
56 OPTIONS_VIEW_TREE_ONLY = 0x20,
57 OPTIONS_VIEW_DATA_ONLY = 0x40,
60 enum SEARCH_FLAGS {
61 SEARCH_WHOLE = 0x01,
62 SEARCH_KEYS = 0x02,
63 SEARCH_VALUES = 0x04,
64 SEARCH_CONTENT = 0x08,
67 typedef struct {
68 HWND hWnd;
69 HWND hTreeWnd;
70 HWND hListWnd;
71 int nFocusPanel; /* 0: left 1: right */
72 int nSplitPos;
73 WINDOWPLACEMENT pos;
74 WCHAR szPath[MAX_PATH];
75 } ChildWnd;
76 extern ChildWnd* g_pChildWnd;
78 /*******************************************************************************
79 * Global Variables:
81 extern HINSTANCE hInst;
82 extern HWND hFrameWnd;
83 extern HMENU hMenuFrame;
84 extern HWND hStatusBar;
85 extern HMENU hPopupMenus;
86 extern HFONT hFont;
87 extern enum OPTION_FLAGS Options;
89 extern WCHAR szTitle[];
90 extern const WCHAR szFrameClass[];
91 extern const WCHAR szChildClass[];
92 extern const WCHAR szHexEditClass[];
93 extern WCHAR g_pszDefaultValueName[];
95 /* Registry class names and their indexes */
96 extern const WCHAR* reg_class_namesW[];
97 #define INDEX_HKEY_LOCAL_MACHINE 0
98 #define INDEX_HKEY_USERS 1
99 #define INDEX_HKEY_CLASSES_ROOT 2
100 #define INDEX_HKEY_CURRENT_CONFIG 3
101 #define INDEX_HKEY_CURRENT_USER 4
102 #define INDEX_HKEY_DYN_DATA 5
106 /* about.c */
107 extern void ShowAboutBox(HWND hWnd);
109 /* childwnd.c */
110 extern LPWSTR GetItemFullPath(HWND hwndTV, HTREEITEM hItem, BOOL bFull);
111 extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
113 /* framewnd.c */
114 extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
115 extern void SetupStatusBar(HWND hWnd, BOOL bResize);
116 extern void UpdateStatusBar(void);
118 /* listview.c */
119 extern HWND CreateListView(HWND hwndParent, UINT id);
120 extern BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highlightValue);
121 extern HWND StartValueRename(HWND hwndLV);
122 extern LPWSTR GetItemText(HWND hwndLV, UINT item);
123 extern LPCWSTR GetValueName(HWND hwndLV);
124 extern BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
125 extern BOOL IsDefaultValue(HWND hwndLV, int i);
127 /* treeview.c */
128 extern HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id);
129 extern BOOL RefreshTreeView(HWND hWndTV);
130 extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEWW* pnmtv);
131 extern LPWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
132 extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
133 extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
134 extern HWND StartKeyRename(HWND hwndTV);
135 extern HTREEITEM FindPathInTree(HWND hwndTV, LPCWSTR lpKeyName);
136 extern HTREEITEM FindNext(HWND hwndTV, HTREEITEM hItem, LPCWSTR sstring, int mode, int *row);
138 /* edit.c */
139 extern BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPWSTR newKeyName);
140 extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueType, LPWSTR valueName);
141 extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName);
142 extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
143 extern BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName, BOOL showMessageBox);
144 extern BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR oldName, LPCWSTR newName);
145 extern BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName);
146 extern void error(HWND hwnd, INT resId, ...);
148 /* hexedit.c */
149 extern void HexEdit_Register(void);
151 #endif /* __MAIN_H__ */