[1046] | 1 | #ifndef _PRSHT_H
|
---|
| 2 | #define _PRSHT_H
|
---|
| 3 | #if __GNUC__ >=3
|
---|
| 4 | #pragma GCC system_header
|
---|
| 5 | #endif
|
---|
| 6 |
|
---|
| 7 | #ifndef SNDMSG
|
---|
| 8 | #ifdef __cplusplus
|
---|
| 9 | #define SNDMSG ::SendMessage
|
---|
| 10 | #else
|
---|
| 11 | #define SNDMSG SendMessage
|
---|
| 12 | #endif
|
---|
| 13 | #endif /* ifndef SNDMSG */
|
---|
| 14 |
|
---|
| 15 | #ifndef POSTMSG
|
---|
| 16 | #ifdef __cplusplus
|
---|
| 17 | #define POSTMSG ::PostMessage
|
---|
| 18 | #else
|
---|
| 19 | #define POSTMSG PostMessage
|
---|
| 20 | #endif
|
---|
| 21 | #endif /* ifndef POSTMSG */
|
---|
| 22 |
|
---|
| 23 | #ifdef __cplusplus
|
---|
| 24 | extern "C" {
|
---|
| 25 | #endif
|
---|
| 26 |
|
---|
| 27 | #define MAXPROPPAGES 100
|
---|
| 28 | #define PSP_DEFAULT 0
|
---|
| 29 | #define PSP_DLGINDIRECT 1
|
---|
| 30 | #define PSP_USEHICON 2
|
---|
| 31 | #define PSP_USEICONID 4
|
---|
| 32 | #define PSP_USETITLE 8
|
---|
| 33 | #define PSP_RTLREADING 16
|
---|
| 34 | #define PSP_HASHELP 32
|
---|
| 35 | #define PSP_USEREFPARENT 64
|
---|
| 36 | #define PSP_USECALLBACK 128
|
---|
| 37 | #define PSP_PREMATURE 1024
|
---|
| 38 | #if (_WIN32_IE >= 0x0400)
|
---|
| 39 | #define PSP_HIDEHEADER 2048
|
---|
| 40 | #define PSP_USEHEADERTITLE 4096
|
---|
| 41 | #define PSP_USEHEADERSUBTITLE 8192
|
---|
| 42 | #endif
|
---|
| 43 | #define PSPCB_RELEASE 1
|
---|
| 44 | #define PSPCB_CREATE 2
|
---|
| 45 | #define PSH_DEFAULT 0
|
---|
| 46 | #define PSH_PROPTITLE 1
|
---|
| 47 | #define PSH_USEHICON 2
|
---|
| 48 | #define PSH_USEICONID 4
|
---|
| 49 | #define PSH_PROPSHEETPAGE 8
|
---|
| 50 | #define PSH_WIZARDHASFINISH 16
|
---|
| 51 | #define PSH_WIZARD 32
|
---|
| 52 | #define PSH_USEPSTARTPAGE 64
|
---|
| 53 | #define PSH_NOAPPLYNOW 128
|
---|
| 54 | #define PSH_USECALLBACK 256
|
---|
| 55 | #define PSH_HASHELP 512
|
---|
| 56 | #define PSH_MODELESS 1024
|
---|
| 57 | #define PSH_RTLREADING 2048
|
---|
| 58 | #define PSH_WIZARDCONTEXTHELP 4096
|
---|
| 59 | #if (_WIN32_IE >= 0x0400)
|
---|
| 60 | #define PSH_WATERMARK 32768
|
---|
| 61 | #define PSH_USEHBMWATERMARK 65536
|
---|
| 62 | #define PSH_USEHPLWATERMARK 131072
|
---|
| 63 | #define PSH_STRETCHWATERMARK 262144
|
---|
| 64 | #define PSH_HEADER 524288
|
---|
| 65 | #define PSH_USEHBMHEADER 1048576
|
---|
| 66 | #define PSH_USEPAGELANG 2097152
|
---|
| 67 | #if (_WIN32_IE < 0x0500)
|
---|
| 68 | #define PSH_WIZARD97 0x00002000
|
---|
| 69 | #else
|
---|
| 70 | #define PSH_WIZARD97 0x01000000
|
---|
| 71 | #endif
|
---|
| 72 | #endif /* _WIN32_IE >= 0x0400 */
|
---|
| 73 | #if (_WIN32_IE >= 0x0500)
|
---|
| 74 | #define PSH_WIZARD_LITE 0x400000
|
---|
| 75 | #define PSH_NOCONTEXTHELP 0x2000000
|
---|
| 76 | #endif
|
---|
| 77 | #define PSCB_INITIALIZED 1
|
---|
| 78 | #define PSCB_PRECREATE 2
|
---|
| 79 | #define PSM_GETTABCONTROL 1140
|
---|
| 80 | #define PSM_GETCURRENTPAGEHWND 1142
|
---|
| 81 | #define PSM_ISDIALOGMESSAGE 1141
|
---|
| 82 | #define PSM_PRESSBUTTON 1137
|
---|
| 83 | #define PSM_SETCURSELID 1138
|
---|
| 84 | #define PSM_SETFINISHTEXTW 1145
|
---|
| 85 | #define PSM_SETFINISHTEXTA 1139
|
---|
| 86 | #define PSN_FIRST (-200)
|
---|
| 87 | #define PSN_LAST (-299)
|
---|
| 88 | #define PSN_APPLY (-202)
|
---|
| 89 | #define PSN_HELP (-205)
|
---|
| 90 | #define PSN_KILLACTIVE (-201)
|
---|
| 91 | #define PSN_QUERYCANCEL (-209)
|
---|
| 92 | #define PSN_RESET (-203)
|
---|
| 93 | #define PSN_SETACTIVE (-200)
|
---|
| 94 | #define PSN_WIZBACK (-206)
|
---|
| 95 | #define PSN_WIZFINISH (-208)
|
---|
| 96 | #define PSN_WIZNEXT (-207)
|
---|
| 97 | #define PSNRET_NOERROR 0
|
---|
| 98 | #define PSNRET_INVALID 1
|
---|
| 99 | #define PSNRET_INVALID_NOCHANGEPAGE 2
|
---|
| 100 | #define ID_PSRESTARTWINDOWS 2
|
---|
| 101 | #define ID_PSREBOOTSYSTEM 3
|
---|
| 102 | #define WIZ_CXDLG 276
|
---|
| 103 | #define WIZ_CYDLG 140
|
---|
| 104 | #define WIZ_CXBMP 80
|
---|
| 105 | #define WIZ_BODYX 92
|
---|
| 106 | #define WIZ_BODYCX 184
|
---|
| 107 | #define PROP_SM_CXDLG 212
|
---|
| 108 | #define PROP_SM_CYDLG 188
|
---|
| 109 | #define PROP_MED_CXDLG 227
|
---|
| 110 | #define PROP_MED_CYDLG 215
|
---|
| 111 | #define PROP_LG_CXDLG 252
|
---|
| 112 | #define PROP_LG_CYDLG 218
|
---|
| 113 | #define PSBTN_MAX 6
|
---|
| 114 | #define PSBTN_BACK 0
|
---|
| 115 | #define PSBTN_NEXT 1
|
---|
| 116 | #define PSBTN_FINISH 2
|
---|
| 117 | #define PSBTN_OK 3
|
---|
| 118 | #define PSBTN_APPLYNOW 4
|
---|
| 119 | #define PSBTN_CANCEL 5
|
---|
| 120 | #define PSBTN_HELP 6
|
---|
| 121 | #define PSWIZB_BACK 1
|
---|
| 122 | #define PSWIZB_NEXT 2
|
---|
| 123 | #define PSWIZB_FINISH 4
|
---|
| 124 | #define PSWIZB_DISABLEDFINISH 8
|
---|
| 125 | #define PSM_SETWIZBUTTONS (WM_USER+112)
|
---|
| 126 | #define PSM_APPLY (WM_USER+110)
|
---|
| 127 | #define PSM_UNCHANGED (WM_USER+109)
|
---|
| 128 | #define PSM_QUERYSIBLINGS (WM_USER+108)
|
---|
| 129 | #define PSM_CANCELTOCLOSE (WM_USER+107)
|
---|
| 130 | #define PSM_REBOOTSYSTEM (WM_USER+106)
|
---|
| 131 | #define PSM_RESTARTWINDOWS (WM_USER+105)
|
---|
| 132 | #define PSM_CHANGED (WM_USER+104)
|
---|
| 133 | #define PSM_ADDPAGE (WM_USER+103)
|
---|
| 134 | #define PSM_REMOVEPAGE (WM_USER+102)
|
---|
| 135 | #define PSM_SETCURSEL (WM_USER+101)
|
---|
| 136 | #define PSM_SETTITLEA (WM_USER+111)
|
---|
| 137 | #define PSM_SETTITLEW (WM_USER+120)
|
---|
| 138 |
|
---|
| 139 | #ifndef RC_INVOKED
|
---|
| 140 |
|
---|
| 141 | #pragma pack(push,8)
|
---|
| 142 | typedef struct _PROPSHEETPAGEA {
|
---|
| 143 | DWORD dwSize;
|
---|
| 144 | DWORD dwFlags;
|
---|
| 145 | HINSTANCE hInstance;
|
---|
| 146 | _ANONYMOUS_UNION union {
|
---|
| 147 | LPCSTR pszTemplate;
|
---|
| 148 | LPCDLGTEMPLATE pResource;
|
---|
| 149 | } DUMMYUNIONNAME;
|
---|
| 150 | _ANONYMOUS_UNION union {
|
---|
| 151 | HICON hIcon;
|
---|
| 152 | LPCSTR pszIcon;
|
---|
| 153 | } DUMMYUNIONNAME2;
|
---|
| 154 | LPCSTR pszTitle;
|
---|
| 155 | DLGPROC pfnDlgProc;
|
---|
| 156 | LPARAM lParam;
|
---|
| 157 | UINT(CALLBACK *pfnCallback)(HWND,UINT,struct _PROPSHEETPAGEA*);
|
---|
| 158 | UINT *pcRefParent;
|
---|
| 159 | #if (_WIN32_IE >= 0x0400)
|
---|
| 160 | LPCSTR pszHeaderTitle;
|
---|
| 161 | LPCSTR pszHeaderSubTitle;
|
---|
| 162 | #endif
|
---|
| 163 | } PROPSHEETPAGEA,*LPPROPSHEETPAGEA;
|
---|
| 164 | typedef const PROPSHEETPAGEA *LPCPROPSHEETPAGEA;
|
---|
| 165 | typedef struct _PROPSHEETPAGEW {
|
---|
| 166 | DWORD dwSize;
|
---|
| 167 | DWORD dwFlags;
|
---|
| 168 | HINSTANCE hInstance;
|
---|
| 169 | _ANONYMOUS_UNION union {
|
---|
| 170 | LPCWSTR pszTemplate;
|
---|
| 171 | LPCDLGTEMPLATE pResource;
|
---|
| 172 | } DUMMYUNIONNAME;
|
---|
| 173 | _ANONYMOUS_UNION union {
|
---|
| 174 | HICON hIcon;
|
---|
| 175 | LPCWSTR pszIcon;
|
---|
| 176 | } DUMMYUNIONNAME2;
|
---|
| 177 | LPCWSTR pszTitle;
|
---|
| 178 | DLGPROC pfnDlgProc;
|
---|
| 179 | LPARAM lParam;
|
---|
| 180 | UINT(CALLBACK *pfnCallback)(HWND,UINT,struct _PROPSHEETPAGEW*);
|
---|
| 181 | UINT *pcRefParent;
|
---|
| 182 | #if (_WIN32_IE >= 0x0400)
|
---|
| 183 | LPCWSTR pszHeaderTitle;
|
---|
| 184 | LPCWSTR pszHeaderSubTitle;
|
---|
| 185 | #endif
|
---|
| 186 | } PROPSHEETPAGEW,*LPPROPSHEETPAGEW;
|
---|
| 187 | typedef const PROPSHEETPAGEW *LPCPROPSHEETPAGEW;
|
---|
| 188 | typedef UINT(CALLBACK *LPFNPSPCALLBACKA)(HWND,UINT,LPPROPSHEETPAGEA);
|
---|
| 189 | typedef UINT(CALLBACK *LPFNPSPCALLBACKW)(HWND,UINT,LPPROPSHEETPAGEW);
|
---|
| 190 | typedef int(CALLBACK *PFNPROPSHEETCALLBACK)(HWND,UINT,LPARAM);
|
---|
| 191 | DECLARE_HANDLE(HPROPSHEETPAGE);
|
---|
| 192 | typedef struct _PROPSHEETHEADERA {
|
---|
| 193 | DWORD dwSize;
|
---|
| 194 | DWORD dwFlags;
|
---|
| 195 | HWND hwndParent;
|
---|
| 196 | HINSTANCE hInstance;
|
---|
| 197 | _ANONYMOUS_UNION union {
|
---|
| 198 | HICON hIcon;
|
---|
| 199 | LPCSTR pszIcon;
|
---|
| 200 | }DUMMYUNIONNAME;
|
---|
| 201 | LPCSTR pszCaption;
|
---|
| 202 | UINT nPages;
|
---|
| 203 | _ANONYMOUS_UNION union {
|
---|
| 204 | UINT nStartPage;
|
---|
| 205 | LPCSTR pStartPage;
|
---|
| 206 | }DUMMYUNIONNAME2;
|
---|
| 207 | _ANONYMOUS_UNION union {
|
---|
| 208 | LPCPROPSHEETPAGEA ppsp;
|
---|
| 209 | HPROPSHEETPAGE *phpage;
|
---|
| 210 | }DUMMYUNIONNAME3;
|
---|
| 211 | PFNPROPSHEETCALLBACK pfnCallback;
|
---|
| 212 | #if (_WIN32_IE >= 0x0400)
|
---|
| 213 | _ANONYMOUS_UNION union {
|
---|
| 214 | HBITMAP hbmWatermark;
|
---|
| 215 | LPCSTR pszbmWatermark;
|
---|
| 216 | } DUMMYUNIONNAME4;
|
---|
| 217 | HPALETTE hplWatermark;
|
---|
| 218 | _ANONYMOUS_UNION union {
|
---|
| 219 | HBITMAP hbmHeader;
|
---|
| 220 | LPCSTR pszbmHeader;
|
---|
| 221 | } DUMMYUNIONNAME5;
|
---|
| 222 | #endif
|
---|
| 223 | } PROPSHEETHEADERA,*LPPROPSHEETHEADERA;
|
---|
| 224 | typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
|
---|
| 225 | typedef struct _PROPSHEETHEADERW {
|
---|
| 226 | DWORD dwSize;
|
---|
| 227 | DWORD dwFlags;
|
---|
| 228 | HWND hwndParent;
|
---|
| 229 | HINSTANCE hInstance;
|
---|
| 230 | _ANONYMOUS_UNION union {
|
---|
| 231 | HICON hIcon;
|
---|
| 232 | LPCWSTR pszIcon;
|
---|
| 233 | }DUMMYUNIONNAME;
|
---|
| 234 | LPCWSTR pszCaption;
|
---|
| 235 | UINT nPages;
|
---|
| 236 | _ANONYMOUS_UNION union {
|
---|
| 237 | UINT nStartPage;
|
---|
| 238 | LPCWSTR pStartPage;
|
---|
| 239 | }DUMMYUNIONNAME2;
|
---|
| 240 | _ANONYMOUS_UNION union {
|
---|
| 241 | LPCPROPSHEETPAGEW ppsp;
|
---|
| 242 | HPROPSHEETPAGE *phpage;
|
---|
| 243 | }DUMMYUNIONNAME3;
|
---|
| 244 | PFNPROPSHEETCALLBACK pfnCallback;
|
---|
| 245 | #if (_WIN32_IE >= 0x0400)
|
---|
| 246 | _ANONYMOUS_UNION union {
|
---|
| 247 | HBITMAP hbmWatermark;
|
---|
| 248 | LPCWSTR pszbmWatermark;
|
---|
| 249 | } DUMMYUNIONNAME4;
|
---|
| 250 | HPALETTE hplWatermark;
|
---|
| 251 | _ANONYMOUS_UNION union {
|
---|
| 252 | HBITMAP hbmHeader;
|
---|
| 253 | LPCWSTR pszbmHeader;
|
---|
| 254 | } DUMMYUNIONNAME5;
|
---|
| 255 | #endif
|
---|
| 256 | } PROPSHEETHEADERW,*LPPROPSHEETHEADERW;
|
---|
| 257 | typedef const PROPSHEETHEADERW *LPCPROPSHEETHEADERW;
|
---|
| 258 | typedef BOOL(CALLBACK *LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE,LPARAM);
|
---|
| 259 | typedef BOOL(CALLBACK *LPFNADDPROPSHEETPAGES)(LPVOID,LPFNADDPROPSHEETPAGE,LPARAM);
|
---|
| 260 | typedef struct _PSHNOTIFY {
|
---|
| 261 | NMHDR hdr;
|
---|
| 262 | LPARAM lParam;
|
---|
| 263 | } PSHNOTIFY,*LPPSHNOTIFY;
|
---|
| 264 |
|
---|
| 265 | #pragma pack(pop)
|
---|
| 266 |
|
---|
| 267 | HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
|
---|
| 268 | HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
|
---|
| 269 | BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE);
|
---|
| 270 | int WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
|
---|
| 271 | int WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
|
---|
| 272 | #define PropSheet_AddPage(d,p) SNDMSG(d,PSM_ADDPAGE,0,(LPARAM)p)
|
---|
| 273 | #define PropSheet_Apply(d) SNDMSG(d,PSM_APPLY,0,0)
|
---|
| 274 | #define PropSheet_CancelToClose(d) POSTMSG(d,PSM_CANCELTOCLOSE,0,0)
|
---|
| 275 | #define PropSheet_Changed(d,w) SNDMSG(d,PSM_CHANGED,(WPARAM)w,0)
|
---|
| 276 | #define PropSheet_GetCurrentPageHwnd(d) (HWND)SNDMSG(d,PSM_GETCURRENTPAGEHWND,0,0)
|
---|
| 277 | #define PropSheet_GetTabControl(d) (HWND)SNDMSG(d,PSM_GETTABCONTROL,0,0)
|
---|
| 278 | #define PropSheet_IsDialogMessage(d,m) (BOOL)SNDMSG(d,PSM_ISDIALOGMESSAGE,0,(LPARAM)m)
|
---|
| 279 | #define PropSheet_PressButton(d,i) POSTMSG(d,PSM_PRESSBUTTON,i,0)
|
---|
| 280 | #define PropSheet_QuerySiblings(d,w,l) SNDMSG(d,PSM_QUERYSIBLINGS,w,l)
|
---|
| 281 | #define PropSheet_RebootSystem(d) SNDMSG(d,PSM_REBOOTSYSTEM,0,0)
|
---|
| 282 | #define PropSheet_RemovePage(d,i,p) SNDMSG(d,PSM_REMOVEPAGE,i,(LPARAM)p)
|
---|
| 283 | #define PropSheet_RestartWindows(d) SNDMSG(d,PSM_RESTARTWINDOWS,0,0)
|
---|
| 284 | #define PropSheet_SetCurSel(d,p,i) SNDMSG(d,PSM_SETCURSEL,i,(LPARAM)p)
|
---|
| 285 | #define PropSheet_SetCurSelByID(d,i) SNDMSG(d,PSM_SETCURSELID,0,i)
|
---|
| 286 | #define PropSheet_SetFinishText(d,s) SNDMSG(d,PSM_SETFINISHTEXT,0,(LPARAM)s)
|
---|
| 287 | #define PropSheet_SetTitle(d,w,s) SNDMSG(d,PSM_SETTITLE,w,(LPARAM)s)
|
---|
| 288 | #define PropSheet_SetWizButtons(d,f) POSTMSG(d,PSM_SETWIZBUTTONS,0,(LPARAM)f)
|
---|
| 289 | #define PropSheet_UnChanged(d,w) SNDMSG(d,PSM_UNCHANGED,(WPARAM)w,0)
|
---|
| 290 | #endif
|
---|
| 291 |
|
---|
| 292 | #ifdef UNICODE
|
---|
| 293 | #define LPFNPSPCALLBACK LPFNPSPCALLBACKW
|
---|
| 294 | #define PROPSHEETPAGE PROPSHEETPAGEW
|
---|
| 295 | #define LPPROPSHEETPAGE LPPROPSHEETPAGEW
|
---|
| 296 | #define LPCPROPSHEETPAGE LPCPROPSHEETPAGEW
|
---|
| 297 | #define PROPSHEETHEADER PROPSHEETHEADERW
|
---|
| 298 | #define LPPROPSHEETHEADER LPPROPSHEETHEADERW
|
---|
| 299 | #define LPCPROPSHEETHEADER LPCPROPSHEETHEADERW
|
---|
| 300 | #define PSM_SETTITLE PSM_SETTITLEW
|
---|
| 301 | #define PSM_SETFINISHTEXT PSM_SETFINISHTEXTW
|
---|
| 302 | #define CreatePropertySheetPage CreatePropertySheetPageW
|
---|
| 303 | #define PropertySheet PropertySheetW
|
---|
| 304 | #else
|
---|
| 305 | #define LPFNPSPCALLBACK LPFNPSPCALLBACKA
|
---|
| 306 | #define PROPSHEETPAGE PROPSHEETPAGEA
|
---|
| 307 | #define LPPROPSHEETPAGE LPPROPSHEETPAGEA
|
---|
| 308 | #define LPCPROPSHEETPAGE LPCPROPSHEETPAGEA
|
---|
| 309 | #define PROPSHEETHEADER PROPSHEETHEADERA
|
---|
| 310 | #define LPPROPSHEETHEADER LPPROPSHEETHEADERA
|
---|
| 311 | #define LPCPROPSHEETHEADER LPCPROPSHEETHEADERA
|
---|
| 312 | #define PSM_SETTITLE PSM_SETTITLEA
|
---|
| 313 | #define PSM_SETFINISHTEXT PSM_SETFINISHTEXTA
|
---|
| 314 | #define CreatePropertySheetPage CreatePropertySheetPageA
|
---|
| 315 | #define PropertySheet PropertySheetA
|
---|
| 316 | #endif
|
---|
| 317 | #ifdef __cplusplus
|
---|
| 318 | }
|
---|
| 319 | #endif
|
---|
| 320 | #endif
|
---|