ifndef _PRSHT_H_
define _PRSHT_H_
ifndef __LIBC_INC
include libc.inc
endif

ifndef _WIN32_IE
define _WIN32_IE 0x0400
else
if (_WIN32_IE LT 0x0400) AND defined(_WIN32_WINNT) AND (_WIN32_WINNT GE 0x0500)
.err <_WIN32_IE setting conflicts with _WIN32_WINNT setting>
endif
endif

ifndef CCSIZEOF_STRUCT
CCSIZEOF_STRUCT macro structname, member
	exitm<sizeof(structname.member)>
	endm
endif

.pragma pack(push, size_t)

ifndef SNDMSG
define SNDMSG <SendMessage>
endif

define MAXPROPPAGES 100
HPROPSHEETPAGE typedef ptr

CALLBACK(LPFNPSPCALLBACKA, :HWND, :UINT, :ptr)
CALLBACK(LPFNPSPCALLBACKW, :HWND, :UINT, :ptr)
ifdef _UNICODE
define LPFNPSPCALLBACK <LPFNPSPCALLBACKW>
else
define LPFNPSPCALLBACK <LPFNPSPCALLBACKA>
endif

define PSP_DEFAULT		0x00000000
define PSP_DLGINDIRECT		0x00000001
define PSP_USEHICON		0x00000002
define PSP_USEICONID		0x00000004
define PSP_USETITLE		0x00000008
define PSP_RTLREADING		0x00000010

define PSP_HASHELP		0x00000020
define PSP_USEREFPARENT		0x00000040
define PSP_USECALLBACK		0x00000080
define PSP_PREMATURE		0x00000400

if (_WIN32_IE GE 0x0400)
define PSP_HIDEHEADER		0x00000800
define PSP_USEHEADERTITLE	0x00001000
define PSP_USEHEADERSUBTITLE	0x00002000
endif
if (NTDDI_VERSION ge NTDDI_WINXP) or ISOLATION_AWARE_ENABLED
define PSP_USEFUSIONCONTEXT	0x00004000
endif

define PSPCB_ADDREF		0
define PSPCB_RELEASE		1
define PSPCB_CREATE		2

PROPSHEETPAGE_RESOURCE typedef ptr

PROPSHEETPAGEA_V1_FIELDS macro
	dwSize		dd ?
	dwFlags		dd ?
	hInstance	HINSTANCE ?
	UNION
	 pszTemplate	LPCSTR ?
	 pResource	PVOID ?
	ENDS
	UNION
	 hIcon		HICON ?
	 pszIcon	LPCSTR ?
	ENDS
	pszTitle	LPCSTR ?
	pfnDlgProc	DLGPROC ?
	lParam		LPARAM ?
	pfnCallback	LPFNPSPCALLBACKA ?
	pcRefParent	LPDWORD ?
	endm

PROPSHEETPAGEW_V1_FIELDS macro
	dwSize		dd ?
	dwFlags		dd ?
	hInstance	HINSTANCE ?
	UNION
	 pszTemplate	LPCWSTR ?
	 pResource	PVOID ?
	ENDS
	UNION
	 hIcon		HICON ?
	 pszIcon	LPCWSTR ?
	ENDS
	pszTitle	LPCWSTR ?
	pfnDlgProc	DLGPROC ?
	lParam		LPARAM ?
	pfnCallback	LPFNPSPCALLBACKW ?
	pcRefParent	PVOID ?
	endm

if (NTDDI_VERSION ge NTDDI_VISTA)
define _PROPSHEETPAGEA_V4 <_PROPSHEETPAGEA>
define _PROPSHEETPAGEW_V4 <_PROPSHEETPAGEW>
elseif (NTDDI_VERSION ge NTDDI_WINXP) or ISOLATION_AWARE_ENABLED
define _PROPSHEETPAGEA_V3 <_PROPSHEETPAGEA>
define _PROPSHEETPAGEW_V3 <_PROPSHEETPAGEW>
else
define _PROPSHEETPAGEA_V2 <_PROPSHEETPAGEA>
define _PROPSHEETPAGEW_V2 <_PROPSHEETPAGEW>
endif

