prsht.h 17.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (C) the Wine project
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 18
 */

19 20
#ifndef __WINE_PRSHT_H
#define __WINE_PRSHT_H
21 22 23 24 25 26 27 28 29 30 31

#ifdef __cplusplus
extern "C" {
#endif


/*
 * Property sheet support (callback procs)
 */


32
#define WC_PROPSHEETA      "SysPropertySheet"
33
#if defined(_MSC_VER) || defined(__MINGW32__)
34 35
# define WC_PROPSHEETW     L"SysPropertySheet"
#else
36 37
static const WCHAR WC_PROPSHEETW[] = { 'S','y','s',
  'P','r','o','p','e','r','t','y','S','h','e','e','t',0 };
38
#endif
39 40
#define WC_PROPSHEET         WINELIB_NAME_AW(WC_PROPSHEET)

41 42
struct _PROPSHEETPAGEA;  /** need to forward declare those structs **/
struct _PROPSHEETPAGEW;
43
struct _PSP;
44 45
#ifndef _HPROPSHEETPAGE_DEFINED
#define _HPROPSHEETPAGE_DEFINED
46
typedef struct _PSP *HPROPSHEETPAGE;
47
#endif /* _HPROPSHEETPAGE_DEFINED */
48 49


50 51 52 53 54
typedef UINT (CALLBACK *LPFNPSPCALLBACKA)(HWND, UINT, struct _PROPSHEETPAGEA*);
typedef UINT (CALLBACK *LPFNPSPCALLBACKW)(HWND, UINT, struct _PROPSHEETPAGEW*);
typedef INT  (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
55 56 57 58

/*
 * Property sheet support (structures)
 */
59 60 61 62 63

typedef LPCDLGTEMPLATEA PROPSHEETPAGE_RESOURCEA;
typedef LPCDLGTEMPLATEW PROPSHEETPAGE_RESOURCEW;
DECL_WINELIB_TYPE_AW(PROPSHEETPAGE_RESOURCE)

64
typedef struct _PROPSHEETPAGEA
65 66 67
{
    DWORD              dwSize;
    DWORD              dwFlags;
68
    HINSTANCE          hInstance;
69
    union
70
    {
71 72 73
        LPCSTR         pszTemplate;
        PROPSHEETPAGE_RESOURCEA pResource;
    } DUMMYUNIONNAME;
74 75
    union
    {
76
        HICON          hIcon;
77 78
        LPCSTR         pszIcon;
    } DUMMYUNIONNAME2;
79
    LPCSTR             pszTitle;
80
    DLGPROC            pfnDlgProc;
81
    LPARAM             lParam;
82 83
    LPFNPSPCALLBACKA   pfnCallback;
    UINT*              pcRefParent;
84 85
    LPCSTR             pszHeaderTitle;
    LPCSTR             pszHeaderSubTitle;
86 87 88 89 90 91 92 93 94 95 96 97 98
    HANDLE             hActCtx;
    union
    {
        HBITMAP        hbmHeader;
        LPCSTR         pszbmHeader;
    } DUMMYUNIONNAME3;
} PROPSHEETPAGEA, *LPPROPSHEETPAGEA,
  PROPSHEETPAGEA_LATEST, *LPPROPSHEETPAGEA_LATEST;

typedef const PROPSHEETPAGEA *LPCPROPSHEETPAGEA, *LPCPROPSHEETPAGEA_LATEST;
#define PROPSHEETPAGEA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pcRefParent)
#define PROPSHEETPAGEA_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pszHeaderSubTitle)
#define PROPSHEETPAGEA_V3_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, hActCtx)
99
#define PROPSHEETPAGEA_V4_SIZE sizeof(PROPSHEETPAGEA)
100

101
typedef struct _PROPSHEETPAGEW
102
{
103 104 105
    DWORD              dwSize;
    DWORD              dwFlags;
    HINSTANCE          hInstance;
106
    union
107
    {
108 109 110
        LPCWSTR        pszTemplate;
        PROPSHEETPAGE_RESOURCEW pResource;
    } DUMMYUNIONNAME;
111 112
    union
    {
113
        HICON          hIcon;
114 115
        LPCWSTR        pszIcon;
    } DUMMYUNIONNAME2;
116
    LPCWSTR            pszTitle;
117
    DLGPROC            pfnDlgProc;
118
    LPARAM             lParam;
119 120
    LPFNPSPCALLBACKW   pfnCallback;
    UINT*              pcRefParent;
121 122
    LPCWSTR            pszHeaderTitle;
    LPCWSTR            pszHeaderSubTitle;
123 124 125 126 127 128 129 130
    HANDLE             hActCtx;
    union
    {
        HBITMAP        hbmHeader;
        LPCWSTR        pszbmHeader;
    } DUMMYUNIONNAME3;
} PROPSHEETPAGEW, *LPPROPSHEETPAGEW,
  PROPSHEETPAGEW_LATEST, *LPPROPSHEETPAGEW_LATEST;
131

132 133 134 135
typedef const PROPSHEETPAGEW *LPCPROPSHEETPAGEW, *LPCPROPSHEETPAGEW_LATEST;
#define PROPSHEETPAGEW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pcRefParent)
#define PROPSHEETPAGEW_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pszHeaderSubTitle)
#define PROPSHEETPAGEW_V3_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, hActCtx)
136
#define PROPSHEETPAGEW_V4_SIZE sizeof(PROPSHEETPAGEW)
137 138


139
typedef struct _PROPSHEETHEADERA
140 141 142
{
    DWORD                    dwSize;
    DWORD                    dwFlags;
143 144
    HWND                   hwndParent;
    HINSTANCE              hInstance;
145 146
    union
    {
147
      HICON                  hIcon;
148
      LPCSTR                   pszIcon;
149
    }DUMMYUNIONNAME;
150
    LPCSTR                   pszCaption;
151
    UINT                   nPages;
152 153
    union
    {
154
        UINT                 nStartPage;
155 156 157 158
        LPCSTR                 pStartPage;
    }DUMMYUNIONNAME2;
    union
    {
159
        LPCPROPSHEETPAGEA    ppsp;
160 161
        HPROPSHEETPAGE*        phpage;
    }DUMMYUNIONNAME3;
162
    PFNPROPSHEETCALLBACK   pfnCallback;
163 164
    union
    {
165
        HBITMAP              hbmWatermark;
166 167
        LPCSTR                 pszbmWatermark;
    }DUMMYUNIONNAME4;
168
    HPALETTE               hplWatermark;
169 170
    union
    {
171
        HBITMAP              hbmHeader;
172 173
        LPCSTR                 pszbmHeader;
    }DUMMYUNIONNAME5;
174
} PROPSHEETHEADERA, *LPPROPSHEETHEADERA;
175

176
typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
177 178
#define PROPSHEETHEADERA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, pfnCallback)
#define PROPSHEETHEADERA_V2_SIZE sizeof(PROPSHEETHEADERA)
179

180
typedef struct _PROPSHEETHEADERW
181 182 183
{
    DWORD                    dwSize;
    DWORD                    dwFlags;
184 185
    HWND                   hwndParent;
    HINSTANCE              hInstance;
186 187
    union
    {
188
      HICON                  hIcon;
189 190
      LPCWSTR                   pszIcon;
    }DUMMYUNIONNAME;
191
    LPCWSTR                  pszCaption;
192
    UINT                   nPages;
193 194
    union
    {
195
        UINT                 nStartPage;
196 197 198 199
        LPCWSTR                pStartPage;
    }DUMMYUNIONNAME2;
    union
    {
200
        LPCPROPSHEETPAGEW    ppsp;
201 202
        HPROPSHEETPAGE*        phpage;
    }DUMMYUNIONNAME3;
203
    PFNPROPSHEETCALLBACK   pfnCallback;
204 205
    union
    {
206
        HBITMAP              hbmWatermark;
207 208
        LPCWSTR                pszbmWatermark;
    }DUMMYUNIONNAME4;
209
    HPALETTE               hplWatermark;
210 211
    union
    {
212
        HBITMAP              hbmHeader;
213 214
        LPCWSTR                pszbmHeader;
    }DUMMYUNIONNAME5;
215
} PROPSHEETHEADERW, *LPPROPSHEETHEADERW;
216

217
typedef const PROPSHEETHEADERW *LPCPROPSHEETHEADERW;
218 219
#define PROPSHEETHEADERW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, pfnCallback)
#define PROPSHEETHEADERW_V2_SIZE sizeof(PROPSHEETHEADERW)
220 221 222 223 224


/*
 * Property sheet support (methods)
 */
Frank Richter's avatar
Frank Richter committed
225 226
INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
227
#define PropertySheet WINELIB_NAME_AW(PropertySheet)
228 229
HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
230
#define CreatePropertySheetPage WINELIB_NAME_AW(CreatePropertySheetPage)
231
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage);
232 233

/*
234
 * Property sheet support (UNICODE-Winelib)
235 236
 */

237 238 239 240 241 242 243
DECL_WINELIB_TYPE_AW(PROPSHEETPAGE)
DECL_WINELIB_TYPE_AW(LPPROPSHEETPAGE)
DECL_WINELIB_TYPE_AW(LPCPROPSHEETPAGE)
DECL_WINELIB_TYPE_AW(PROPSHEETHEADER)
DECL_WINELIB_TYPE_AW(LPPROPSHEETHEADER)
DECL_WINELIB_TYPE_AW(LPCPROPSHEETHEADER)
DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK)
244

