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
90 #ifdef REGEDIT_DECLARE_FUNCTIONS
91 #define d(x) typeof(x) *p##x = NULL;
93 #define d(x) extern typeof(x) *p##x;
96 d(BeginDeferWindowPos
)
101 d(CommDlgExtendedError
)
102 d(CreateStatusWindowA
)
131 d(ImageList_GetImageCount
)
132 d(InitCommonControls
)
148 d(RegisterClipboardFormatA
)
159 d(TranslateAccelerator
)
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
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
241 extern void ShowAboutBox(HWND hWnd
);
244 extern LRESULT CALLBACK
ChildWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
247 extern LRESULT CALLBACK
FrameWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
248 extern void SetupStatusBar(HWND hWnd
, BOOL bResize
);
249 extern void UpdateStatusBar(void);
252 extern HWND
CreateListView(HWND hwndParent
, int id
);
253 extern BOOL
RefreshListView(HWND hwndTV
, HKEY hKey
, LPTSTR keyPath
);
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__ */