PROPSHEETPAGEA_V1	struct
PROPSHEETPAGEA_V1_FIELDS
PROPSHEETPAGEA_V1	ends
LPPROPSHEETPAGEA_V1	typedef ptr PROPSHEETPAGEA_V1
LPCPROPSHEETPAGEA_V1	typedef ptr PROPSHEETPAGEA_V1

PROPSHEETPAGEA_V2	struct
PROPSHEETPAGEA_V1_FIELDS
pszHeaderTitle		LPCSTR ?
pszHeaderSubTitle	LPCSTR ?
PROPSHEETPAGEA_V2	ends
LPPROPSHEETPAGEA_V2	typedef ptr PROPSHEETPAGEA_V2
LPCPROPSHEETPAGEA_V2	typedef ptr PROPSHEETPAGEA_V2

PROPSHEETPAGEA_V3	struct
PROPSHEETPAGEA_V1_FIELDS
pszHeaderTitle		LPCSTR ?
pszHeaderSubTitle	LPCSTR ?
hActCtx			HANDLE ?
PROPSHEETPAGEA_V3	ends
LPPROPSHEETPAGEA_V3	typedef ptr PROPSHEETPAGEA_V3
LPCPROPSHEETPAGEA_V3	typedef ptr PROPSHEETPAGEA_V3

if (NTDDI_VERSION ge NTDDI_VISTA)
PROPSHEETPAGEA_V4	struct
PROPSHEETPAGEA_V1_FIELDS
pszHeaderTitle		LPCSTR ?
pszHeaderSubTitle	LPCSTR ?
hActCtx			HANDLE ?
union
 hbmHeader		HBITMAP ?
 pszbmHeader		LPCSTR ?
ends
PROPSHEETPAGEA_V4	ends
LPPROPSHEETPAGEA_V4	typedef ptr PROPSHEETPAGEA_V4
LPCPROPSHEETPAGEA_V4	typedef ptr PROPSHEETPAGEA_V4
endif

PROPSHEETPAGEW_V1	struct
PROPSHEETPAGEW_V1_FIELDS
PROPSHEETPAGEW_V1	ends
LPPROPSHEETPAGEW_V1	typedef ptr PROPSHEETPAGEW_V1
LPCPROPSHEETPAGEW_V1	typedef ptr PROPSHEETPAGEW_V1

PROPSHEETPAGEW_V2	struct
PROPSHEETPAGEW_V1_FIELDS
pszHeaderTitle		LPCWSTR ?
pszHeaderSubTitle	LPCWSTR ?
PROPSHEETPAGEW_V2	ends
LPPROPSHEETPAGEW_V2	typedef ptr PROPSHEETPAGEW_V2
LPCPROPSHEETPAGEW_V2	typedef ptr PROPSHEETPAGEW_V2

PROPSHEETPAGEW_V3	struct
PROPSHEETPAGEW_V1_FIELDS
pszHeaderTitle		LPCWSTR ?
pszHeaderSubTitle	LPCWSTR ?
hActCtx			HANDLE ?
PROPSHEETPAGEW_V3	ends
LPPROPSHEETPAGEW_V3	typedef ptr PROPSHEETPAGEW_V3
LPCPROPSHEETPAGEW_V3	typedef ptr PROPSHEETPAGEW_V3

if (NTDDI_VERSION ge NTDDI_VISTA)
PROPSHEETPAGEW_V4	struct
PROPSHEETPAGEW_V1_FIELDS
pszHeaderTitle		LPCWSTR ?
pszHeaderSubTitle	LPCWSTR ?
hActCtx			HANDLE ?
union
 hbmHeader		HBITMAP ?
 pszbmHeader		LPCWSTR ?
ends
PROPSHEETPAGEW_V4	ends
LPPROPSHEETPAGEW_V4	typedef ptr PROPSHEETPAGEW_V4
LPCPROPSHEETPAGEW_V4	typedef ptr PROPSHEETPAGEW_V4
endif

define PROPSHEETPAGEA_V1_SIZE sizeof(PROPSHEETPAGEA_V1)
define PROPSHEETPAGEW_V1_SIZE sizeof(PROPSHEETPAGEW_V1)

define PROPSHEETPAGEA_V2_SIZE sizeof(PROPSHEETPAGEA_V2)
define PROPSHEETPAGEW_V2_SIZE sizeof(PROPSHEETPAGEW_V2)

