1 | /* $Id: prsht.h,v 1.3 1999-09-02 10:10:11 phaller Exp $ */
|
---|
2 |
|
---|
3 | #ifndef _WINE_PRSHT_H
|
---|
4 | #define _WINE_PRSHT_H
|
---|
5 |
|
---|
6 | #include "winuser.h"
|
---|
7 |
|
---|
8 | #ifdef __cplusplus
|
---|
9 | extern "C" {
|
---|
10 | #endif
|
---|
11 |
|
---|
12 |
|
---|
13 | /*
|
---|
14 | * Property sheet support (callback procs)
|
---|
15 | */
|
---|
16 |
|
---|
17 |
|
---|
18 | #define WC_PROPSHEETA "SysPropertySheet"
|
---|
19 | #define WC_PROPSHEETW L"SysPropertySheet"
|
---|
20 | #define WC_PROPSHEET WINELIB_NAME_AW(WC_PROPSHEET)
|
---|
21 |
|
---|
22 | struct _PROPSHEETPAGEA; /** need to forward declare those structs **/
|
---|
23 | struct _PROPSHEETPAGEW;
|
---|
24 | struct _PSP;
|
---|
25 | typedef struct _PSP *HPROPSHEETPAGE;
|
---|
26 |
|
---|
27 |
|
---|
28 | //typedef UINT (CALLBACK *LPFNPSPCALLBACKA)(HWND, UINT, struct _PROPSHEETPAGEA*);
|
---|
29 | typedef UINT (*LPFNPSPCALLBACKA)(HWND, UINT, struct _PROPSHEETPAGEA*);
|
---|
30 | //typedef UINT (CALLBACK *LPFNPSPCALLBACKW)(HWND, UINT, struct _PROPSHEETPAGEW*);
|
---|
31 | typedef UINT (*LPFNPSPCALLBACKW)(HWND, UINT, struct _PROPSHEETPAGEW*);
|
---|
32 | //typedef INT (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
|
---|
33 | typedef INT (*PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
|
---|
34 | //typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
|
---|
35 | typedef BOOL (*LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
|
---|
36 | //typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
|
---|
37 | typedef BOOL (*LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
|
---|
38 |
|
---|
39 | /* c++ likes nameless unions whereas c doesnt */
|
---|
40 | /* (used in property sheet structures) */
|
---|
41 |
|
---|
42 | #if defined(__cplusplus) && !defined(NONAMELESSUNION)
|
---|
43 | #define DUMMYUNIONNAME
|
---|
44 | #define DUMMYUNIONNAME1
|
---|
45 | #define DUMMYUNIONNAME2
|
---|
46 | #define DUMMYUNIONNAME3
|
---|
47 | #define DUMMYUNIONNAME4
|
---|
48 | #define DUMMYUNIONNAME5
|
---|
49 | #else
|
---|
50 | #define DUMMYUNIONNAME u
|
---|
51 | #define DUMMYUNIONNAME1 u1
|
---|
52 | #define DUMMYUNIONNAME2 u2
|
---|
53 | #define DUMMYUNIONNAME3 u3
|
---|
54 | #define DUMMYUNIONNAME4 u4
|
---|
55 | #define DUMMYUNIONNAME5 u5
|
---|
56 | #endif
|
---|
57 |
|
---|
58 | /*
|
---|
59 | * Property sheet support (structures)
|
---|
60 | */
|
---|
61 | typedef struct _PROPSHEETPAGEA
|
---|
62 | {
|
---|
63 | DWORD dwSize;
|
---|
64 | DWORD dwFlags;
|
---|
65 | HINSTANCE hInstance;
|
---|
66 | union
|
---|
67 | {
|
---|
68 | LPCSTR pszTemplate;
|
---|
69 | LPCDLGTEMPLATEA pResource;
|
---|
70 | }DUMMYUNIONNAME1;
|
---|
71 | union
|
---|
72 | {
|
---|
73 | HICON hIcon;
|
---|
74 | LPCSTR pszIcon;
|
---|
75 | }DUMMYUNIONNAME2;
|
---|
76 | LPCSTR pszTitle;
|
---|
77 | DLGPROC pfnDlgProc;
|
---|
78 | LPARAM lParam;
|
---|
79 | LPFNPSPCALLBACKA pfnCallback;
|
---|
80 | UINT* pcRefParent;
|
---|
81 | LPCWSTR pszHeaderTitle;
|
---|
82 | LPCWSTR pszHeaderSubTitle;
|
---|
83 | } PROPSHEETPAGEA, *LPPROPSHEETPAGEA;
|
---|
84 |
|
---|
85 | typedef const PROPSHEETPAGEA *LPCPROPSHEETPAGEA;
|
---|
86 |
|
---|
87 | typedef struct _PROPSHEETPAGEW
|
---|
88 | {
|
---|
89 | DWORD dwSize;
|
---|
90 | DWORD dwFlags;
|
---|
91 | HINSTANCE hInstance;
|
---|
92 | union
|
---|
93 | {
|
---|
94 | LPCWSTR pszTemplate;
|
---|
95 | LPCDLGTEMPLATEW pResource;
|
---|
96 | }DUMMYUNIONNAME1;
|
---|
97 | union
|
---|
98 | {
|
---|
99 | HICON hIcon;
|
---|
100 | LPCWSTR pszIcon;
|
---|
101 | }DUMMYUNIONNAME2;
|
---|
102 | LPCWSTR pszTitle;
|
---|
103 | DLGPROC pfnDlgProc;
|
---|
104 | LPARAM lParam;
|
---|
105 | LPFNPSPCALLBACKW pfnCallback;
|
---|
106 | UINT* pcRefParent;
|
---|
107 | LPCWSTR pszHeaderTitle;
|
---|
108 | LPCWSTR pszHeaderSubTitle;
|
---|
109 | } PROPSHEETPAGEW, *LPPROPSHEETPAGEW;
|
---|
110 |
|
---|
111 | typedef const PROPSHEETPAGEW *LPCPROPSHEETPAGEW;
|
---|
112 |
|
---|
113 |
|
---|
114 | typedef struct _PROPSHEETHEADERA
|
---|
115 | {
|
---|
116 | DWORD dwSize;
|
---|
117 | DWORD dwFlags;
|
---|
118 | HWND hwndParent;
|
---|
119 | HINSTANCE hInstance;
|
---|
120 | union
|
---|
121 | {
|
---|
122 | HICON hIcon;
|
---|
123 | LPCSTR pszIcon;
|
---|
124 | }DUMMYUNIONNAME1;
|
---|
125 | LPCSTR pszCaption;
|
---|
126 | UINT nPages;
|
---|
127 | union
|
---|
128 | {
|
---|
129 | UINT nStartPage;
|
---|
130 | LPCSTR pStartPage;
|
---|
131 | }DUMMYUNIONNAME2;
|
---|
132 | union
|
---|
133 | {
|
---|
134 | LPCPROPSHEETPAGEA ppsp;
|
---|
135 | HPROPSHEETPAGE* phpage;
|
---|
136 | }DUMMYUNIONNAME3;
|
---|
137 | PFNPROPSHEETCALLBACK pfnCallback;
|
---|
138 | union
|
---|
139 | {
|
---|
140 | HBITMAP hbmWatermark;
|
---|
141 | LPCSTR pszbmWatermark;
|
---|
142 | }DUMMYUNIONNAME4;
|
---|
143 | HPALETTE hplWatermark;
|
---|
144 | union
|
---|
145 | {
|
---|
146 | HBITMAP hbmHeader;
|
---|
147 | LPCSTR pszbmHeader;
|
---|
148 | }DUMMYUNIONNAME5;
|
---|
149 | } PROPSHEETHEADERA, *LPPROPSHEETHEADERA;
|
---|
150 |
|
---|
151 | typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
|
---|
152 |
|
---|
153 | typedef struct _PROPSHEETHEADERW
|
---|
154 | {
|
---|
155 | DWORD dwSize;
|
---|
156 | DWORD dwFlags;
|
---|
157 | HWND hwndParent;
|
---|
158 | HINSTANCE hInstance;
|
---|
159 | union
|
---|
160 | {
|
---|
161 | HICON hIcon;
|
---|
162 | LPCSTR pszIcon;
|
---|
163 | }DUMMYUNIONNAME1;
|
---|
164 | LPCWSTR pszCaption;
|
---|
165 | UINT nPages;
|
---|
166 | union
|
---|
167 | {
|
---|
168 | UINT nStartPage;
|
---|
169 | LPCWSTR pStartPage;
|
---|
170 | }DUMMYUNIONNAME2;
|
---|
171 | union
|
---|
172 | {
|
---|
173 | LPCPROPSHEETPAGEW ppsp;
|
---|
174 | HPROPSHEETPAGE* phpage;
|
---|
175 | }DUMMYUNIONNAME3;
|
---|
176 | PFNPROPSHEETCALLBACK pfnCallback;
|
---|
177 | union
|
---|
178 | {
|
---|
179 | HBITMAP hbmWatermark;
|
---|
180 | LPCWSTR pszbmWatermark;
|
---|
181 | }DUMMYUNIONNAME4;
|
---|
182 | HPALETTE hplWatermark;
|
---|
183 | union
|
---|
184 | {
|
---|
185 | HBITMAP hbmHeader;
|
---|
186 | LPCWSTR pszbmHeader;
|
---|
187 | }DUMMYUNIONNAME5;
|
---|
188 | } PROPSHEETHEADERW, *LPPROPSHEETHEADERW;
|
---|
189 |
|
---|
190 | typedef const PROPSHEETHEADERW *LPCPROPSHEETHEADERW;
|
---|
191 |
|
---|
192 |
|
---|
193 | /*
|
---|
194 | * Property sheet support (methods)
|
---|
195 | */
|
---|
196 | INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
|
---|
197 | INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
|
---|
198 | #define PropertySheet WINELIB_NAME_AW(PropertySheet)
|
---|
199 | HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
|
---|
200 | HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
|
---|
201 | #define CreatePropertySheetPage WINELIB_NAME_AW(CreatePropertySheetPage)
|
---|
202 | BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage);
|
---|
203 |
|
---|
204 | /*
|
---|
205 | * Property sheet support (UNICODE-WineLib)
|
---|
206 | */
|
---|
207 |
|
---|
208 | DECL_WINELIB_TYPE_AW(PROPSHEETPAGE)
|
---|
209 | DECL_WINELIB_TYPE_AW(LPPROPSHEETPAGE)
|
---|
210 | DECL_WINELIB_TYPE_AW(LPCPROPSHEETPAGE)
|
---|
211 | DECL_WINELIB_TYPE_AW(PROPSHEETHEADER)
|
---|
212 | DECL_WINELIB_TYPE_AW(LPPROPSHEETHEADER)
|
---|
213 | DECL_WINELIB_TYPE_AW(LPCPROPSHEETHEADER)
|
---|
214 | DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK)
|
---|
215 |
|
---|
216 |
|
---|
217 | /*
|
---|
218 | * Property sheet support (defines)
|
---|
219 | */
|
---|
220 | #define PSP_DEFAULT 0x0000
|
---|
221 | #define PSP_DLGINDIRECT 0x0001
|
---|
222 | #define PSP_USEHICON 0x0002
|
---|
223 | #define PSP_USEICONID 0x0004
|
---|
224 | #define PSP_USETITLE 0x0008
|
---|
225 | #define PSP_RTLREADING 0x0010
|
---|
226 |
|
---|
227 | #define PSP_HASHELP 0x0020
|
---|
228 | #define PSP_USEREFPARENT 0x0040
|
---|
229 | #define PSP_USECALLBACK 0x0080
|
---|
230 |
|
---|
231 |
|
---|
232 | #define PSPCB_RELEASE 1
|
---|
233 | #define PSPCB_CREATE 2
|
---|
234 |
|
---|
235 | #define PSH_DEFAULT 0x0000
|
---|
236 | #define PSH_PROPTITLE 0x0001
|
---|
237 | #define PSH_USEHICON 0x0002
|
---|
238 | #define PSH_USEICONID 0x0004
|
---|
239 | #define PSH_PROPSHEETPAGE 0x0008
|
---|
240 | #define PSH_WIZARD 0x0020
|
---|
241 | #define PSH_USEPSTARTPAGE 0x0040
|
---|
242 | #define PSH_NOAPPLYNOW 0x0080
|
---|
243 | #define PSH_USECALLBACK 0x0100
|
---|
244 | #define PSH_HASHELP 0x0200
|
---|
245 | #define PSH_MODELESS 0x0400
|
---|
246 | #define PSH_RTLREADING 0x0800
|
---|
247 |
|
---|
248 | #define PSCB_INITIALIZED 1
|
---|
249 | #define PSCB_PRECREATE 2
|
---|
250 |
|
---|
251 | #define PSN_FIRST (0U-200U)
|
---|
252 | #define PSN_LAST (0U-299U)
|
---|
253 |
|
---|
254 |
|
---|
255 | #define PSN_SETACTIVE (PSN_FIRST-0)
|
---|
256 | #define PSN_KILLACTIVE (PSN_FIRST-1)
|
---|
257 | /* #define PSN_VALIDATE (PSN_FIRST-1) */
|
---|
258 | #define PSN_APPLY (PSN_FIRST-2)
|
---|
259 | #define PSN_RESET (PSN_FIRST-3)
|
---|
260 | /* #define PSN_CANCEL (PSN_FIRST-3) */
|
---|
261 | #define PSN_HELP (PSN_FIRST-5)
|
---|
262 | #define PSN_WIZBACK (PSN_FIRST-6)
|
---|
263 | #define PSN_WIZNEXT (PSN_FIRST-7)
|
---|
264 | #define PSN_WIZFINISH (PSN_FIRST-8)
|
---|
265 | #define PSN_QUERYCANCEL (PSN_FIRST-9)
|
---|
266 |
|
---|
267 | #define PSNRET_NOERROR 0
|
---|
268 | #define PSNRET_INVALID 1
|
---|
269 | #define PSNRET_INVALID_NOCHANGEPAGE 2
|
---|
270 |
|
---|
271 |
|
---|
272 | #define PSM_SETCURSEL (WM_USER + 101)
|
---|
273 | #define PSM_REMOVEPAGE (WM_USER + 102)
|
---|
274 | #define PSM_ADDPAGE (WM_USER + 103)
|
---|
275 | #define PSM_CHANGED (WM_USER + 104)
|
---|
276 | #define PSM_RESTARTWINDOWS (WM_USER + 105)
|
---|
277 | #define PSM_REBOOTSYSTEM (WM_USER + 106)
|
---|
278 | #define PSM_CANCELTOCLOSE (WM_USER + 107)
|
---|
279 | #define PSM_QUERYSIBLINGS (WM_USER + 108)
|
---|
280 | #define PSM_UNCHANGED (WM_USER + 109)
|
---|
281 | #define PSM_APPLY (WM_USER + 110)
|
---|
282 | #define PSM_SETTITLEA (WM_USER + 111)
|
---|
283 | #define PSM_SETTITLEW (WM_USER + 120)
|
---|
284 | #define PSM_SETTITLE WINELIB_NAME_AW(PSM_SETTITLE)
|
---|
285 | #define PSM_SETWIZBUTTONS (WM_USER + 112)
|
---|
286 | #define PSM_PRESSBUTTON (WM_USER + 113)
|
---|
287 | #define PSM_SETCURSELID (WM_USER + 114)
|
---|
288 | #define PSM_SETFINISHTEXTA (WM_USER + 115)
|
---|
289 | #define PSM_SETFINISHTEXTW (WM_USER + 121)
|
---|
290 | #define PSM_SETFINISHTEXT WINELIB_NAME_AW(PSM_SETFINISHTEXT)
|
---|
291 | #define PSM_GETTABCONTROL (WM_USER + 116)
|
---|
292 | #define PSM_ISDIALOGMESSAGE (WM_USER + 117)
|
---|
293 | #define PSM_GETCURRENTPAGEHWND (WM_USER + 118)
|
---|
294 |
|
---|
295 | #define PSWIZB_BACK 0x00000001
|
---|
296 | #define PSWIZB_NEXT 0x00000002
|
---|
297 | #define PSWIZB_FINISH 0x00000004
|
---|
298 | #define PSWIZB_DISABLEDFINISH 0x00000008
|
---|
299 |
|
---|
300 | #define PSBTN_BACK 0
|
---|
301 | #define PSBTN_NEXT 1
|
---|
302 | #define PSBTN_FINISH 2
|
---|
303 | #define PSBTN_OK 3
|
---|
304 | #define PSBTN_APPLYNOW 4
|
---|
305 | #define PSBTN_CANCEL 5
|
---|
306 | #define PSBTN_HELP 6
|
---|
307 | #define PSBTN_MAX 6
|
---|
308 |
|
---|
309 | #define ID_PSRESTARTWINDOWS 0x2
|
---|
310 | #define ID_PSREBOOTSYSTEM (ID_PSRESTARTWINDOWS | 0x1)
|
---|
311 |
|
---|
312 |
|
---|
313 | #define WIZ_CXDLG 276
|
---|
314 | #define WIZ_CYDLG 140
|
---|
315 |
|
---|
316 | #define WIZ_CXBMP 80
|
---|
317 |
|
---|
318 | #define WIZ_BODYX 92
|
---|
319 | #define WIZ_BODYCX 184
|
---|
320 |
|
---|
321 | #define PROP_SM_CXDLG 212
|
---|
322 | #define PROP_SM_CYDLG 188
|
---|
323 |
|
---|
324 | #define PROP_MED_CXDLG 227
|
---|
325 | #define PROP_MED_CYDLG 215
|
---|
326 |
|
---|
327 | #define PROP_LG_CXDLG 252
|
---|
328 | #define PROP_LG_CYDLG 218
|
---|
329 |
|
---|
330 | /*
|
---|
331 | * Property sheet support (macros)
|
---|
332 | */
|
---|
333 |
|
---|
334 | #define PropSheet_SetCurSel(hDlg, hpage, index) \
|
---|
335 | SendMessageA(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
|
---|
336 |
|
---|
337 | #define PropSheet_RemovePage(hDlg, index, hpage) \
|
---|
338 | SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
|
---|
339 |
|
---|
340 | #define PropSheet_AddPage(hDlg, hpage) \
|
---|
341 | SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
|
---|
342 |
|
---|
343 | #define PropSheet_Changed(hDlg, hwnd) \
|
---|
344 | SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
|
---|
345 |
|
---|
346 | #define PropSheet_RestartWindows(hDlg) \
|
---|
347 | SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
|
---|
348 |
|
---|
349 | #define PropSheet_RebootSystem(hDlg) \
|
---|
350 | SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
|
---|
351 |
|
---|
352 | #define PropSheet_CancelToClose(hDlg) \
|
---|
353 | PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
|
---|
354 |
|
---|
355 | #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
|
---|
356 | SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
|
---|
357 |
|
---|
358 | #define PropSheet_UnChanged(hDlg, hwnd) \
|
---|
359 | SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
|
---|
360 |
|
---|
361 | #define PropSheet_Apply(hDlg) \
|
---|
362 | SNDMSG(hDlg, PSM_APPLY, 0, 0L)
|
---|
363 |
|
---|
364 | #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
|
---|
365 | SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
|
---|
366 |
|
---|
367 | #define PropSheet_SetWizButtons(hDlg, dwFlags) \
|
---|
368 | PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
|
---|
369 |
|
---|
370 | #define PropSheet_PressButton(hDlg, iButton) \
|
---|
371 | PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
|
---|
372 |
|
---|
373 | #define PropSheet_SetCurSelByID(hDlg, id) \
|
---|
374 | SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
|
---|
375 |
|
---|
376 | #define PropSheet_SetFinishText(hDlg, lpszText) \
|
---|
377 | SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
|
---|
378 |
|
---|
379 | #define PropSheet_GetTabControl(hDlg) \
|
---|
380 | (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
|
---|
381 |
|
---|
382 | #define PropSheet_IsDialogMessage(hDlg, pMsg) \
|
---|
383 | (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
|
---|
384 |
|
---|
385 | #define PropSheet_GetCurrentPageHwnd(hDlg) \
|
---|
386 | (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
|
---|
387 |
|
---|
388 |
|
---|
389 | #ifdef __cplusplus
|
---|
390 | }
|
---|
391 | #endif
|
---|
392 |
|
---|
393 |
|
---|
394 |
|
---|
395 | #endif /* _WINE_PRSHT_H */
|
---|