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
32 #define STATUS_WINDOW 2001
33 #define TREE_WINDOW 2002
34 #define LIST_WINDOW 2003
36 #define MAX_LOADSTRING 100
38 #define MAX_NAME_LEN 500
41 /******************************************************************************/
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,
57 int nFocusPanel
; /* 0: left 1: right */
60 TCHAR szPath
[MAX_PATH
];
63 /*******************************************************************************
66 extern HINSTANCE hInst
;
67 extern HWND hFrameWnd
;
68 extern HMENU hMenuFrame
;
69 extern HWND hStatusBar
;
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
85 #ifdef REGEDIT_DECLARE_FUNCTIONS
86 #define d(x) typeof(x) *p##x = NULL;
88 #define d(x) extern typeof(x) *p##x;
91 d(BeginDeferWindowPos
)
96 d(CommDlgExtendedError
)
97 d(CreateStatusWindowA
)
126 d(ImageList_GetImageCount
)
127 d(InitCommonControls
)
143 d(RegisterClipboardFormatA
)
154 d(TranslateAccelerator
)
162 #define BeginDeferWindowPos pBeginDeferWindowPos
163 #define BeginPaint pBeginPaint
164 #define CallWindowProcA pCallWindowProcA
165 #define CheckMenuItem pCheckMenuItem
166 #define CloseClipboard pCloseClipboard
167 #define CommDlgExtendedError pCommDlgExtendedError
168 #define CreateStatusWindowA pCreateStatusWindowA
169 #define CreateWindowExA pCreateWindowExA
170 #define DefWindowProcA pDefWindowProcA
171 #define DeferWindowPos pDeferWindowPos
172 #define DeleteDC pDeleteDC
173 #define DeleteObject pDeleteObject
174 #define DestroyMenu pDestroyMenu
175 #define DestroyWindow pDestroyWindow
176 #define DialogBoxParamA pDialogBoxParamA
177 #define DispatchMessageA pDispatchMessageA
178 #define EmptyClipboard pEmptyClipboard
179 #define EndDeferWindowPos pEndDeferWindowPos
180 #define EndDialog pEndDialog
181 #define EndPaint pEndPaint
182 #define FillRect pFillRect
183 #define GetCapture pGetCapture
184 #define GetClientRect pGetClientRect
185 #define GetCursorPos pGetCursorPos
187 #define GetDlgItem pGetDlgItem
188 #define GetMenu pGetMenu
189 #define GetMessageA pGetMessageA
190 #define GetOpenFileNameA pGetOpenFileNameA
191 #define GetSaveFileNameA pGetSaveFileNameA
192 #define GetStockObject pGetStockObject
193 #define GetSubMenu pGetSubMenu
194 #define GetSystemMetrics pGetSystemMetrics
195 #define ImageList_Add pImageList_Add
196 #define ImageList_Create pImageList_Create
197 #define ImageList_GetImageCount pImageList_GetImageCount
198 #define InitCommonControls pInitCommonControls
199 #define InvertRect pInvertRect
200 #define IsWindowVisible pIsWindowVisible
201 #define LoadAcceleratorsA pLoadAcceleratorsA
202 #define LoadBitmapA pLoadBitmapA
203 #define LoadCursorA pLoadCursorA
204 #define LoadIconA pLoadIconA
205 #define LoadImageA pLoadImageA
206 #define LoadMenuA pLoadMenuA
207 #define LoadStringA pLoadStringA
208 #define MessageBeep pMessageBeep
209 #define MoveWindow pMoveWindow
210 #define OpenClipboard pOpenClipboard
211 #define PostQuitMessage pPostQuitMessage
212 #define PrintDlgA pPrintDlgA
213 #define RegisterClassExA pRegisterClassExA
214 #define RegisterClipboardFormatA pRegisterClipboardFormatA
215 #define ReleaseCapture pReleaseCapture
216 #define ReleaseDC pReleaseDC
217 #define ScreenToClient pScreenToClient
218 #define SendMessageA pSendMessageA
219 #define SetCapture pSetCapture
220 #define SetCursor pSetCursor
221 #define SetFocus pSetFocus
222 #define SetWindowLongA pSetWindowLongA
223 #define SetWindowTextA pSetWindowTextA
224 #define ShowWindow pShowWindow
225 #define TranslateAccelerator pTranslateAccelerator
226 #define TranslateMessage pTranslateMessage
227 #define UpdateWindow pUpdateWindow
228 #define WinHelpA pWinHelpA
229 #define wsprintfA pwsprintfA
236 extern void ShowAboutBox(HWND hWnd
);
239 extern LRESULT CALLBACK
ChildWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
242 extern LRESULT CALLBACK
FrameWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
243 extern void SetupStatusBar(HWND hWnd
, BOOL bResize
);
244 extern void UpdateStatusBar(void);
247 extern HWND
CreateListView(HWND hwndParent
, int id
);
248 extern BOOL
RefreshListView(HWND hwndTV
, HKEY hKey
, LPTSTR keyPath
);
251 extern HWND
CreateTreeView(HWND hwndParent
, LPTSTR pHostName
, int id
);
252 extern BOOL
OnTreeExpanding(HWND hWnd
, NMTREEVIEW
* pnmtv
);
253 extern HKEY
FindRegRoot(HWND hwndTV
, HTREEITEM hItem
, LPTSTR keyPath
, int* pPathLen
, int max
);
255 #endif /* __MAIN_H__ */