245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
#ifdef WINE_NO_UNICODE_MACROS
# define PRSHT_NAME_AW(base, suffix)                  \
    base##_##suffix##_must_use_W_or_A_in_this_context \
    base##_##suffix##_must_use_W_or_A_in_this_context
# define DECL_PRSHT_TYPE_AW(base, suffix)  /* nothing */
#else  /* WINE_NO_UNICODE_MACROS */
# ifdef UNICODE
#  define PRSHT_NAME_AW(base, suffix) base##W_##suffix
# else
#  define PRSHT_NAME_AW(base, suffix) base##A_##suffix
# endif
# define DECL_PRSHT_TYPE_AW(base, suffix)  typedef PRSHT_NAME_AW(base, suffix) base##_##suffix;
#endif  /* WINE_NO_UNICODE_MACROS */

DECL_PRSHT_TYPE_AW(PROPSHEETPAGE, LATEST)
DECL_PRSHT_TYPE_AW(LPPROPSHEETPAGE, LATEST)
DECL_PRSHT_TYPE_AW(LPCPROPSHEETPAGE, LATEST)
#define PROPSHEETPAGE_V1_SIZE    PRSHT_NAME_AW(PROPSHEETPAGE, V1_SIZE)
#define PROPSHEETPAGE_V2_SIZE    PRSHT_NAME_AW(PROPSHEETPAGE, V2_SIZE)
#define PROPSHEETPAGE_V3_SIZE    PRSHT_NAME_AW(PROPSHEETPAGE, V3_SIZE)
#define PROPSHEETPAGE_V4_SIZE    PRSHT_NAME_AW(PROPSHEETPAGE, V4_SIZE)
#define PROPSHEETHEADER_V1_SIZE  PRSHT_NAME_AW(PROPSHEETHEADER, V1_SIZE)
#define PROPSHEETHEADER_V2_SIZE  PRSHT_NAME_AW(PROPSHEETHEADER, V2_SIZE)

