Fixed header dependencies to be fully compatible with the Windows
[wine/multimedia.git] / programs / regedit / main.h
blob69cdd9461d621b683a21d3fa55b66afd312f7bde
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 "windef.h"
81 #include "winbase.h"
82 #include "wingdi.h"
83 #include "winuser.h"
84 #include "winnls.h"
85 #include "commctrl.h"
86 #include "commdlg.h"
88 #ifdef REGEDIT_DECLARE_FUNCTIONS
89 #define d(x) typeof(x) *p##x = NULL;
90 #else
91 #define d(x) extern typeof(x) *p##x;
92 #endif
94 d(BeginDeferWindowPos)
95 d(BeginPaint)
96 d(CallWindowProcA)
97 d(CheckMenuItem)
98 d(CloseClipboard)
99 d(CommDlgExtendedError)
100 d(CreateStatusWindowA)
101 d(CreateWindowExA)
102 d(DefWindowProcA)
103 d(DeferWindowPos)
104 d(DeleteDC)
105 d(DeleteObject)
106 d(DestroyMenu)
107 d(DestroyWindow)
108 d(DialogBoxParamA)
109 d(DispatchMessageA)
110 d(EmptyClipboard)
111 d(EndDeferWindowPos)
112 d(EndPaint)
113 d(EndDialog)
114 d(FillRect)
115 d(GetCapture)
116 d(GetClientRect)
117 d(GetCursorPos)
118 d(GetDC)
119 d(GetDlgItem)
120 d(GetMenu)
121 d(GetMessageA)
122 d(GetOpenFileNameA)
123 d(GetSaveFileNameA)
124 d(GetStockObject)
125 d(GetSubMenu)
126 d(GetSystemMetrics)
127 d(ImageList_Add)
128 d(ImageList_Create)
129 d(ImageList_GetImageCount)
130 d(InitCommonControls)
131 d(InvertRect)
132 d(IsWindowVisible)
133 d(LoadAcceleratorsA)
134 d(LoadBitmapA)
135 d(LoadCursorA)
136 d(LoadIconA)
137 d(LoadImageA)
138 d(LoadMenuA)
139 d(LoadStringA)
140 d(MessageBeep)
141 d(MoveWindow)
142 d(OpenClipboard)
143 d(PostQuitMessage)
144 d(PrintDlgA)
145 d(RegisterClassExA)
146 d(RegisterClipboardFormatA)
147 d(ReleaseCapture)
148 d(ReleaseDC)
149 d(ScreenToClient)
150 d(SendMessageA)
151 d(SetCapture)
152 d(SetCursor)
153 d(SetFocus)
154 d(SetWindowLongA)
155 d(SetWindowTextA)
156 d(ShowWindow)
157 d(TranslateAccelerator)
158 d(TranslateMessage)
159 d(UpdateWindow)
160 d(WinHelpA)
161 d(wsprintfA)
163 #undef d
165 #define BeginDeferWindowPos pBeginDeferWindowPos
166 #define BeginPaint pBeginPaint
167 #define CallWindowProcA pCallWindowProcA
168 #define CheckMenuItem pCheckMenuItem
169 #define CloseClipboard pCloseClipboard
170 #define CommDlgExtendedError pCommDlgExtendedError
171 #define CreateStatusWindowA pCreateStatusWindowA
172 #define CreateWindowExA pCreateWindowExA
173 #define DefWindowProcA pDefWindowProcA
174 #define DeferWindowPos pDeferWindowPos
175 #define DeleteDC pDeleteDC
176 #define DeleteObject pDeleteObject
177 #define DestroyMenu pDestroyMenu
178 #define DestroyWindow pDestroyWindow
179 #define DialogBoxParamA pDialogBoxParamA
180 #define DispatchMessageA pDispatchMessageA
181 #define EmptyClipboard pEmptyClipboard
182 #define EndDeferWindowPos pEndDeferWindowPos
183 #define EndDialog pEndDialog
184 #define EndPaint pEndPaint
185 #define FillRect pFillRect
186 #define GetCapture pGetCapture
187 #define GetClientRect pGetClientRect
188 #define GetCursorPos pGetCursorPos
189 #define GetDC pGetDC
190 #define GetDlgItem pGetDlgItem
191 #define GetMenu pGetMenu
192 #define GetMessageA pGetMessageA
193 #define GetOpenFileNameA pGetOpenFileNameA
194 #define GetSaveFileNameA pGetSaveFileNameA
195 #define GetStockObject pGetStockObject
196 #define GetSubMenu pGetSubMenu
197 #define GetSystemMetrics pGetSystemMetrics
198 #define ImageList_Add pImageList_Add
199 #define ImageList_Create pImageList_Create
200 #define ImageList_GetImageCount pImageList_GetImageCount
201 #define InitCommonControls pInitCommonControls
202 #define InvertRect pInvertRect
203 #define IsWindowVisible pIsWindowVisible
204 #define LoadAcceleratorsA pLoadAcceleratorsA
205 #define LoadBitmapA pLoadBitmapA
206 #define LoadCursorA pLoadCursorA
207 #define LoadIconA pLoadIconA
208 #define LoadImageA pLoadImageA
209 #define LoadMenuA pLoadMenuA
210 #define LoadStringA pLoadStringA
211 #define MessageBeep pMessageBeep
212 #define MoveWindow pMoveWindow
213 #define OpenClipboard pOpenClipboard
214 #define PostQuitMessage pPostQuitMessage
215 #define PrintDlgA pPrintDlgA
216 #define RegisterClassExA pRegisterClassExA
217 #define RegisterClipboardFormatA pRegisterClipboardFormatA
218 #define ReleaseCapture pReleaseCapture
219 #define ReleaseDC pReleaseDC
220 #define ScreenToClient pScreenToClient
221 #define SendMessageA pSendMessageA
222 #define SetCapture pSetCapture
223 #define SetCursor pSetCursor
224 #define SetFocus pSetFocus
225 #define SetWindowLongA pSetWindowLongA
226 #define SetWindowTextA pSetWindowTextA
227 #define ShowWindow pShowWindow
228 #define TranslateAccelerator pTranslateAccelerator
229 #define TranslateMessage pTranslateMessage
230 #define UpdateWindow pUpdateWindow
231 #define WinHelpA pWinHelpA
232 #define wsprintfA pwsprintfA
234 #ifdef __cplusplus
236 #endif
238 /* about.c */
239 extern void ShowAboutBox(HWND hWnd);
241 /* childwnd.c */
242 extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
244 /* framewnd.c */
245 extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
246 extern void SetupStatusBar(HWND hWnd, BOOL bResize);
247 extern void UpdateStatusBar(void);
249 /* listview.c */
250 extern HWND CreateListView(HWND hwndParent, int id);
251 extern BOOL RefreshListView(HWND hwndTV, HKEY hKey, LPTSTR keyPath);
253 /* treeview.c */
254 extern HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id);
255 extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv);
256 extern HKEY FindRegRoot(HWND hwndTV, HTREEITEM hItem, LPTSTR keyPath, int* pPathLen, int max);
258 #endif /* __MAIN_H__ */