define PROPSHEETPAGEA_V3_SIZE sizeof(PROPSHEETPAGEA_V3)
define PROPSHEETPAGEW_V3_SIZE sizeof(PROPSHEETPAGEW_V3)

if (NTDDI_VERSION ge NTDDI_VISTA)
define PROPSHEETPAGEA_V4_SIZE sizeof(PROPSHEETPAGEA_V4)
define PROPSHEETPAGEW_V4_SIZE sizeof(PROPSHEETPAGEW_V4)
endif

if (NTDDI_VERSION ge NTDDI_VISTA)
PROPSHEETPAGEA_LATEST		typedef PROPSHEETPAGEA_V4
PROPSHEETPAGEW_LATEST		typedef PROPSHEETPAGEW_V4
LPPROPSHEETPAGEA_LATEST		typedef LPPROPSHEETPAGEA_V4
LPPROPSHEETPAGEW_LATEST		typedef LPPROPSHEETPAGEW_V4
LPCPROPSHEETPAGEA_LATEST	typedef LPCPROPSHEETPAGEA_V4
LPCPROPSHEETPAGEW_LATEST	typedef LPCPROPSHEETPAGEW_V4
else
PROPSHEETPAGEA_LATEST		typedef PROPSHEETPAGEA_V3
PROPSHEETPAGEW_LATEST		typedef PROPSHEETPAGEW_V3
LPPROPSHEETPAGEA_LATEST		typedef LPPROPSHEETPAGEA_V3
LPPROPSHEETPAGEW_LATEST		typedef LPPROPSHEETPAGEW_V3
LPCPROPSHEETPAGEA_LATEST	typedef LPCPROPSHEETPAGEA_V3
LPCPROPSHEETPAGEW_LATEST	typedef LPCPROPSHEETPAGEW_V3
endif

if (NTDDI_VERSION ge NTDDI_VISTA)
PROPSHEETPAGEA		typedef PROPSHEETPAGEA_V4
PROPSHEETPAGEW		typedef PROPSHEETPAGEW_V4
LPPROPSHEETPAGEA	typedef LPPROPSHEETPAGEA_V4
LPPROPSHEETPAGEW	typedef LPPROPSHEETPAGEW_V4
LPCPROPSHEETPAGEA	typedef LPCPROPSHEETPAGEA_V4
LPCPROPSHEETPAGEW	typedef LPCPROPSHEETPAGEW_V4
elseif (NTDDI_VERSION ge NTDDI_WINXP) or ISOLATION_AWARE_ENABLED
PROPSHEETPAGEA		typedef PROPSHEETPAGEA_V3
PROPSHEETPAGEW		typedef PROPSHEETPAGEW_V3
LPPROPSHEETPAGEA	typedef LPPROPSHEETPAGEA_V3
LPPROPSHEETPAGEW	typedef LPPROPSHEETPAGEW_V3
LPCPROPSHEETPAGEA	typedef LPCPROPSHEETPAGEA_V3
LPCPROPSHEETPAGEW	typedef LPCPROPSHEETPAGEW_V3
else
PROPSHEETPAGEA		typedef PROPSHEETPAGEA_V2
PROPSHEETPAGEW		typedef PROPSHEETPAGEW_V2
LPPROPSHEETPAGEA	typedef LPPROPSHEETPAGEA_V2
LPPROPSHEETPAGEW	typedef LPPROPSHEETPAGEW_V2
LPCPROPSHEETPAGEA	typedef LPCPROPSHEETPAGEA_V2
LPCPROPSHEETPAGEW	typedef LPCPROPSHEETPAGEW_V2
endif