#undef PRSHT_NAME_AW
#undef DECL_PRSHT_TYPE_AW
271 272 273 274 275 276 277 278 279 280 281 282 283 284

/*
 * Property sheet support (defines)
 */
#define PSP_DEFAULT             0x0000
#define PSP_DLGINDIRECT         0x0001
#define PSP_USEHICON            0x0002
#define PSP_USEICONID           0x0004
#define PSP_USETITLE            0x0008
#define PSP_RTLREADING          0x0010

#define PSP_HASHELP             0x0020
#define PSP_USEREFPARENT        0x0040
#define PSP_USECALLBACK         0x0080
Alexandre Julliard's avatar
Alexandre Julliard committed
285
#define PSP_PREMATURE           0x0400
286

Alexandre Julliard's avatar
Alexandre Julliard committed
287 288 289
#define PSP_HIDEHEADER          0x00000800
#define PSP_USEHEADERTITLE      0x00001000
#define PSP_USEHEADERSUBTITLE   0x00002000
290 291
#define PSP_USEFUSIONCONTEXT    0x00004000
#define PSP_COMMANDLINKS        0x00040000
292

293
#define PSPCB_ADDREF            0
294 295 296 297 298 299 300 301
#define PSPCB_RELEASE           1
#define PSPCB_CREATE            2

