12 * Property sheet support (callback procs)
16 #define WC_PROPSHEET32A "SysPropertySheet"
17 #define WC_PROPSHEET32W L"SysPropertySheet"
18 #define WC_PROPSHEET WINELIB_NAME_AW(WC_PROPSHEET)
20 struct _PROPSHEETPAGE32A
; /** need to forward declare those structs **/
21 struct _PROPSHEETPAGE32W
;
23 typedef struct _PSP
*HPROPSHEETPAGE
;
26 typedef UINT32 (CALLBACK
*LPFNPSPCALLBACK32A
)(HWND32
, UINT32
, struct _PROPSHEETPAGE32A
*);
27 typedef UINT32 (CALLBACK
*LPFNPSPCALLBACK32W
)(HWND32
, UINT32
, struct _PROPSHEETPAGE32W
*);
28 typedef INT32 (CALLBACK
*PFNPROPSHEETCALLBACK32
)(HWND32
, UINT32
, LPARAM
);
29 typedef BOOL32 (CALLBACK
*LPFNADDPROPSHEETPAGE
)(HPROPSHEETPAGE
, LPARAM
);
30 typedef BOOL32 (CALLBACK
*LPFNADDPROPSHEETPAGES
)(LPVOID
, LPFNADDPROPSHEETPAGE
, LPARAM
);
32 /* c++ likes nameless unions whereas c doesnt */
33 /* (used in property sheet structures) */
35 #define DUMMYUNIONNAME
36 #define DUMMYUNIONNAME1
37 #define DUMMYUNIONNAME2
38 #define DUMMYUNIONNAME3
39 #define DUMMYUNIONNAME4
40 #define DUMMYUNIONNAME5
42 #define DUMMYUNIONNAME u
43 #define DUMMYUNIONNAME1 u1
44 #define DUMMYUNIONNAME2 u2
45 #define DUMMYUNIONNAME3 u3
46 #define DUMMYUNIONNAME4 u4
47 #define DUMMYUNIONNAME5 u5
51 * Property sheet support (structures)
53 typedef struct _PROPSHEETPAGE32A
57 HINSTANCE32 hInstance
;
61 LPCDLGTEMPLATE pResource
;
71 LPFNPSPCALLBACK32A pfnCallback
;
73 LPCWSTR pszHeaderTitle
;
74 LPCWSTR pszHeaderSubTitle
;
75 } PROPSHEETPAGE32A
, *LPPROPSHEETPAGE32A
;
77 typedef const PROPSHEETPAGE32A
*LPCPROPSHEETPAGE32A
;
79 typedef struct _PROPSHEETPAGE32W
83 HINSTANCE32 hInstance
;
87 LPCDLGTEMPLATE pResource
;
97 LPFNPSPCALLBACK32W pfnCallback
;
99 LPCWSTR pszHeaderTitle
;
100 LPCWSTR pszHeaderSubTitle
;
101 } PROPSHEETPAGE32W
, *LPPROPSHEETPAGE32W
;
103 typedef const PROPSHEETPAGE32W
*LPCPROPSHEETPAGE32W
;
106 typedef struct _PROPSHEETHEADER32A
111 HINSTANCE32 hInstance
;
126 LPCPROPSHEETPAGE32A ppsp
;
127 HPROPSHEETPAGE
* phpage
;
129 PFNPROPSHEETCALLBACK32 pfnCallback
;
132 HBITMAP32 hbmWatermark
;
133 LPCSTR pszbmWatermark
;
135 HPALETTE32 hplWatermark
;
141 } PROPSHEETHEADER32A
, *LPPROPSHEETHEADER32A
;
143 typedef const PROPSHEETHEADER32A
*LPCPROPSHEETHEADER32A
;
145 typedef struct _PROPSHEETHEADER32W
150 HINSTANCE32 hInstance
;
165 LPCPROPSHEETPAGE32W ppsp
;
166 HPROPSHEETPAGE
* phpage
;
168 PFNPROPSHEETCALLBACK32 pfnCallback
;
171 HBITMAP32 hbmWatermark
;
172 LPCWSTR pszbmWatermark
;
174 HPALETTE32 hplWatermark
;
180 } PROPSHEETHEADER32W
, *LPPROPSHEETHEADER32W
;
182 typedef const PROPSHEETHEADER32W
*LPCPROPSHEETHEADER32W
;
186 * Property sheet support (methods)
188 INT32 WINAPI
PropertySheet32A(LPCPROPSHEETHEADER32A
);
189 INT32 WINAPI
PropertySheet32W(LPCPROPSHEETHEADER32W
);
190 #define PropertySheet WINELIB_NAME_AW(PropertySheet)
191 HPROPSHEETPAGE WINAPI
CreatePropertySheetPage32A(LPCPROPSHEETPAGE32A
);
192 HPROPSHEETPAGE WINAPI
CreatePropertySheetPage32W(LPCPROPSHEETPAGE32W
);
193 #define CreatePropertySheetPage WINELIB_NAME_AW(CreatePropertySheetPage)
194 BOOL32 WINAPI
DestroyPropertySheetPage32(HPROPSHEETPAGE hPropPage
);
195 #define DestroyPropertySheetPage WINELIB_NAME(DestroyPropertySheetPage)
198 * Property sheet support (UNICODE-WineLib)
201 DECL_WINELIB_TYPE_AW(PROPSHEETPAGE
)
202 DECL_WINELIB_TYPE_AW(LPPROPSHEETPAGE
)
203 DECL_WINELIB_TYPE_AW(LPCPROPSHEETPAGE
)
204 DECL_WINELIB_TYPE_AW(PROPSHEETHEADER
)
205 DECL_WINELIB_TYPE_AW(LPPROPSHEETHEADER
)
206 DECL_WINELIB_TYPE_AW(LPCPROPSHEETHEADER
)
207 DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK
)
208 DECL_WINELIB_TYPE(PFNPROPSHEETCALLBACK
)
212 * Property sheet support (defines)
214 #define PSP_DEFAULT 0x0000
215 #define PSP_DLGINDIRECT 0x0001
216 #define PSP_USEHICON 0x0002
217 #define PSP_USEICONID 0x0004
218 #define PSP_USETITLE 0x0008
219 #define PSP_RTLREADING 0x0010
221 #define PSP_HASHELP 0x0020
222 #define PSP_USEREFPARENT 0x0040
223 #define PSP_USECALLBACK 0x0080
226 #define PSPCB_RELEASE 1
227 #define PSPCB_CREATE 2
229 #define PSH_DEFAULT 0x0000
230 #define PSH_PROPTITLE 0x0001
231 #define PSH_USEHICON 0x0002
232 #define PSH_USEICONID 0x0004
233 #define PSH_PROPSHEETPAGE 0x0008
234 #define PSH_WIZARD 0x0020
235 #define PSH_USEPSTARTPAGE 0x0040
236 #define PSH_NOAPPLYNOW 0x0080
237 #define PSH_USECALLBACK 0x0100
238 #define PSH_HASHELP 0x0200
239 #define PSH_MODELESS 0x0400
240 #define PSH_RTLREADING 0x0800
242 #define PSCB_INITIALIZED 1
243 #define PSCB_PRECREATE 2
245 #define PSN_FIRST (0U-200U)
246 #define PSN_LAST (0U-299U)
249 #define PSN_SETACTIVE (PSN_FIRST-0)
250 #define PSN_KILLACTIVE (PSN_FIRST-1)
251 /* #define PSN_VALIDATE (PSN_FIRST-1) */
252 #define PSN_APPLY (PSN_FIRST-2)
253 #define PSN_RESET (PSN_FIRST-3)
254 /* #define PSN_CANCEL (PSN_FIRST-3) */
255 #define PSN_HELP (PSN_FIRST-5)
256 #define PSN_WIZBACK (PSN_FIRST-6)
257 #define PSN_WIZNEXT (PSN_FIRST-7)
258 #define PSN_WIZFINISH (PSN_FIRST-8)
259 #define PSN_QUERYCANCEL (PSN_FIRST-9)
261 #define PSNRET_NOERROR 0
262 #define PSNRET_INVALID 1
263 #define PSNRET_INVALID_NOCHANGEPAGE 2
266 #define PSM_SETCURSEL (WM_USER + 101)
267 #define PSM_REMOVEPAGE (WM_USER + 102)
268 #define PSM_ADDPAGE (WM_USER + 103)
269 #define PSM_CHANGED (WM_USER + 104)
270 #define PSM_RESTARTWINDOWS (WM_USER + 105)
271 #define PSM_REBOOTSYSTEM (WM_USER + 106)
272 #define PSM_CANCELTOCLOSE (WM_USER + 107)
273 #define PSM_QUERYSIBLINGS (WM_USER + 108)
274 #define PSM_UNCHANGED (WM_USER + 109)
275 #define PSM_APPLY (WM_USER + 110)
276 #define PSM_SETTITLE32A (WM_USER + 111)
277 #define PSM_SETTITLE32W (WM_USER + 120)
278 #define PSM_SETTITLE WINELIB_NAME_AW(PSM_SETTITLE)
279 #define PSM_SETWIZBUTTONS (WM_USER + 112)
280 #define PSM_PRESSBUTTON (WM_USER + 113)
281 #define PSM_SETCURSELID (WM_USER + 114)
282 #define PSM_SETFINISHTEXT32A (WM_USER + 115)
283 #define PSM_SETFINISHTEXT32W (WM_USER + 121)
284 #define PSM_SETFINISHTEXT WINELIB_NAME_AW(PSM_SETFINISHTEXT)
285 #define PSM_GETTABCONTROL (WM_USER + 116)
286 #define PSM_ISDIALOGMESSAGE (WM_USER + 117)
287 #define PSM_GETCURRENTPAGEHWND (WM_USER + 118)
289 #define PSWIZB_BACK 0x00000001
290 #define PSWIZB_NEXT 0x00000002
291 #define PSWIZB_FINISH 0x00000004
292 #define PSWIZB_DISABLEDFINISH 0x00000008
296 #define PSBTN_FINISH 2
298 #define PSBTN_APPLYNOW 4
299 #define PSBTN_CANCEL 5
303 #define ID_PSRESTARTWINDOWS 0x2
304 #define ID_PSREBOOTSYSTEM (ID_PSRESTARTWINDOWS | 0x1)
307 #define WIZ_CXDLG 276
308 #define WIZ_CYDLG 140
313 #define WIZ_BODYCX 184
315 #define PROP_SM_CXDLG 212
316 #define PROP_SM_CYDLG 188
318 #define PROP_MED_CXDLG 227
319 #define PROP_MED_CYDLG 215
321 #define PROP_LG_CXDLG 252
322 #define PROP_LG_CYDLG 218
325 * Property sheet support (macros)
328 #define PropSheet_SetCurSel(hDlg, hpage, index) \
329 SeandMessage32A(hDlg, PSM_SETCURSEL, (WPARAM32)index, (LPARAM)hpage)
331 #define PropSheet_RemovePage(hDlg, index, hpage) \
332 SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
334 #define PropSheet_AddPage(hDlg, hpage) \
335 SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
337 #define PropSheet_Changed(hDlg, hwnd) \
338 SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
340 #define PropSheet_RestartWindows(hDlg) \
341 SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
343 #define PropSheet_RebootSystem(hDlg) \
344 SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
346 #define PropSheet_CancelToClose(hDlg) \
347 PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
349 #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
350 SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
352 #define PropSheet_UnChanged(hDlg, hwnd) \
353 SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
355 #define PropSheet_Apply(hDlg) \
356 SNDMSG(hDlg, PSM_APPLY, 0, 0L)
358 #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
359 SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
361 #define PropSheet_SetWizButtons(hDlg, dwFlags) \
362 PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
364 #define PropSheet_PressButton(hDlg, iButton) \
365 PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
367 #define PropSheet_SetCurSelByID(hDlg, id) \
368 SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
370 #define PropSheet_SetFinishText(hDlg, lpszText) \
371 SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
373 #define PropSheet_GetTabControl(hDlg) \
374 (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
376 #define PropSheet_IsDialogMessage(hDlg, pMsg) \
377 (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
379 #define PropSheet_GetCurrentPageHwnd(hDlg) \
380 (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
389 #endif /* _WINE_PRSHT_H */