Fixes char array in structure dumping.
[wine.git] / include / prsht.h
blob6f37b9f6fe85363a9c990a98966ac57924b60088
1 #ifndef __WINE_PRSHT_H
2 #define __WINE_PRSHT_H
4 #include "windef.h"
5 #include "wingdi.h"
6 #include "winuser.h"
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
14 * Property sheet support (callback procs)
18 #define WC_PROPSHEETA "SysPropertySheet"
19 static const WCHAR WC_PROPSHEETW[] = { 'S','y','s',
20 'P','r','o','p','e','r','t','y','S','h','e','e','t',0 };
21 #define WC_PROPSHEET WINELIB_NAME_AW(WC_PROPSHEET)
23 struct _PROPSHEETPAGEA; /** need to forward declare those structs **/
24 struct _PROPSHEETPAGEW;
25 struct _PSP;
26 typedef struct _PSP *HPROPSHEETPAGE;
29 typedef UINT CALLBACK (*LPFNPSPCALLBACKA)(HWND, UINT, struct _PROPSHEETPAGEA*);
30 typedef UINT CALLBACK (*LPFNPSPCALLBACKW)(HWND, UINT, struct _PROPSHEETPAGEW*);
31 typedef INT CALLBACK (*PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
32 typedef BOOL CALLBACK (*LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
33 typedef BOOL CALLBACK (*LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
36 * Property sheet support (structures)
38 typedef struct _PROPSHEETPAGEA
40 DWORD dwSize;
41 DWORD dwFlags;
42 HINSTANCE hInstance;
43 union
45 LPCSTR pszTemplate;
46 LPCDLGTEMPLATEA pResource;
47 }DUMMYUNIONNAME;
48 union
50 HICON hIcon;
51 LPCSTR pszIcon;
52 }DUMMYUNIONNAME2;
53 LPCSTR pszTitle;
54 DLGPROC pfnDlgProc;
55 LPARAM lParam;
56 LPFNPSPCALLBACKA pfnCallback;
57 UINT* pcRefParent;
58 LPCSTR pszHeaderTitle;
59 LPCSTR pszHeaderSubTitle;
60 } PROPSHEETPAGEA, *LPPROPSHEETPAGEA;
62 typedef const PROPSHEETPAGEA *LPCPROPSHEETPAGEA;
64 typedef struct _PROPSHEETPAGEW
66 DWORD dwSize;
67 DWORD dwFlags;
68 HINSTANCE hInstance;
69 union
71 LPCWSTR pszTemplate;
72 LPCDLGTEMPLATEW pResource;
73 }DUMMYUNIONNAME;
74 union
76 HICON hIcon;
77 LPCWSTR pszIcon;
78 }DUMMYUNIONNAME2;
79 LPCWSTR pszTitle;
80 DLGPROC pfnDlgProc;
81 LPARAM lParam;
82 LPFNPSPCALLBACKW pfnCallback;
83 UINT* pcRefParent;
84 LPCWSTR pszHeaderTitle;
85 LPCWSTR pszHeaderSubTitle;
86 } PROPSHEETPAGEW, *LPPROPSHEETPAGEW;
88 typedef const PROPSHEETPAGEW *LPCPROPSHEETPAGEW;
91 typedef struct _PROPSHEETHEADERA
93 DWORD dwSize;
94 DWORD dwFlags;
95 HWND hwndParent;
96 HINSTANCE hInstance;
97 union
99 HICON hIcon;
100 LPCSTR pszIcon;
101 }DUMMYUNIONNAME;
102 LPCSTR pszCaption;
103 UINT nPages;
104 union
106 UINT nStartPage;
107 LPCSTR pStartPage;
108 }DUMMYUNIONNAME2;
109 union
111 LPCPROPSHEETPAGEA ppsp;
112 HPROPSHEETPAGE* phpage;
113 }DUMMYUNIONNAME3;
114 PFNPROPSHEETCALLBACK pfnCallback;
115 union
117 HBITMAP hbmWatermark;
118 LPCSTR pszbmWatermark;
119 }DUMMYUNIONNAME4;
120 HPALETTE hplWatermark;
121 union
123 HBITMAP hbmHeader;
124 LPCSTR pszbmHeader;
125 }DUMMYUNIONNAME5;
126 } PROPSHEETHEADERA, *LPPROPSHEETHEADERA;
128 typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
130 typedef struct _PROPSHEETHEADERW
132 DWORD dwSize;
133 DWORD dwFlags;
134 HWND hwndParent;
135 HINSTANCE hInstance;
136 union
138 HICON hIcon;
139 LPCSTR pszIcon;
140 }DUMMYUNIONNAME1;
141 LPCWSTR pszCaption;
142 UINT nPages;
143 union
145 UINT nStartPage;
146 LPCWSTR pStartPage;
147 }DUMMYUNIONNAME2;
148 union
150 LPCPROPSHEETPAGEW ppsp;
151 HPROPSHEETPAGE* phpage;
152 }DUMMYUNIONNAME3;
153 PFNPROPSHEETCALLBACK pfnCallback;
154 union
156 HBITMAP hbmWatermark;
157 LPCWSTR pszbmWatermark;
158 }DUMMYUNIONNAME4;
159 HPALETTE hplWatermark;
160 union
162 HBITMAP hbmHeader;
163 LPCWSTR pszbmHeader;
164 }DUMMYUNIONNAME5;
165 } PROPSHEETHEADERW, *LPPROPSHEETHEADERW;
167 typedef const PROPSHEETHEADERW *LPCPROPSHEETHEADERW;
171 * Property sheet support (methods)
173 INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
174 INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
175 #define PropertySheet WINELIB_NAME_AW(PropertySheet)
176 HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
177 HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
178 #define CreatePropertySheetPage WINELIB_NAME_AW(CreatePropertySheetPage)
179 BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage);
182 * Property sheet support (UNICODE-Winelib)
185 DECL_WINELIB_TYPE_AW(PROPSHEETPAGE)
186 DECL_WINELIB_TYPE_AW(LPPROPSHEETPAGE)
187 DECL_WINELIB_TYPE_AW(LPCPROPSHEETPAGE)
188 DECL_WINELIB_TYPE_AW(PROPSHEETHEADER)
189 DECL_WINELIB_TYPE_AW(LPPROPSHEETHEADER)
190 DECL_WINELIB_TYPE_AW(LPCPROPSHEETHEADER)
191 DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK)
195 * Property sheet support (defines)
197 #define PSP_DEFAULT 0x0000
198 #define PSP_DLGINDIRECT 0x0001
199 #define PSP_USEHICON 0x0002
200 #define PSP_USEICONID 0x0004
201 #define PSP_USETITLE 0x0008
202 #define PSP_RTLREADING 0x0010
204 #define PSP_HASHELP 0x0020
205 #define PSP_USEREFPARENT 0x0040
206 #define PSP_USECALLBACK 0x0080
207 #define PSP_PREMATURE 0x0400
209 #define PSP_HIDEHEADER 0x00000800
210 #define PSP_USEHEADERTITLE 0x00001000
211 #define PSP_USEHEADERSUBTITLE 0x00002000
213 #define PSPCB_RELEASE 1
214 #define PSPCB_CREATE 2
216 #define PSH_DEFAULT 0x0000
217 #define PSH_PROPTITLE 0x0001
218 #define PSH_USEHICON 0x0002
219 #define PSH_USEICONID 0x0004
220 #define PSH_PROPSHEETPAGE 0x0008
221 #define PSH_WIZARD 0x0020
222 #define PSH_USEPSTARTPAGE 0x0040
223 #define PSH_NOAPPLYNOW 0x0080
224 #define PSH_USECALLBACK 0x0100
225 #define PSH_HASHELP 0x0200
226 #define PSH_MODELESS 0x0400
227 #define PSH_RTLREADING 0x0800
228 #define PSH_WIZARDCONTEXTHELP 0x00001000
230 #define PSH_WIZARD97 0x00002000
231 #define PSH_WATERMARK 0x00008000
232 #define PSH_USEHBMWATERMARK 0x00010000
233 #define PSH_USEHPLWATERMARK 0x00020000
234 #define PSH_STRETCHWATERMARK 0x00040000
235 #define PSH_HEADER 0x00080000
236 #define PSH_USEHBMHEADER 0x00100000
237 #define PSH_USEPAGELANG 0x00200000
239 #define PSCB_INITIALIZED 1
240 #define PSCB_PRECREATE 2
242 typedef struct _PSHNOTIFY
244 NMHDR hdr;
245 LPARAM lParam;
246 } PSHNOTIFY, *LPPSHNOTIFY;
248 #define PSN_FIRST (0U-200U)
249 #define PSN_LAST (0U-299U)
252 #define PSN_SETACTIVE (PSN_FIRST-0)
253 #define PSN_KILLACTIVE (PSN_FIRST-1)
254 /* #define PSN_VALIDATE (PSN_FIRST-1) */
255 #define PSN_APPLY (PSN_FIRST-2)
256 #define PSN_RESET (PSN_FIRST-3)
257 /* #define PSN_CANCEL (PSN_FIRST-3) */
258 #define PSN_HELP (PSN_FIRST-5)
259 #define PSN_WIZBACK (PSN_FIRST-6)
260 #define PSN_WIZNEXT (PSN_FIRST-7)
261 #define PSN_WIZFINISH (PSN_FIRST-8)
262 #define PSN_QUERYCANCEL (PSN_FIRST-9)
263 #define PSN_GETOBJECT (PSN_FIRST-10)
265 #define PSNRET_NOERROR 0
266 #define PSNRET_INVALID 1
267 #define PSNRET_INVALID_NOCHANGEPAGE 2
270 #define PSM_SETCURSEL (WM_USER + 101)
271 #define PSM_REMOVEPAGE (WM_USER + 102)
272 #define PSM_ADDPAGE (WM_USER + 103)
273 #define PSM_CHANGED (WM_USER + 104)
274 #define PSM_RESTARTWINDOWS (WM_USER + 105)
275 #define PSM_REBOOTSYSTEM (WM_USER + 106)
276 #define PSM_CANCELTOCLOSE (WM_USER + 107)
277 #define PSM_QUERYSIBLINGS (WM_USER + 108)
278 #define PSM_UNCHANGED (WM_USER + 109)
279 #define PSM_APPLY (WM_USER + 110)
280 #define PSM_SETTITLEA (WM_USER + 111)
281 #define PSM_SETTITLEW (WM_USER + 120)
282 #define PSM_SETTITLE WINELIB_NAME_AW(PSM_SETTITLE)
283 #define PSM_SETWIZBUTTONS (WM_USER + 112)
284 #define PSM_PRESSBUTTON (WM_USER + 113)
285 #define PSM_SETCURSELID (WM_USER + 114)
286 #define PSM_SETFINISHTEXTA (WM_USER + 115)
287 #define PSM_SETFINISHTEXTW (WM_USER + 121)
288 #define PSM_SETFINISHTEXT WINELIB_NAME_AW(PSM_SETFINISHTEXT)
289 #define PSM_GETTABCONTROL (WM_USER + 116)
290 #define PSM_ISDIALOGMESSAGE (WM_USER + 117)
291 #define PSM_GETCURRENTPAGEHWND (WM_USER + 118)
293 #define PSWIZB_BACK 0x00000001
294 #define PSWIZB_NEXT 0x00000002
295 #define PSWIZB_FINISH 0x00000004
296 #define PSWIZB_DISABLEDFINISH 0x00000008
298 #define PSBTN_BACK 0
299 #define PSBTN_NEXT 1
300 #define PSBTN_FINISH 2
301 #define PSBTN_OK 3
302 #define PSBTN_APPLYNOW 4
303 #define PSBTN_CANCEL 5
304 #define PSBTN_HELP 6
305 #define PSBTN_MAX 6
307 #define ID_PSRESTARTWINDOWS 0x2
308 #define ID_PSREBOOTSYSTEM (ID_PSRESTARTWINDOWS | 0x1)
311 #define WIZ_CXDLG 276
312 #define WIZ_CYDLG 140
314 #define WIZ_CXBMP 80
316 #define WIZ_BODYX 92
317 #define WIZ_BODYCX 184
319 #define PROP_SM_CXDLG 212
320 #define PROP_SM_CYDLG 188
322 #define PROP_MED_CXDLG 227
323 #define PROP_MED_CYDLG 215
325 #define PROP_LG_CXDLG 252
326 #define PROP_LG_CYDLG 218
329 * Property sheet support (macros)
332 #define PropSheet_SetCurSel(hDlg, hpage, index) \
333 SendMessageA(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
335 #define PropSheet_RemovePage(hDlg, index, hpage) \
336 SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
338 #define PropSheet_AddPage(hDlg, hpage) \
339 SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
341 #define PropSheet_Changed(hDlg, hwnd) \
342 SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
344 #define PropSheet_RestartWindows(hDlg) \
345 SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
347 #define PropSheet_RebootSystem(hDlg) \
348 SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
350 #define PropSheet_CancelToClose(hDlg) \
351 PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
353 #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
354 SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
356 #define PropSheet_UnChanged(hDlg, hwnd) \
357 SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
359 #define PropSheet_Apply(hDlg) \
360 SNDMSG(hDlg, PSM_APPLY, 0, 0L)
362 #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
363 SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
365 #define PropSheet_SetWizButtons(hDlg, dwFlags) \
366 PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
368 #define PropSheet_PressButton(hDlg, iButton) \
369 PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
371 #define PropSheet_SetCurSelByID(hDlg, id) \
372 SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
374 #define PropSheet_SetFinishText(hDlg, lpszText) \
375 SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
377 #define PropSheet_GetTabControl(hDlg) \
378 (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
380 #define PropSheet_IsDialogMessage(hDlg, pMsg) \
381 (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
383 #define PropSheet_GetCurrentPageHwnd(hDlg) \
384 (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
387 #ifdef __cplusplus
389 #endif
391 #endif /* __WINE_PRSHT_H */