#define PSH_DEFAULT             0x0000
#define PSH_PROPTITLE           0x0001
#define PSH_USEHICON            0x0002
#define PSH_USEICONID           0x0004
#define PSH_PROPSHEETPAGE       0x0008
302
#define PSH_WIZARDHASFINISH     0x0010
303 304 305 306 307 308 309
#define PSH_WIZARD              0x0020
#define PSH_USEPSTARTPAGE       0x0040
#define PSH_NOAPPLYNOW          0x0080
#define PSH_USECALLBACK         0x0100
#define PSH_HASHELP             0x0200
#define PSH_MODELESS            0x0400
#define PSH_RTLREADING          0x0800
Alexandre Julliard's avatar
Alexandre Julliard committed
310 311
#define PSH_WIZARDCONTEXTHELP   0x00001000

312
#define PSH_WIZARD97_OLD        0x00002000 /* for IE < 5 */
313
#define PSH_AEROWIZARD          0x00004000
Alexandre Julliard's avatar
Alexandre Julliard committed
314 315 316 317 318 319 320
#define PSH_WATERMARK           0x00008000
#define PSH_USEHBMWATERMARK     0x00010000
#define PSH_USEHPLWATERMARK     0x00020000
#define PSH_STRETCHWATERMARK    0x00040000
#define PSH_HEADER              0x00080000
#define PSH_USEHBMHEADER        0x00100000
#define PSH_USEPAGELANG         0x00200000
321
#define PSH_WIZARD_LITE         0x00400000
322
#define PSH_WIZARD97_NEW        0x01000000 /* for IE >= 5 */
323
#define PSH_NOCONTEXTHELP       0x02000000
324 325 326
#define PSH_RESIZABLE           0x04000000
#define PSH_HEADERBITMAP        0x08000000
#define PSH_NOMARGIN            0x10000000
327
#ifndef __WINESRC__
328
# if defined(_WIN32_IE) && (_WIN32_IE < 0x0500)
329 330 331 332 333
#  define PSH_WIZARD97          PSH_WIZARD97_OLD
# else
#  define PSH_WIZARD97          PSH_WIZARD97_NEW
# endif
#endif
334

335 336 337
#define PSCB_INITIALIZED  1
#define PSCB_PRECREATE    2

Alexandre Julliard's avatar
Alexandre Julliard committed
338 339 340 341 342
typedef struct _PSHNOTIFY
{
   NMHDR hdr;
   LPARAM lParam;
} PSHNOTIFY, *LPPSHNOTIFY;
343

344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
#define PSN_FIRST               (0U-200U)
#define PSN_LAST                (0U-299U)


#define PSN_SETACTIVE           (PSN_FIRST-0)
#define PSN_KILLACTIVE          (PSN_FIRST-1)
/* #define PSN_VALIDATE            (PSN_FIRST-1) */
#define PSN_APPLY               (PSN_FIRST-2)
#define PSN_RESET               (PSN_FIRST-3)
/* #define PSN_CANCEL              (PSN_FIRST-3) */
#define PSN_HELP                (PSN_FIRST-5)
#define PSN_WIZBACK             (PSN_FIRST-6)
#define PSN_WIZNEXT             (PSN_FIRST-7)
#define PSN_WIZFINISH           (PSN_FIRST-8)
#define PSN_QUERYCANCEL         (PSN_FIRST-9)
Francois Gouget's avatar
Francois Gouget committed
359
#define PSN_GETOBJECT           (PSN_FIRST-10)
360 361
#define PSN_TRANSLATEACCELERATOR (PSN_FIRST-12)
#define PSN_QUERYINITIALFOCUS   (PSN_FIRST-13)
362 363 364 365