ifdef _UNICODE
PROPSHEETPAGE		typedef PROPSHEETPAGEW
LPPROPSHEETPAGE		typedef LPPROPSHEETPAGEW
LPCPROPSHEETPAGE	typedef LPCPROPSHEETPAGEW
define PROPSHEETPAGE_V1_SIZE	PROPSHEETPAGEW_V1_SIZE
define PROPSHEETPAGE_V2_SIZE	PROPSHEETPAGEW_V2_SIZE
PROPSHEETPAGE_V1	typedef PROPSHEETPAGEW_V1
LPPROPSHEETPAGE_V1	typedef LPPROPSHEETPAGEW_V1
LPCPROPSHEETPAGE_V1	typedef LPCPROPSHEETPAGEW_V1
PROPSHEETPAGE_V2	typedef PROPSHEETPAGEW_V2
LPPROPSHEETPAGE_V2	typedef LPPROPSHEETPAGEW_V2
LPCPROPSHEETPAGE_V2	typedef LPCPROPSHEETPAGEW_V2
PROPSHEETPAGE_V3	typedef PROPSHEETPAGEW_V3
LPPROPSHEETPAGE_V3	typedef LPPROPSHEETPAGEW_V3
LPCPROPSHEETPAGE_V3	typedef LPCPROPSHEETPAGEW_V3
if (NTDDI_VERSION ge NTDDI_VISTA)
PROPSHEETPAGE_V4	typedef PROPSHEETPAGEW_V4
LPPROPSHEETPAGE_V4	typedef LPPROPSHEETPAGEW_V4
LPCPROPSHEETPAGE_V4	typedef LPCPROPSHEETPAGEW_V4
endif
PROPSHEETPAGE_LATEST	typedef PROPSHEETPAGEW_LATEST
LPPROPSHEETPAGE_LATEST	typedef LPPROPSHEETPAGEW_LATEST
LPCPROPSHEETPAGE_LATEST typedef LPCPROPSHEETPAGEW_LATEST
else
PROPSHEETPAGE		typedef PROPSHEETPAGEA
LPPROPSHEETPAGE		typedef LPPROPSHEETPAGEA
LPCPROPSHEETPAGE	typedef LPCPROPSHEETPAGEA
define PROPSHEETPAGE_V1_SIZE	PROPSHEETPAGEA_V1_SIZE
define PROPSHEETPAGE_V2_SIZE	PROPSHEETPAGEA_V2_SIZE
PROPSHEETPAGE_V1	typedef PROPSHEETPAGEA_V1
LPPROPSHEETPAGE_V1	typedef LPPROPSHEETPAGEA_V1
LPCPROPSHEETPAGE_V1	typedef LPCPROPSHEETPAGEA_V1
PROPSHEETPAGE_V2	typedef PROPSHEETPAGEA_V2
LPPROPSHEETPAGE_V2	typedef LPPROPSHEETPAGEA_V2
LPCPROPSHEETPAGE_V2	typedef LPCPROPSHEETPAGEA_V2
PROPSHEETPAGE_V3	typedef PROPSHEETPAGEA_V3
LPPROPSHEETPAGE_V3	typedef LPPROPSHEETPAGEA_V3
LPCPROPSHEETPAGE_V3	typedef LPCPROPSHEETPAGEA_V3
if (NTDDI_VERSION ge NTDDI_VISTA)
PROPSHEETPAGE_V4	typedef PROPSHEETPAGEA_V4
LPPROPSHEETPAGE_V4	typedef LPPROPSHEETPAGEA_V4
LPCPROPSHEETPAGE_V4	typedef LPCPROPSHEETPAGEA_V4
endif
PROPSHEETPAGE_LATEST	typedef PROPSHEETPAGEA_LATEST
LPPROPSHEETPAGE_LATEST	typedef LPPROPSHEETPAGEA_LATEST
LPCPROPSHEETPAGE_LATEST typedef LPCPROPSHEETPAGEA_LATEST
endif

define PSH_DEFAULT		0x00000000
define PSH_PROPTITLE		0x00000001
define PSH_USEHICON		0x00000002
define PSH_USEICONID		0x00000004
define PSH_PROPSHEETPAGE	0x00000008

define PSH_WIZARDHASFINISH	0x00000010
define PSH_WIZARD		0x00000020
define PSH_USEPSTARTPAGE	0x00000040
define PSH_NOAPPLYNOW		0x00000080

define PSH_USECALLBACK		0x00000100
define PSH_HASHELP		0x00000200
define PSH_MODELESS		0x00000400
define PSH_RTLREADING		0x00000800

define PSH_WIZARDCONTEXTHELP	0x00001000

if (_WIN32_IE lt 0x0500)
define PSH_WIZARD97		0x00002000
else
define PSH_WIZARD97		0x01000000
endif
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

define PSH_WIZARD_LITE		0x00400000
define PSH_NOCONTEXTHELP	0x02000000

