Implemented ReportEventA/W.
[wine/testsucceed.git] / programs / regedit / main.h
blobc34509527f7419acb7aef973d505ff0811f16fc6
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __MAIN_H__
22 #define __MAIN_H__
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
29 #include "resource.h"
32 #define STATUS_WINDOW 2001
33 #define TREE_WINDOW 2002
34 #define LIST_WINDOW 2003
36 #define MAX_LOADSTRING 100
37 #define SPLIT_WIDTH 5
38 #define MAX_NAME_LEN 500
41 /******************************************************************************/
43 enum OPTION_FLAGS {
44 OPTIONS_AUTO_REFRESH = 0x01,
45 OPTIONS_READ_ONLY_MODE = 0x02,
46 OPTIONS_CONFIRM_ON_DELETE = 0x04,
47 OPTIONS_SAVE_ON_EXIT = 0x08,
48 OPTIONS_DISPLAY_BINARY_DATA = 0x10,
49 OPTIONS_VIEW_TREE_ONLY = 0x20,
50 OPTIONS_VIEW_DATA_ONLY = 0x40,
53 typedef struct {
54 HWND hWnd;
55 HWND hTreeWnd;
56 HWND hListWnd;
57 int nFocusPanel; /* 0: left 1: right */
58 int nSplitPos;
59 WINDOWPLACEMENT pos;
60 TCHAR szPath[MAX_PATH];
61 } ChildWnd;
63 /*******************************************************************************
64 * Global Variables:
66 extern HINSTANCE hInst;
67 extern HWND hFrameWnd;
68 extern HMENU hMenuFrame;
69 extern HWND hStatusBar;
70 extern HFONT hFont;
71 extern enum OPTION_FLAGS Options;
73 extern TCHAR szTitle[];
74 extern TCHAR szFrameClass[];
75 extern TCHAR szChildClass[];
77 /*******************************************************************************
78 * Dynamically load all things that depend on user32.dll
80 #include <stdarg.h>
82 #include "windef.h"
83 #include "winbase.h"
84 #include "wingdi.h"
85 #include "winuser.h"
86 #include "winnls.h"
87 #include "commctrl.h"
88 #include "commdlg.h"
90 #ifdef REGEDIT_DECLARE_FUNCTIONS
91 #define d(x) typeof(x) *p##x = NULL;
92 #else
93 #define d(x) extern typeof(x) *p##x;
94 #endif
96 d(BeginDeferWindowPos)
97 d(BeginPaint)
98 d(CallWindowProcA)
99 d(CheckMenuItem)
100 d(CloseClipboard)
101 d(CommDlgExtendedError)
102 d(CreateStatusWindowA)
103 d(CreateWindowExA)
104 d(DefWindowProcA)
105 d(DeferWindowPos)
106 d(DeleteDC)
107 d(DeleteObject)
108 d(DestroyMenu)
109 d(DestroyWindow)
110 d(DialogBoxParamA)
111 d(DispatchMessageA)
112 d(EmptyClipboard)
113 d(EndDeferWindowPos)
114 d(EndPaint)
115 d(EndDialog)
116 d(FillRect)
117 d(GetCapture)
118 d(GetClientRect)
119 d(GetCursorPos)
120 d(GetDC)
121 d(GetDlgItem)
122 d(GetMenu)
123 d(GetMessageA)
124 d(GetOpenFileNameA)
125 d(GetSaveFileNameA)
126 d(GetStockObject)
127 d(GetSubMenu)
128 d(GetSystemMetrics)
129 d(ImageList_Add)
130 d(ImageList_Create)
131 d(ImageList_GetImageCount)
132 d(InitCommonControls)
133 d(InvertRect)
134 d(IsWindowVisible)
135 d(LoadAcceleratorsA)
136 d(LoadBitmapA)
137 d(LoadCursorA)
138 d(LoadIconA)
139 d(LoadImageA)
140 d(LoadMenuA)
141 d(LoadStringA)
142 d(MessageBeep)
143 d(MoveWindow)
144 d(OpenClipboard)
145 d(PostQuitMessage)
146 d(PrintDlgA)
147 d(RegisterClassExA)
148 d(RegisterClipboardFormatA)
149 d(ReleaseCapture)
150 d(ReleaseDC)
151 d(ScreenToClient)
152 d(SendMessageA)
153 d(SetCapture)
154 d(SetCursor)
155 d(SetFocus)
156 d(SetWindowLongA)
157 d(SetWindowTextA)
158 d(ShowWindow)
159 d(TranslateAccelerator)
160 d(TranslateMessage)
161 d(UpdateWindow)
162 d(WinHelpA)
163 d(wsprintfA)
165 #undef d
167 #define BeginDeferWindowPos pBeginDeferWindowPos
168 #define BeginPaint pBeginPaint
169 #define CallWindowProcA pCallWindowProcA
170 #define CheckMenuItem pCheckMenuItem
171 #define CloseClipboard pCloseClipboard
172 #define CommDlgExtendedError pCommDlgExtendedError
173 #define CreateStatusWindowA pCreateStatusWindowA
174 #define CreateWindowExA pCreateWindowExA
175 #define DefWindowProcA pDefWindowProcA
176 #define DeferWindowPos pDeferWindowPos
177 #define DeleteDC pDeleteDC
178 #define DeleteObject pDeleteObject
179 #define DestroyMenu pDestroyMenu
180 #define DestroyWindow pDestroyWindow
181 #define DialogBoxParamA pDialogBoxParamA
182 #define DispatchMessageA pDispatchMessageA
183 #define EmptyClipboard pEmptyClipboard
184 #define EndDeferWindowPos pEndDeferWindowPos
185 #define EndDialog pEndDialog
186 #define EndPaint pEndPaint
187 #define FillRect pFillRect
188 #define GetCapture pGetCapture
189 #define GetClientRect pGetClientRect
190 #define GetCursorPos pGetCursorPos
191 #define GetDC pGetDC
192 #define GetDlgItem pGetDlgItem
193 #define GetMenu pGetMenu
194 #define GetMessageA pGetMessageA
195 #define GetOpenFileNameA pGetOpenFileNameA
196 #define GetSaveFileNameA pGetSaveFileNameA
197 #define GetStockObject pGetStockObject
198 #define GetSubMenu pGetSubMenu
199 #define GetSystemMetrics pGetSystemMetrics
200 #define ImageList_Add pImageList_Add
201 #define ImageList_Create pImageList_Create
202 #define ImageList_GetImageCount pImageList_GetImageCount
203 #define InitCommonControls pInitCommonControls
204 #define InvertRect pInvertRect
205 #define IsWindowVisible pIsWindowVisible
206 #define LoadAcceleratorsA pLoadAcceleratorsA
207 #define LoadBitmapA pLoadBitmapA
208 #define LoadCursorA pLoadCursorA
209 #define LoadIconA pLoadIconA
210 #define LoadImageA pLoadImageA
211 #define LoadMenuA pLoadMenuA
212 #define LoadStringA pLoadStringA
213 #define MessageBeep pMessageBeep
214 #define MoveWindow pMoveWindow
215 #define OpenClipboard pOpenClipboard
216 #define PostQuitMessage pPostQuitMessage
217 #define PrintDlgA pPrintDlgA
218 #define RegisterClassExA pRegisterClassExA
219 #define RegisterClipboardFormatA pRegisterClipboardFormatA
220 #define ReleaseCapture pReleaseCapture
221 #define ReleaseDC pReleaseDC
222 #define ScreenToClient pScreenToClient
223 #define SendMessageA pSendMessageA
224 #define SetCapture pSetCapture
225 #define SetCursor pSetCursor
226 #define SetFocus pSetFocus
227 #define SetWindowLongA pSetWindowLongA
228 #define SetWindowTextA pSetWindowTextA
229 #define ShowWindow pShowWindow
230 #define TranslateAccelerator pTranslateAccelerator
231 #define TranslateMessage pTranslateMessage
232 #define UpdateWindow pUpdateWindow
233 #define WinHelpA pWinHelpA
234 #define wsprintfA pwsprintfA
236 #ifdef __cplusplus
238 #endif
240 /* about.c */
241 extern void ShowAboutBox(HWND hWnd);
243 /* childwnd.c */
244 extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
246 /* framewnd.c */
247 extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
248 extern void SetupStatusBar(HWND hWnd, BOOL bResize);
249 extern void UpdateStatusBar(void);
251 /* listview.c */
252 extern HWND CreateListView(HWND hwndParent, int id);
253 extern BOOL RefreshListView(HWND hwndTV, HKEY hKey, LPTSTR keyPath);
255 /* treeview.c */
256 extern HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id);
257 extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
258 extern HKEY FindRegRoot(HWND hwndTV, HTREEITEM hItem, LPTSTR keyPath, int* pPathLen, int max);
260 #endif /* __MAIN_H__ */