#define PSNRET_NOERROR              0
#define PSNRET_INVALID              1
#define PSNRET_INVALID_NOCHANGEPAGE 2
366

367 368 369 370 371 372 373 374 375 376 377

#define PSM_SETCURSEL           (WM_USER + 101)
#define PSM_REMOVEPAGE          (WM_USER + 102)
#define PSM_ADDPAGE             (WM_USER + 103)
#define PSM_CHANGED             (WM_USER + 104)
#define PSM_RESTARTWINDOWS      (WM_USER + 105)
#define PSM_REBOOTSYSTEM        (WM_USER + 106)
#define PSM_CANCELTOCLOSE       (WM_USER + 107)
#define PSM_QUERYSIBLINGS       (WM_USER + 108)
#define PSM_UNCHANGED           (WM_USER + 109)
#define PSM_APPLY               (WM_USER + 110)
378 379
#define PSM_SETTITLEA         (WM_USER + 111)
#define PSM_SETTITLEW         (WM_USER + 120)
380 381 382 383
#define PSM_SETTITLE WINELIB_NAME_AW(PSM_SETTITLE)
#define PSM_SETWIZBUTTONS       (WM_USER + 112)
#define PSM_PRESSBUTTON         (WM_USER + 113)
#define PSM_SETCURSELID         (WM_USER + 114)
384 385
#define PSM_SETFINISHTEXTA    (WM_USER + 115)
#define PSM_SETFINISHTEXTW    (WM_USER + 121)
386 387 388 389
#define PSM_SETFINISHTEXT WINELIB_NAME_AW(PSM_SETFINISHTEXT)
#define PSM_GETTABCONTROL       (WM_USER + 116)
#define PSM_ISDIALOGMESSAGE     (WM_USER + 117)
#define PSM_GETCURRENTPAGEHWND  (WM_USER + 118)
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
#define PSM_INSERTPAGE          (WM_USER + 119)
#define PSM_SETHEADERTITLEA     (WM_USER + 125)
#define PSM_SETHEADERTITLEW     (WM_USER + 126)
#define PSM_SETHEADERTITLE      WINELIB_NAME_AW(PSM_SETHEADERTITLE)
#define PSM_SETHEADERSUBTITLEA  (WM_USER + 127)
#define PSM_SETHEADERSUBTITLEW  (WM_USER + 128)
#define PSM_SETHEADERSUBTITLE   WINELIB_NAME_AW(PSM_SETHEADERSUBTITLE)
#define PSM_HWNDTOINDEX         (WM_USER + 129)
#define PSM_INDEXTOHWND         (WM_USER + 130)
#define PSM_PAGETOINDEX         (WM_USER + 131)
#define PSM_INDEXTOPAGE         (WM_USER + 132)
#define PSM_IDTOINDEX           (WM_USER + 133)
#define PSM_INDEXTOID           (WM_USER + 134)
#define PSM_GETRESULT           (WM_USER + 135)
#define PSM_RECALCPAGESIZES     (WM_USER + 136)
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445

#define PSWIZB_BACK             0x00000001
#define PSWIZB_NEXT             0x00000002
#define PSWIZB_FINISH           0x00000004
#define PSWIZB_DISABLEDFINISH   0x00000008

#define PSBTN_BACK              0
#define PSBTN_NEXT              1
#define PSBTN_FINISH            2
#define PSBTN_OK                3
#define PSBTN_APPLYNOW          4
#define PSBTN_CANCEL            5
#define PSBTN_HELP              6
#define PSBTN_MAX               6

#define ID_PSRESTARTWINDOWS     0x2
#define ID_PSREBOOTSYSTEM       (ID_PSRESTARTWINDOWS | 0x1)


#define WIZ_CXDLG               276
#define WIZ_CYDLG               140

#define WIZ_CXBMP               80