if (NTDDI_VERSION ge NTDDI_VISTA)
define PSH_AEROWIZARD		0x00004000
define PSH_RESIZABLE		0x04000000
define PSH_HEADERBITMAP		0x08000000
define PSH_NOMARGIN		0x10000000
endif

CALLBACK(PFNPROPSHEETCALLBACK, :HWND, :UINT, :LPARAM)

PROPSHEETHEADERA_V1_FIELDS macro
	dwSize		DWORD ?
	dwFlags		DWORD ?
	hwndParent	HWND ?
	hInstance	HINSTANCE ?
	union
	 hIcon		HICON ?
	 pszIcon	LPCSTR ?
	ends
	pszCaption	LPCSTR ?
	nPages		UINT ?
	union
	 nStartPage	UINT ?
	 pStartPage	LPCSTR ?
	ends
	union
	 ppsp		LPCPROPSHEETPAGEA ?
	 phpage		ptr HPROPSHEETPAGE ?
	ends
	pfnCallback	PFNPROPSHEETCALLBACK ?
	endm

PROPSHEETHEADERA_V1	struct
PROPSHEETHEADERA_V1_FIELDS
PROPSHEETHEADERA_V1	ends
LPPROPSHEETHEADERA_V1	typedef ptr PROPSHEETHEADERA_V1
LPCPROPSHEETHEADERA_V1	typedef ptr PROPSHEETHEADERA_V1

PROPSHEETHEADERA_V2	struct
PROPSHEETHEADERA_V1_FIELDS
union
 hbmWatermark		HBITMAP ?
 pszbmWatermark		LPCSTR ?
ends
hplWatermark		HPALETTE ?
union
 hbmHeader		HBITMAP ?
 pszbmHeader		LPCSTR ?
ends
PROPSHEETHEADERA_V2	ends
LPPROPSHEETHEADERA_V2	typedef ptr PROPSHEETHEADERA_V2
LPCPROPSHEETHEADERA_V2	typedef ptr PROPSHEETHEADERA_V2

PROPSHEETHEADERW_V1_FIELDS macro
	dwSize		DWORD ?
	dwFlags		DWORD ?
	hwndParent	HWND ?
	hInstance	HINSTANCE ?
	union
	 hIcon		HICON ?
	 pszIcon	LPCWSTR ?
	ends
	pszCaption	LPCWSTR ?
	nPages		UINT ?
	union
	 nStartPage	UINT ?
	 pStartPage	LPCWSTR ?
	ends
	union
	 ppsp		LPCPROPSHEETPAGEW ?
	 phpage		ptr HPROPSHEETPAGE ?
	ends
	pfnCallback	PFNPROPSHEETCALLBACK ?
	endm


PROPSHEETHEADERW_V1	struct
PROPSHEETHEADERW_V1_FIELDS
PROPSHEETHEADERW_V1	ends
LPPROPSHEETHEADERW_V1	typedef ptr PROPSHEETHEADERW_V1
LPCPROPSHEETHEADERW_V1	typedef ptr PROPSHEETHEADERW_V1

PROPSHEETHEADERW_V2	struct
PROPSHEETHEADERW_V1_FIELDS
union
 hbmWatermark		HBITMAP ?
 pszbmWatermark		LPCWSTR ?
ends
hplWatermark		HPALETTE ?
union
 hbmHeader		HBITMAP ?
 pszbmHeader		LPCWSTR ?
ends
PROPSHEETHEADERW_V2	ends
LPPROPSHEETHEADERW_V2	typedef ptr PROPSHEETHEADERW_V2
LPCPROPSHEETHEADERW_V2	typedef ptr PROPSHEETHEADERW_V2

define PROPSHEETHEADERA_V1_SIZE sizeof(PROPSHEETHEADERA_V1)
define PROPSHEETHEADERW_V1_SIZE sizeof(PROPSHEETHEADERW_V1)

define PROPSHEETHEADERA_V2_SIZE sizeof(PROPSHEETHEADERA_V2)
define PROPSHEETHEADERW_V2_SIZE sizeof(PROPSHEETHEADERW_V2)

define _PROPSHEETHEADERA <PROPSHEETHEADERA_V2>
define _PROPSHEETHEADERW <PROPSHEETHEADERW_V2>

