2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_PRSHT_H
20 #define __WINE_PRSHT_H
28 * Property sheet support (callback procs)
32 #define WC_PROPSHEETA "SysPropertySheet"
34 # define WC_PROPSHEETW (const WCHAR []){ 'S','y','s', \
35 'P','r','o','p','e','r','t','y','S','h','e','e','t',0 }
36 #elif defined(_MSC_VER)
37 # define WC_PROPSHEETW L"SysPropertySheet"
39 static const WCHAR WC_PROPSHEETW
[] = { 'S','y','s',
40 'P','r','o','p','e','r','t','y','S','h','e','e','t',0 };
42 #define WC_PROPSHEET WINELIB_NAME_AW(WC_PROPSHEET)
44 struct _PROPSHEETPAGEA
; /** need to forward declare those structs **/
45 struct _PROPSHEETPAGEW
;
47 typedef struct _PSP
*HPROPSHEETPAGE
;
50 typedef UINT (CALLBACK
*LPFNPSPCALLBACKA
)(HWND
, UINT
, struct _PROPSHEETPAGEA
*);
51 typedef UINT (CALLBACK
*LPFNPSPCALLBACKW
)(HWND
, UINT
, struct _PROPSHEETPAGEW
*);
52 typedef INT (CALLBACK
*PFNPROPSHEETCALLBACK
)(HWND
, UINT
, LPARAM
);
53 typedef BOOL (CALLBACK
*LPFNADDPROPSHEETPAGE
)(HPROPSHEETPAGE
, LPARAM
);
54 typedef BOOL (CALLBACK
*LPFNADDPROPSHEETPAGES
)(LPVOID
, LPFNADDPROPSHEETPAGE
, LPARAM
);
57 * Property sheet support (structures)
59 typedef struct _PROPSHEETPAGEA
67 LPCDLGTEMPLATEA pResource
;
77 LPFNPSPCALLBACKA pfnCallback
;
79 LPCSTR pszHeaderTitle
;
80 LPCSTR pszHeaderSubTitle
;
81 } PROPSHEETPAGEA
, *LPPROPSHEETPAGEA
;
83 typedef const PROPSHEETPAGEA
*LPCPROPSHEETPAGEA
;
85 typedef struct _PROPSHEETPAGEW
93 LPCDLGTEMPLATEW pResource
;
103 LPFNPSPCALLBACKW pfnCallback
;
105 LPCWSTR pszHeaderTitle
;
106 LPCWSTR pszHeaderSubTitle
;
107 } PROPSHEETPAGEW
, *LPPROPSHEETPAGEW
;
109 typedef const PROPSHEETPAGEW
*LPCPROPSHEETPAGEW
;
112 typedef struct _PROPSHEETHEADERA
132 LPCPROPSHEETPAGEA ppsp
;
133 HPROPSHEETPAGE
* phpage
;
135 PFNPROPSHEETCALLBACK pfnCallback
;
138 HBITMAP hbmWatermark
;
139 LPCSTR pszbmWatermark
;
141 HPALETTE hplWatermark
;
147 } PROPSHEETHEADERA
, *LPPROPSHEETHEADERA
;
149 typedef const PROPSHEETHEADERA
*LPCPROPSHEETHEADERA
;
151 typedef struct _PROPSHEETHEADERW
171 LPCPROPSHEETPAGEW ppsp
;
172 HPROPSHEETPAGE
* phpage
;
174 PFNPROPSHEETCALLBACK pfnCallback
;
177 HBITMAP hbmWatermark
;
178 LPCWSTR pszbmWatermark
;
180 HPALETTE hplWatermark
;
186 } PROPSHEETHEADERW
, *LPPROPSHEETHEADERW
;
188 typedef const PROPSHEETHEADERW
*LPCPROPSHEETHEADERW
;
192 * Property sheet support (methods)
194 INT WINAPI
PropertySheetA(LPCPROPSHEETHEADERA
);
195 INT WINAPI
PropertySheetW(LPCPROPSHEETHEADERW
);
196 #define PropertySheet WINELIB_NAME_AW(PropertySheet)
197 HPROPSHEETPAGE WINAPI
CreatePropertySheetPageA(LPCPROPSHEETPAGEA
);
198 HPROPSHEETPAGE WINAPI
CreatePropertySheetPageW(LPCPROPSHEETPAGEW
);
199 #define CreatePropertySheetPage WINELIB_NAME_AW(CreatePropertySheetPage)
200 BOOL WINAPI
DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage
);
203 * Property sheet support (UNICODE-Winelib)
206 DECL_WINELIB_TYPE_AW(PROPSHEETPAGE
)
207 DECL_WINELIB_TYPE_AW(LPPROPSHEETPAGE
)
208 DECL_WINELIB_TYPE_AW(LPCPROPSHEETPAGE
)
209 DECL_WINELIB_TYPE_AW(PROPSHEETHEADER
)
210 DECL_WINELIB_TYPE_AW(LPPROPSHEETHEADER
)
211 DECL_WINELIB_TYPE_AW(LPCPROPSHEETHEADER
)
212 DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK
)
216 * Property sheet support (defines)
218 #define PSP_DEFAULT 0x0000
219 #define PSP_DLGINDIRECT 0x0001
220 #define PSP_USEHICON 0x0002
221 #define PSP_USEICONID 0x0004
222 #define PSP_USETITLE 0x0008
223 #define PSP_RTLREADING 0x0010
225 #define PSP_HASHELP 0x0020
226 #define PSP_USEREFPARENT 0x0040
227 #define PSP_USECALLBACK 0x0080
228 #define PSP_PREMATURE 0x0400
230 #define PSP_HIDEHEADER 0x00000800
231 #define PSP_USEHEADERTITLE 0x00001000
232 #define PSP_USEHEADERSUBTITLE 0x00002000
234 #define PSPCB_RELEASE 1
235 #define PSPCB_CREATE 2
237 #define PSH_DEFAULT 0x0000
238 #define PSH_PROPTITLE 0x0001
239 #define PSH_USEHICON 0x0002
240 #define PSH_USEICONID 0x0004
241 #define PSH_PROPSHEETPAGE 0x0008
242 #define PSH_WIZARDHASFINISH 0x0010
243 #define PSH_WIZARD 0x0020
244 #define PSH_USEPSTARTPAGE 0x0040
245 #define PSH_NOAPPLYNOW 0x0080
246 #define PSH_USECALLBACK 0x0100
247 #define PSH_HASHELP 0x0200
248 #define PSH_MODELESS 0x0400
249 #define PSH_RTLREADING 0x0800
250 #define PSH_WIZARDCONTEXTHELP 0x00001000
252 #define PSH_WIZARD97_OLD 0x00002000 /* for IE < 5 */
253 #define PSH_WATERMARK 0x00008000
254 #define PSH_USEHBMWATERMARK 0x00010000
255 #define PSH_USEHPLWATERMARK 0x00020000
256 #define PSH_STRETCHWATERMARK 0x00040000
257 #define PSH_HEADER 0x00080000
258 #define PSH_USEHBMHEADER 0x00100000
259 #define PSH_USEPAGELANG 0x00200000
260 #define PSH_WIZARD_LITE 0x00400000
261 #define PSH_WIZARD97_NEW 0x01000000 /* for IE >= 5 */
262 #define PSH_NOCONTEXTHELP 0x02000000
264 # if _WIN32_IE < 0x0500
265 # define PSH_WIZARD97 PSH_WIZARD97_OLD
267 # define PSH_WIZARD97 PSH_WIZARD97_NEW
271 #define PSCB_INITIALIZED 1
272 #define PSCB_PRECREATE 2
274 typedef struct _PSHNOTIFY
278 } PSHNOTIFY
, *LPPSHNOTIFY
;
280 #define PSN_FIRST (0U-200U)
281 #define PSN_LAST (0U-299U)
284 #define PSN_SETACTIVE (PSN_FIRST-0)
285 #define PSN_KILLACTIVE (PSN_FIRST-1)
286 /* #define PSN_VALIDATE (PSN_FIRST-1) */
287 #define PSN_APPLY (PSN_FIRST-2)
288 #define PSN_RESET (PSN_FIRST-3)
289 /* #define PSN_CANCEL (PSN_FIRST-3) */
290 #define PSN_HELP (PSN_FIRST-5)
291 #define PSN_WIZBACK (PSN_FIRST-6)
292 #define PSN_WIZNEXT (PSN_FIRST-7)
293 #define PSN_WIZFINISH (PSN_FIRST-8)
294 #define PSN_QUERYCANCEL (PSN_FIRST-9)
295 #define PSN_GETOBJECT (PSN_FIRST-10)
297 #define PSNRET_NOERROR 0
298 #define PSNRET_INVALID 1
299 #define PSNRET_INVALID_NOCHANGEPAGE 2
302 #define PSM_SETCURSEL (WM_USER + 101)
303 #define PSM_REMOVEPAGE (WM_USER + 102)
304 #define PSM_ADDPAGE (WM_USER + 103)
305 #define PSM_CHANGED (WM_USER + 104)
306 #define PSM_RESTARTWINDOWS (WM_USER + 105)
307 #define PSM_REBOOTSYSTEM (WM_USER + 106)
308 #define PSM_CANCELTOCLOSE (WM_USER + 107)
309 #define PSM_QUERYSIBLINGS (WM_USER + 108)
310 #define PSM_UNCHANGED (WM_USER + 109)
311 #define PSM_APPLY (WM_USER + 110)
312 #define PSM_SETTITLEA (WM_USER + 111)
313 #define PSM_SETTITLEW (WM_USER + 120)
314 #define PSM_SETTITLE WINELIB_NAME_AW(PSM_SETTITLE)
315 #define PSM_SETWIZBUTTONS (WM_USER + 112)
316 #define PSM_PRESSBUTTON (WM_USER + 113)
317 #define PSM_SETCURSELID (WM_USER + 114)
318 #define PSM_SETFINISHTEXTA (WM_USER + 115)
319 #define PSM_SETFINISHTEXTW (WM_USER + 121)
320 #define PSM_SETFINISHTEXT WINELIB_NAME_AW(PSM_SETFINISHTEXT)
321 #define PSM_GETTABCONTROL (WM_USER + 116)
322 #define PSM_ISDIALOGMESSAGE (WM_USER + 117)
323 #define PSM_GETCURRENTPAGEHWND (WM_USER + 118)
325 #define PSWIZB_BACK 0x00000001
326 #define PSWIZB_NEXT 0x00000002
327 #define PSWIZB_FINISH 0x00000004
328 #define PSWIZB_DISABLEDFINISH 0x00000008
332 #define PSBTN_FINISH 2
334 #define PSBTN_APPLYNOW 4
335 #define PSBTN_CANCEL 5
339 #define ID_PSRESTARTWINDOWS 0x2
340 #define ID_PSREBOOTSYSTEM (ID_PSRESTARTWINDOWS | 0x1)
343 #define WIZ_CXDLG 276
344 #define WIZ_CYDLG 140
349 #define WIZ_BODYCX 184
351 #define PROP_SM_CXDLG 212
352 #define PROP_SM_CYDLG 188
354 #define PROP_MED_CXDLG 227
355 #define PROP_MED_CYDLG 215
357 #define PROP_LG_CXDLG 252
358 #define PROP_LG_CYDLG 218
361 * Property sheet support (macros)
364 #define PropSheet_SetCurSel(hDlg, hpage, index) \
365 SendMessageA(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
367 #define PropSheet_RemovePage(hDlg, index, hpage) \
368 SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
370 #define PropSheet_AddPage(hDlg, hpage) \
371 SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
373 #define PropSheet_Changed(hDlg, hwnd) \
374 SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
376 #define PropSheet_RestartWindows(hDlg) \
377 SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
379 #define PropSheet_RebootSystem(hDlg) \
380 SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
382 #define PropSheet_CancelToClose(hDlg) \
383 PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
385 #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
386 SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
388 #define PropSheet_UnChanged(hDlg, hwnd) \
389 SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
391 #define PropSheet_Apply(hDlg) \
392 SNDMSG(hDlg, PSM_APPLY, 0, 0L)
394 #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
395 SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
397 #define PropSheet_SetWizButtons(hDlg, dwFlags) \
398 PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
400 #define PropSheet_PressButton(hDlg, iButton) \
401 PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
403 #define PropSheet_SetCurSelByID(hDlg, id) \
404 SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
406 #define PropSheet_SetFinishText(hDlg, lpszText) \
407 SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
409 #define PropSheet_GetTabControl(hDlg) \
410 (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
412 #define PropSheet_IsDialogMessage(hDlg, pMsg) \
413 (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
415 #define PropSheet_GetCurrentPageHwnd(hDlg) \
416 (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
423 #endif /* __WINE_PRSHT_H */