#define WIZ_BODYX               92
#define WIZ_BODYCX              184

#define PROP_SM_CXDLG           212
#define PROP_SM_CYDLG           188

#define PROP_MED_CXDLG          227
#define PROP_MED_CYDLG          215

#define PROP_LG_CXDLG           252
#define PROP_LG_CYDLG           218

/*
 * Property sheet support (macros)
 */

#define PropSheet_SetCurSel(hDlg, hpage, index) \
446
	SendMessageA(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
447

448 449
#define PropSheet_RemovePage(hDlg, index, hpage) \
	SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
450

451 452
#define PropSheet_AddPage(hDlg, hpage) \
	SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
453

454
#define PropSheet_Changed(hDlg, hwnd) \
455
        SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0)
456

457
#define PropSheet_RestartWindows(hDlg) \
458
        SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0)
459

460
#define PropSheet_RebootSystem(hDlg) \
461
        SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0)
462

463
#define PropSheet_CancelToClose(hDlg) \
464
        PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0)
465

466 467
#define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
	SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
468

469
#define PropSheet_UnChanged(hDlg, hwnd) \
470
        SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0)
471

472
#define PropSheet_Apply(hDlg) \
473
        SNDMSG(hDlg, PSM_APPLY, 0, 0)
474

475 476
#define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
	SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
477

478 479
#define PropSheet_SetWizButtons(hDlg, dwFlags) \
	PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
480

481 482
#define PropSheet_PressButton(hDlg, iButton) \
	PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
483

484 485 486 487 488
#define PropSheet_SetCurSelByID(hDlg, id) \
	SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)

#define PropSheet_SetFinishText(hDlg, lpszText) \
	SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
489

490 491
#define PropSheet_GetTabControl(hDlg) \
	(HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
492

493 494
#define PropSheet_IsDialogMessage(hDlg, pMsg) \
	(BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
495

496
#define PropSheet_GetCurrentPageHwnd(hDlg) \
497
        (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0)
498

499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530
#define PropSheet_InsertPage(hDlg, index, hpage) \
        SNDMSG(hDlg, PSM_INSERTPAGE, (WPARAM)(index), (LPARAM)(hpage))

#define PropSheet_SetHeaderTitle(hDlg, index, lpszText) \
        SNDMSG(hDlg, PSM_SETHEADERTITLE, (WPARAM)(index), (LPARAM)(lpszText))

#define PropSheet_SetHeaderSubTitle(hDlg, index, lpszText) \
        SNDMSG(hDlg, PSM_SETHEADERSUBTITLE, (WPARAM)(index), (LPARAM)(lpszText))

#define PropSheet_HwndToIndex(hDlg, hwnd) \
        (int)SNDMSG(hDlg, PSM_HWNDTOINDEX, (WPARAM)(hwnd), 0)

#define PropSheet_IndexToHwnd(hDlg, i) \
        (HWND)SNDMSG(hDlg, PSM_INDEXTOHWND, (WPARAM)(i), 0)

#define PropSheet_PageToIndex(hDlg, hpage) \
        (int)SNDMSG(hDlg, PSM_PAGETOINDEX, 0, (LPARAM)(hpage))

#define PropSheet_IndexToPage(hDlg, i) \
        (HPROPSHEETPAGE)SNDMSG(hDlg, PSM_INDEXTOPAGE, (WPARAM)(i), 0)

#define PropSheet_IdToIndex(hDlg, id) \
        (int)SNDMSG(hDlg, PSM_IDTOINDEX, 0, (LPARAM)(id))

#define PropSheet_IndexToId(hDlg, i) \
        SNDMSG(hDlg, PSM_INDEXTOID, (WPARAM)(i), 0)

#define PropSheet_GetResult(hDlg) \
        SNDMSG(hDlg, PSM_GETRESULT, 0, 0)

#define PropSheet_RecalcPageSizes(hDlg) \
        SNDMSG(hDlg, PSM_RECALCPAGESIZES, 0, 0)
531 532 533 534 535

#ifdef __cplusplus
}
#endif

536
#endif /* __WINE_PRSHT_H */