PROPSHEETHEADERA	typedef PROPSHEETHEADERA_V2
PROPSHEETHEADERW	typedef PROPSHEETHEADERW_V2
LPPROPSHEETHEADERA	typedef LPPROPSHEETHEADERA_V2
LPPROPSHEETHEADERW	typedef LPPROPSHEETHEADERW_V2
LPCPROPSHEETHEADERA	typedef LPCPROPSHEETHEADERA_V2
LPCPROPSHEETHEADERW	typedef LPCPROPSHEETHEADERW_V2

ifdef _UNICODE
PROPSHEETHEADER		typedef PROPSHEETHEADERW
LPPROPSHEETHEADER	typedef LPPROPSHEETHEADERW
LPCPROPSHEETHEADER	typedef LPCPROPSHEETHEADERW
define PROPSHEETHEADER_V1_SIZE PROPSHEETHEADERW_V1_SIZE
define PROPSHEETHEADER_V2_SIZE PROPSHEETHEADERW_V2_SIZE
else
PROPSHEETHEADER		typedef PROPSHEETHEADERA
LPPROPSHEETHEADER	typedef LPPROPSHEETHEADERA
LPCPROPSHEETHEADER	typedef LPCPROPSHEETHEADERA
define PROPSHEETHEADER_V1_SIZE PROPSHEETHEADERA_V1_SIZE
define PROPSHEETHEADER_V2_SIZE PROPSHEETHEADERA_V2_SIZE
endif

define PSCB_INITIALIZED 1
define PSCB_PRECREATE	2

if (NTDDI_VERSION ge NTDDI_WINXP)
define PSCB_BUTTONPRESSED 3
endif

CreatePropertySheetPageA proto WINAPI :LPCPROPSHEETPAGEA
CreatePropertySheetPageW proto WINAPI :LPCPROPSHEETPAGEW
DestroyPropertySheetPage proto WINAPI :HPROPSHEETPAGE

PropertySheetA proto WINAPI :LPCPROPSHEETHEADERA
PropertySheetW proto WINAPI :LPCPROPSHEETHEADERW

ifdef _UNICODE
define CreatePropertySheetPage	<CreatePropertySheetPageW>
define PropertySheet		<PropertySheetW>
else
define CreatePropertySheetPage	<CreatePropertySheetPageA>
define PropertySheet		<PropertySheetA>
endif

CALLBACK(LPFNADDPROPSHEETPAGE, :HPROPSHEETPAGE, :LPARAM)
CALLBACK(LPFNADDPROPSHEETPAGES, :ptr, :LPFNADDPROPSHEETPAGE, :LPARAM)

PSHNOTIFY		struct
hdr			NMHDR <>
lParam			LPARAM ?
PSHNOTIFY		ends
LPPSHNOTIFY		typedef ptr PSHNOTIFY

define PSN_FIRST		(0-200)
define PSN_LAST			(0-299)

define PSN_SETACTIVE		(PSN_FIRST-0)
define PSN_KILLACTIVE		(PSN_FIRST-1)
define PSN_APPLY		(PSN_FIRST-2)
define PSN_RESET		(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)
define PSN_GETOBJECT		(PSN_FIRST-10)
define PSN_TRANSLATEACCELERATOR (PSN_FIRST-12)
define PSN_QUERYINITIALFOCUS	(PSN_FIRST-13)
define PSNRET_NOERROR			0
define PSNRET_INVALID			1
define PSNRET_INVALID_NOCHANGEPAGE	2
define PSNRET_MESSAGEHANDLED		3

define PSM_SETCURSEL		(WM_USER + 101)
PropSheet_SetCurSel macro hDlg, hpage, index
	exitm<SNDMSG(hDlg, PSM_SETCURSEL, (index), (hpage))>
	endm

define PSM_REMOVEPAGE		(WM_USER + 102)
PropSheet_RemovePage macro hDlg, index, hpage
	exitm<SNDMSG(hDlg, PSM_REMOVEPAGE, index, (hpage))>
	endm

define PSM_ADDPAGE		(WM_USER + 103)
PropSheet_AddPage macro hDlg, hpage
	exitm<SNDMSG(hDlg, PSM_ADDPAGE, 0, (hpage))>
	endm

define PSM_CHANGED		(WM_USER + 104)
PropSheet_Changed macro hDlg, hwnd
	exitm<SNDMSG(hDlg, PSM_CHANGED, (hwnd), 0)>
	endm

define PSM_RESTARTWINDOWS	(WM_USER + 105)
PropSheet_RestartWindows macro hDlg
	exitm<SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0)>
	endm

define PSM_REBOOTSYSTEM		(WM_USER + 106)
PropSheet_RebootSystem macro hDlg
	exitm<SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0)>
	endm

define PSM_CANCELTOCLOSE	(WM_USER + 107)
PropSheet_CancelToClose macro hDlg
	exitm<PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0)>
	endm

define PSM_QUERYSIBLINGS	(WM_USER + 108)
PropSheet_QuerySiblings macro hDlg, wParam, lParam
	exitm<SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)>
	endm

define PSM_UNCHANGED		(WM_USER + 109)
PropSheet_UnChanged macro hDlg, hwnd
	exitm<SNDMSG(hDlg, PSM_UNCHANGED, (hwnd), 0)>
	endm

define PSM_APPLY		(WM_USER + 110)
PropSheet_Apply macro hDlg
	exitm<SNDMSG(hDlg, PSM_APPLY, 0, 0)>
	endm

define PSM_SETTITLEA		(WM_USER + 111)
define PSM_SETTITLEW		(WM_USER + 120)

ifdef _UNICODE
define PSM_SETTITLE		<PSM_SETTITLEW>
else
define PSM_SETTITLE		<PSM_SETTITLEA>
endif

PropSheet_SetTitle macro hDlg, wStyle, lpszText
	exitm<SNDMSG(hDlg, PSM_SETTITLE, wStyle, lpszText)>
	endm


define PSM_SETWIZBUTTONS	(WM_USER + 112)
PropSheet_SetWizButtons macro hDlg, dwFlags
	exitm<PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, dwFlags)>
	endm


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

define PSWIZBF_ELEVATIONREQUIRED 0x00000001

if (NTDDI_VERSION ge NTDDI_VISTA)
define PSWIZB_CANCEL		0x00000010
endif


define PSM_PRESSBUTTON		(WM_USER + 113)
PropSheet_PressButton macro hDlg, iButton
	exitm<PostMessage(hDlg, PSM_PRESSBUTTON, iButton, 0)>
	endm


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 PSM_SETCURSELID		(WM_USER + 114)
PropSheet_SetCurSelByID macro hDlg, id
	exitm<SNDMSG(hDlg, PSM_SETCURSELID, 0, id)>
	endm

define PSM_SETFINISHTEXTA	(WM_USER + 115)
define PSM_SETFINISHTEXTW	(WM_USER + 121)

ifdef _UNICODE
define PSM_SETFINISHTEXT	<PSM_SETFINISHTEXTW>
else
define PSM_SETFINISHTEXT	<PSM_SETFINISHTEXTA>
endif

PropSheet_SetFinishText macro hDlg, lpszText
	exitm<SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, lpszText)>
	endm


define PSM_GETTABCONTROL	(WM_USER + 116)
PropSheet_GetTabControl macro hDlg
	exitm<SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)>
	endm

define PSM_ISDIALOGMESSAGE	(WM_USER + 117)
PropSheet_IsDialogMessage macro hDlg, pMsg
	exitm<SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, pMsg)>
	endm

define PSM_GETCURRENTPAGEHWND	(WM_USER + 118)
PropSheet_GetCurrentPageHwnd macro hDlg
	exitm<SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0)>
	endm

define PSM_INSERTPAGE		(WM_USER + 119)
PropSheet_InsertPage macro hDlg, index, hpage
	exitm<SNDMSG(hDlg, PSM_INSERTPAGE, index, hpage)>
	endm

if (NTDDI_VERSION ge NTDDI_VISTA)
define PSWIZF_SETCOLOR (-1)
endif

define PSM_SETHEADERTITLEA	(WM_USER + 125)
define PSM_SETHEADERTITLEW	(WM_USER + 126)

ifdef _UNICODE
define PSM_SETHEADERTITLE	<PSM_SETHEADERTITLEW>
else
define PSM_SETHEADERTITLE	<PSM_SETHEADERTITLEA>
endif

PropSheet_SetHeaderTitle macro hDlg, index, lpszText
	exitm<SNDMSG(hDlg, PSM_SETHEADERTITLE, index, lpszText)>
	endm

define PSM_SETHEADERSUBTITLEA	(WM_USER + 127)
define PSM_SETHEADERSUBTITLEW	(WM_USER + 128)

ifdef _UNICODE
define PSM_SETHEADERSUBTITLE	<PSM_SETHEADERSUBTITLEW>
else
define PSM_SETHEADERSUBTITLE	<PSM_SETHEADERSUBTITLEA>
endif

PropSheet_SetHeaderSubTitle macro hDlg, index, lpszText
	exitm<SNDMSG(hDlg, PSM_SETHEADERSUBTITLE, index, lpszText)>
	endm

define PSM_HWNDTOINDEX		(WM_USER + 129)
PropSheet_HwndToIndex macro hDlg, hwnd
	exitm<SNDMSG(hDlg, PSM_HWNDTOINDEX, hwnd, 0)>
	endm

define PSM_INDEXTOHWND		(WM_USER + 130)
PropSheet_IndexToHwnd macro hDlg, i
	exitm<SNDMSG(hDlg, PSM_INDEXTOHWND, i, 0)>
	endm

define PSM_PAGETOINDEX		(WM_USER + 131)
PropSheet_PageToIndex macro hDlg, hpage
	exitm<SNDMSG(hDlg, PSM_PAGETOINDEX, 0, hpage)>
	endm

define PSM_INDEXTOPAGE		(WM_USER + 132)
PropSheet_IndexToPage macro hDlg, i
	exitm<SNDMSG(hDlg, PSM_INDEXTOPAGE, i, 0)>
	endm

define PSM_IDTOINDEX		(WM_USER + 133)
PropSheet_IdToIndex macro hDlg, id
exitm<SNDMSG(hDlg, PSM_IDTOINDEX, 0, id)>
endm

define PSM_INDEXTOID		(WM_USER + 134)
PropSheet_IndexToId macro hDlg, i
	exitm<SNDMSG(hDlg, PSM_INDEXTOID, i, 0)>
	endm

define PSM_GETRESULT		(WM_USER + 135)
PropSheet_GetResult macro hDlg
	exitm<SNDMSG(hDlg, PSM_GETRESULT, 0, 0)>
	endm

define PSM_RECALCPAGESIZES	(WM_USER + 136)
PropSheet_RecalcPageSizes macro hDlg
	exitm<SNDMSG(hDlg, PSM_RECALCPAGESIZES, 0, 0)>
	endm

if (NTDDI_VERSION ge NTDDI_VISTA)
define PSM_SETNEXTTEXTW		(WM_USER + 137)
define PSM_SETNEXTTEXT		<PSM_SETNEXTTEXTW>

PropSheet_SetNextText macro hDlg, lpszText
	exitm<SNDMSG(hDlg, PSM_SETNEXTTEXT, 0, lpszText)>
	endm

define PSWIZB_SHOW		0
define PSWIZB_RESTORE		1

define PSM_SHOWWIZBUTTONS	(WM_USER + 138)
PropSheet_ShowWizButtons macro hDlg, dwFlag, dwButton
	exitm<PSTMSG(hDlg, PSM_SHOWWIZBUTTONS, dwFlag, dwButton)>
	endm

define PSM_ENABLEWIZBUTTONS	(WM_USER + 139)
PropSheet_EnableWizButtons macro hDlg, dwState, dwMask
	exitm<PSTMSG(hDlg, PSM_ENABLEWIZBUTTONS, dwState, dwMask)>
	endm

define PSM_SETBUTTONTEXTW	(WM_USER + 140)
define PSM_SETBUTTONTEXT	<PSM_SETBUTTONTEXTW>
PropSheet_SetButtonText macro hDlg, dwButton, lpszText
	exitm<SNDMSG(hDlg, PSM_SETBUTTONTEXT, dwButton, lpszText)>
	endm

endif


define ID_PSRESTARTWINDOWS	0x2
define ID_PSREBOOTSYSTEM	(ID_PSRESTARTWINDOWS or 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

if defined(ISOLATION_AWARE_ENABLED) and (ISOLATION_AWARE_ENABLED ne 0)
;include prsht.inl
endif

.pragma pack(pop)
endif
