Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

878 lines
28 KiB

  1. ;begin_both
  2. /*****************************************************************************\
  3. * *
  4. * prsht.h - - Interface for the Windows Property Sheet Pages *
  5. * *
  6. * Version 1.0 *
  7. * *
  8. * Copyright (c) Microsoft Corporation. All rights reserved. *
  9. * *
  10. \*****************************************************************************/
  11. ;end_both
  12. #ifndef _PRSHT_H_
  13. #define _PRSHT_H_
  14. #ifndef _PRSHTP_H_ ;internal
  15. #define _PRSHTP_H_ ;internal
  16. /*#!perl
  17. MapHeaderToDll("prsht.h", "comctl32.dll");
  18. DelayLoad("comctl32.dll");
  19. ActivateAroundDelayLoad("comctl32.dll");
  20. ActivateAroundFunctionCall("comctl32.dll");
  21. //
  22. // CreatePropertySheet is a very special case.
  23. //
  24. $SpecialChunksOfCode{"prsht.h"} = '
  25. #ifndef CCSIZEOF_STRUCT
  26. #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
  27. #endif
  28. ';
  29. $SpecialChunksOfCode{"CreatePropertySheetPageA"}{"locals"} = '
  30. const LPPROPSHEETPAGEA_LATEST latestPropSheetPagePointer = (LPPROPSHEETPAGEA_LATEST)constPropSheetPagePointer;
  31. ';
  32. $SpecialChunksOfCode{"CreatePropertySheetPageA"}{"body"} = '
  33. if (' . MakeMultiHeaderPrivateName('g_fDownlevel') . ')
  34. {
  35. if ((latestPropSheetPagePointer->dwFlags & PSP_USEFUSIONCONTEXT) != 0)
  36. {
  37. latestPropSheetPagePointer->dwFlags &= ~PSP_USEFUSIONCONTEXT;
  38. }
  39. }
  40. else if (( latestPropSheetPagePointer->dwFlags & PSP_USEFUSIONCONTEXT) == 0
  41. && latestPropSheetPagePointer->dwSize >= CCSIZEOF_STRUCT(PROPSHEETPAGEA_V3, hActCtx)
  42. )
  43. {
  44. latestPropSheetPagePointer->dwFlags |= PSP_USEFUSIONCONTEXT;
  45. latestPropSheetPagePointer->hActCtx = ' . MakeHeaderPrivateName('winbase.h', 'g_hActCtx') . ';
  46. }
  47. result = s_pfn(constPropSheetPagePointer);
  48. ';
  49. // copy
  50. $SpecialChunksOfCode{"CreatePropertySheetPageW"}{"body"} = $SpecialChunksOfCode{"CreatePropertySheetPageA"}{"body"};
  51. $SpecialChunksOfCode{"CreatePropertySheetPageW"}{"locals"} = $SpecialChunksOfCode{"CreatePropertySheetPageA"}{"locals"};
  52. // edit
  53. $SpecialChunksOfCode{"CreatePropertySheetPageW"}{"body"} =~ s/A\b/W/gms;
  54. $SpecialChunksOfCode{"CreatePropertySheetPageW"}{"body"} =~ s/A_/W_/gms;
  55. $SpecialChunksOfCode{"CreatePropertySheetPageW"}{"locals"} =~ s/A\b/W/gms;
  56. $SpecialChunksOfCode{"CreatePropertySheetPageW"}{"locals"} =~ s/A_/W_/gms;
  57. */
  58. #ifndef _WINRESRC_
  59. #ifndef _WIN32_IE
  60. #define _WIN32_IE 0x0501
  61. #else
  62. #if (_WIN32_IE < 0x0400) && defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0500)
  63. #error _WIN32_IE setting conflicts with _WIN32_WINNT setting
  64. #endif
  65. #endif
  66. #endif
  67. //
  68. // Define API decoration for direct importing of DLL references.
  69. // BUGBUG: Exact same block is in commctrl.h /* ;Internal */
  70. //
  71. #ifndef WINCOMMCTRLAPI
  72. #if !defined(_COMCTL32_) && defined(_WIN32)
  73. #define WINCOMMCTRLAPI DECLSPEC_IMPORT
  74. #else
  75. #define WINCOMMCTRLAPI
  76. #endif
  77. #endif // WINCOMMCTRLAPI
  78. #ifndef CCSIZEOF_STRUCT
  79. #define CCSIZEOF_STRUCT(structname, member) (((int)((LPBYTE)(&((structname*)0)->member) - ((LPBYTE)((structname*)0)))) + sizeof(((structname*)0)->member))
  80. #endif
  81. //
  82. // For compilers that don't support nameless unions
  83. // BUGBUG: Exact same block is in commctrl.h /* ;Internal */
  84. //
  85. #ifndef DUMMYUNIONNAME
  86. #ifdef NONAMELESSUNION
  87. #define DUMMYUNIONNAME u
  88. #define DUMMYUNIONNAME2 u2
  89. #define DUMMYUNIONNAME3 u3
  90. #define DUMMYUNIONNAME4 u4
  91. #define DUMMYUNIONNAME5 u5
  92. #else
  93. #define DUMMYUNIONNAME
  94. #define DUMMYUNIONNAME2
  95. #define DUMMYUNIONNAME3
  96. #define DUMMYUNIONNAME4
  97. #define DUMMYUNIONNAME5
  98. #endif
  99. #endif // DUMMYUNIONNAME
  100. ;begin_both
  101. #ifdef _WIN64
  102. #include <pshpack8.h>
  103. #else
  104. #include <pshpack4.h>
  105. #endif
  106. #ifdef __cplusplus
  107. extern "C" {
  108. #endif
  109. ;end_both
  110. #ifndef SNDMSG
  111. #ifdef __cplusplus
  112. #ifndef _MAC
  113. #define SNDMSG ::SendMessage
  114. #else
  115. #define SNDMSG ::AfxSendMessage
  116. #endif
  117. #else
  118. #ifndef _MAC
  119. #define SNDMSG SendMessage
  120. #else
  121. #define SNDMSG AfxSendMessage
  122. #endif
  123. #endif
  124. #endif // ifndef SNDMSG
  125. #define MAXPROPPAGES 100
  126. struct _PSP;
  127. typedef struct _PSP * HPROPSHEETPAGE;
  128. #ifndef MIDL_PASS
  129. struct _PROPSHEETPAGEA;
  130. struct _PROPSHEETPAGEW;
  131. #endif
  132. typedef UINT (CALLBACK *LPFNPSPCALLBACKA)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEA *ppsp);
  133. typedef UINT (CALLBACK *LPFNPSPCALLBACKW)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEW *ppsp);
  134. #ifdef UNICODE
  135. #define LPFNPSPCALLBACK LPFNPSPCALLBACKW
  136. #else
  137. #define LPFNPSPCALLBACK LPFNPSPCALLBACKA
  138. #endif
  139. #define PSP_DEFAULT 0x00000000
  140. #define PSP_DLGINDIRECT 0x00000001
  141. #define PSP_USEHICON 0x00000002
  142. #define PSP_USEICONID 0x00000004
  143. #define PSP_USETITLE 0x00000008
  144. #define PSP_RTLREADING 0x00000010
  145. #define PSP_HASHELP 0x00000020
  146. #define PSP_USEREFPARENT 0x00000040
  147. #define PSP_USECALLBACK 0x00000080
  148. #define PSP_PREMATURE 0x00000400
  149. #if (_WIN32_IE >= 0x0400)
  150. //----- New flags for wizard97 --------------
  151. #define PSP_HIDEHEADER 0x00000800
  152. #define PSP_USEHEADERTITLE 0x00001000
  153. #define PSP_USEHEADERSUBTITLE 0x00002000
  154. //-------------------------------------------
  155. #endif
  156. #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
  157. #define PSP_USEFUSIONCONTEXT 0x00004000
  158. #endif
  159. ;begin_internal
  160. #define PSP_DONOTUSE 0x00000200 // Dead flag - do not recycle
  161. #define PSP_ALL 0x0000FFFF
  162. #define PSP_IS16 0x00008000
  163. ;end_internal
  164. #if (_WIN32_IE >= 0x0500)
  165. #define PSPCB_ADDREF 0
  166. #endif
  167. #define PSPCB_RELEASE 1
  168. #define PSPCB_CREATE 2
  169. #define PROPSHEETPAGEA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pcRefParent)
  170. #define PROPSHEETPAGEW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pcRefParent)
  171. #define PROPSHEETPAGEA_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEA, pszHeaderSubTitle)
  172. #define PROPSHEETPAGEW_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETPAGEW, pszHeaderSubTitle)
  173. #ifdef _WIN32
  174. typedef LPCDLGTEMPLATE PROPSHEETPAGE_RESOURCE;
  175. #else
  176. typedef const VOID* PROPSHEETPAGE_RESOURCE;
  177. #endif
  178. #define PROPSHEETPAGEA_V1_FIELDS \
  179. DWORD dwSize; \
  180. DWORD dwFlags; \
  181. HINSTANCE hInstance; \
  182. union \
  183. { \
  184. LPCSTR pszTemplate; \
  185. PROPSHEETPAGE_RESOURCE pResource; \
  186. } DUMMYUNIONNAME; \
  187. union \
  188. { \
  189. HICON hIcon; \
  190. LPCSTR pszIcon; \
  191. } DUMMYUNIONNAME2; \
  192. LPCSTR pszTitle; \
  193. DLGPROC pfnDlgProc; \
  194. LPARAM lParam; \
  195. LPFNPSPCALLBACKA pfnCallback; \
  196. UINT *pcRefParent; \
  197. #define PROPSHEETPAGEW_V1_FIELDS \
  198. DWORD dwSize; \
  199. DWORD dwFlags; \
  200. HINSTANCE hInstance; \
  201. union \
  202. { \
  203. LPCWSTR pszTemplate; \
  204. PROPSHEETPAGE_RESOURCE pResource; \
  205. } DUMMYUNIONNAME; \
  206. union \
  207. { \
  208. HICON hIcon; \
  209. LPCWSTR pszIcon; \
  210. } DUMMYUNIONNAME2; \
  211. LPCWSTR pszTitle; \
  212. DLGPROC pfnDlgProc; \
  213. LPARAM lParam; \
  214. LPFNPSPCALLBACKW pfnCallback; \
  215. UINT *pcRefParent; \
  216. #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
  217. #define _PROPSHEETPAGEA_V3 _PROPSHEETPAGEA
  218. #define _PROPSHEETPAGEW_V3 _PROPSHEETPAGEW
  219. #elif (_WIN32_IE >= 0x0400)
  220. #define _PROPSHEETPAGEA_V2 _PROPSHEETPAGEA
  221. #define _PROPSHEETPAGEW_V2 _PROPSHEETPAGEW
  222. #else
  223. #define _PROPSHEETPAGEA_V1 _PROPSHEETPAGEA
  224. #define _PROPSHEETPAGEW_V1 _PROPSHEETPAGEW
  225. #endif
  226. typedef struct _PROPSHEETPAGEA_V1
  227. {
  228. PROPSHEETPAGEA_V1_FIELDS
  229. } PROPSHEETPAGEA_V1, *LPPROPSHEETPAGEA_V1;
  230. typedef const PROPSHEETPAGEA_V1 *LPCPROPSHEETPAGEA_V1;
  231. typedef struct _PROPSHEETPAGEA_V2
  232. {
  233. PROPSHEETPAGEA_V1_FIELDS
  234. LPCSTR pszHeaderTitle; // this is displayed in the header
  235. LPCSTR pszHeaderSubTitle; //
  236. } PROPSHEETPAGEA_V2, *LPPROPSHEETPAGEA_V2;
  237. typedef const PROPSHEETPAGEA_V2 *LPCPROPSHEETPAGEA_V2;
  238. typedef struct _PROPSHEETPAGEA_V3
  239. {
  240. PROPSHEETPAGEA_V1_FIELDS
  241. LPCSTR pszHeaderTitle; // this is displayed in the header
  242. LPCSTR pszHeaderSubTitle; //
  243. HANDLE hActCtx;
  244. } PROPSHEETPAGEA_V3, *LPPROPSHEETPAGEA_V3;
  245. typedef const PROPSHEETPAGEA_V3 *LPCPROPSHEETPAGEA_V3;
  246. typedef struct _PROPSHEETPAGEW_V1
  247. {
  248. PROPSHEETPAGEW_V1_FIELDS
  249. } PROPSHEETPAGEW_V1, *LPPROPSHEETPAGEW_V1;
  250. typedef const PROPSHEETPAGEW_V1 *LPCPROPSHEETPAGEW_V1;
  251. typedef struct _PROPSHEETPAGEW_V2
  252. {
  253. PROPSHEETPAGEW_V1_FIELDS
  254. LPCWSTR pszHeaderTitle; // this is displayed in the header
  255. LPCWSTR pszHeaderSubTitle; //
  256. } PROPSHEETPAGEW_V2, *LPPROPSHEETPAGEW_V2;
  257. typedef const PROPSHEETPAGEW_V2 *LPCPROPSHEETPAGEW_V2;
  258. typedef struct _PROPSHEETPAGEW_V3
  259. {
  260. PROPSHEETPAGEW_V1_FIELDS
  261. LPCWSTR pszHeaderTitle; // this is displayed in the header
  262. LPCWSTR pszHeaderSubTitle; //
  263. HANDLE hActCtx;
  264. } PROPSHEETPAGEW_V3, *LPPROPSHEETPAGEW_V3;
  265. typedef const PROPSHEETPAGEW_V3 *LPCPROPSHEETPAGEW_V3;
  266. typedef PROPSHEETPAGEA_V3 PROPSHEETPAGEA_LATEST;
  267. typedef PROPSHEETPAGEW_V3 PROPSHEETPAGEW_LATEST;
  268. typedef LPPROPSHEETPAGEA_V3 LPPROPSHEETPAGEA_LATEST;
  269. typedef LPPROPSHEETPAGEW_V3 LPPROPSHEETPAGEW_LATEST;
  270. typedef LPCPROPSHEETPAGEA_V3 LPCPROPSHEETPAGEA_LATEST;
  271. typedef LPCPROPSHEETPAGEW_V3 LPCPROPSHEETPAGEW_LATEST;
  272. #if (_WIN32_WINNT >= 0x0501) || ISOLATION_AWARE_ENABLED
  273. typedef PROPSHEETPAGEA_V3 PROPSHEETPAGEA;
  274. typedef PROPSHEETPAGEW_V3 PROPSHEETPAGEW;
  275. typedef LPPROPSHEETPAGEA_V3 LPPROPSHEETPAGEA;
  276. typedef LPPROPSHEETPAGEW_V3 LPPROPSHEETPAGEW;
  277. typedef LPCPROPSHEETPAGEA_V3 LPCPROPSHEETPAGEA;
  278. typedef LPCPROPSHEETPAGEW_V3 LPCPROPSHEETPAGEW;
  279. #elif (_WIN32_IE >= 0x0400)
  280. typedef PROPSHEETPAGEA_V2 PROPSHEETPAGEA;
  281. typedef PROPSHEETPAGEW_V2 PROPSHEETPAGEW;
  282. typedef LPPROPSHEETPAGEA_V2 LPPROPSHEETPAGEA;
  283. typedef LPPROPSHEETPAGEW_V2 LPPROPSHEETPAGEW;
  284. typedef LPCPROPSHEETPAGEA_V2 LPCPROPSHEETPAGEA;
  285. typedef LPCPROPSHEETPAGEW_V2 LPCPROPSHEETPAGEW;
  286. #else
  287. typedef PROPSHEETPAGEA_V1 PROPSHEETPAGEA;
  288. typedef PROPSHEETPAGEW_V1 PROPSHEETPAGEW;
  289. typedef LPPROPSHEETPAGEA_V1 LPPROPSHEETPAGEA;
  290. typedef LPPROPSHEETPAGEW_V1 LPPROPSHEETPAGEW;
  291. typedef LPCPROPSHEETPAGEA_V1 LPCPROPSHEETPAGEA;
  292. typedef LPCPROPSHEETPAGEW_V1 LPCPROPSHEETPAGEW;
  293. #endif
  294. #if 0 // IEUNIX reserved.
  295. /* Macros for the missing definitions. */
  296. /* Not all, because mostly used in C++. */
  297. #if __STDC__ || defined (NONAMELESSUNION)
  298. # define PSP_pszTemplate(X) ((X).u.pszTemplate)
  299. #else
  300. # define PSP_pszTemplate(X) ((X).pszTemplate)
  301. #endif
  302. #endif
  303. #ifdef UNICODE
  304. #define PROPSHEETPAGE PROPSHEETPAGEW
  305. #define LPPROPSHEETPAGE LPPROPSHEETPAGEW
  306. #define LPCPROPSHEETPAGE LPCPROPSHEETPAGEW
  307. #define PROPSHEETPAGE_V1_SIZE PROPSHEETPAGEW_V1_SIZE
  308. #define PROPSHEETPAGE_V2_SIZE PROPSHEETPAGEW_V2_SIZE
  309. #define PROPSHEETPAGE_V1 PROPSHEETPAGEW_V1
  310. #define LPPROPSHEETPAGE_V1 LPPROPSHEETPAGEW_V1
  311. #define LPCPROPSHEETPAGE_V1 LPCPROPSHEETPAGEW_V1
  312. #define PROPSHEETPAGE_V2 PROPSHEETPAGEW_V2
  313. #define LPPROPSHEETPAGE_V2 LPPROPSHEETPAGEW_V2
  314. #define LPCPROPSHEETPAGE_V2 LPCPROPSHEETPAGEW_V2
  315. #define PROPSHEETPAGE_V3 PROPSHEETPAGEW_V3
  316. #define LPPROPSHEETPAGE_V3 LPPROPSHEETPAGEW_V3
  317. #define LPCPROPSHEETPAGE_V3 LPCPROPSHEETPAGEW_V3
  318. #define PROPSHEETPAGE_LATEST PROPSHEETPAGEW_LATEST
  319. #define LPPROPSHEETPAGE_LATEST LPPROPSHEETPAGEW_LATEST
  320. #define LPCPROPSHEETPAGE_LATEST LPCPROPSHEETPAGEW_LATEST
  321. #else
  322. #define PROPSHEETPAGE PROPSHEETPAGEA
  323. #define LPPROPSHEETPAGE LPPROPSHEETPAGEA
  324. #define LPCPROPSHEETPAGE LPCPROPSHEETPAGEA
  325. #define PROPSHEETPAGE_V1_SIZE PROPSHEETPAGEA_V1_SIZE
  326. #define PROPSHEETPAGE_V2_SIZE PROPSHEETPAGEA_V2_SIZE
  327. #define PROPSHEETPAGE_V1 PROPSHEETPAGEA_V1
  328. #define LPPROPSHEETPAGE_V1 LPPROPSHEETPAGEA_V1
  329. #define LPCPROPSHEETPAGE_V1 LPCPROPSHEETPAGEA_V1
  330. #define PROPSHEETPAGE_V2 PROPSHEETPAGEA_V2
  331. #define LPPROPSHEETPAGE_V2 LPPROPSHEETPAGEA_V2
  332. #define LPCPROPSHEETPAGE_V2 LPCPROPSHEETPAGEA_V2
  333. #define PROPSHEETPAGE_V3 PROPSHEETPAGEA_V3
  334. #define LPPROPSHEETPAGE_V3 LPPROPSHEETPAGEA_V3
  335. #define LPCPROPSHEETPAGE_V3 LPCPROPSHEETPAGEA_V3
  336. #define PROPSHEETPAGE_LATEST PROPSHEETPAGEA_LATEST
  337. #define LPPROPSHEETPAGE_LATEST LPPROPSHEETPAGEA_LATEST
  338. #define LPCPROPSHEETPAGE_LATEST LPCPROPSHEETPAGEA_LATEST
  339. #endif
  340. #define PSH_DEFAULT 0x00000000
  341. #define PSH_PROPTITLE 0x00000001
  342. #define PSH_USEHICON 0x00000002
  343. #define PSH_USEICONID 0x00000004
  344. #define PSH_PROPSHEETPAGE 0x00000008
  345. #define PSH_WIZARDHASFINISH 0x00000010
  346. #define PSH_WIZARD 0x00000020
  347. #define PSH_USEPSTARTPAGE 0x00000040
  348. #define PSH_NOAPPLYNOW 0x00000080
  349. #define PSH_USECALLBACK 0x00000100
  350. #define PSH_HASHELP 0x00000200
  351. #define PSH_MODELESS 0x00000400
  352. #define PSH_RTLREADING 0x00000800
  353. #define PSH_WIZARDCONTEXTHELP 0x00001000
  354. #if (_WIN32_IE >= 0x0400)
  355. //----- New flags for wizard97 -----------
  356. ;begin_internal
  357. // we are such morons. Wiz97 underwent a redesign between IE4 and IE5
  358. // so we have to treat them as two unrelated wizard styles that happen to
  359. // have frighteningly similar names.
  360. #define PSH_WIZARD97IE4 0x00002000
  361. #define PSH_WIZARD97IE5 0x01000000
  362. ;end_internal
  363. #if (_WIN32_IE < 0x0500)
  364. #define PSH_WIZARD97 0x00002000
  365. #else
  366. #define PSH_WIZARD97 0x01000000
  367. #endif
  368. // 0x00004000 was not used by any previous release
  369. #define PSH_WATERMARK 0x00008000
  370. #define PSH_USEHBMWATERMARK 0x00010000 // user pass in a hbmWatermark instead of pszbmWatermark
  371. #define PSH_USEHPLWATERMARK 0x00020000 //
  372. #define PSH_STRETCHWATERMARK 0x00040000 // stretchwatermark also applies for the header
  373. #define PSH_HEADER 0x00080000
  374. #define PSH_USEHBMHEADER 0x00100000
  375. #define PSH_USEPAGELANG 0x00200000 // use frame dialog template matched to page
  376. //----------------------------------------
  377. #endif
  378. #if (_WIN32_IE >= 0x0500)
  379. //----- New flags for wizard-lite --------
  380. #define PSH_WIZARD_LITE 0x00400000
  381. #define PSH_NOCONTEXTHELP 0x02000000
  382. //----------------------------------------
  383. #endif
  384. ;begin_internal
  385. #define PSH_THUNKED 0x00800000
  386. #define PSH_ALL 0x03FFFFFF
  387. ;end_internal
  388. typedef int (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
  389. #define PROPSHEETHEADERA_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, pfnCallback)
  390. #define PROPSHEETHEADERW_V1_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, pfnCallback)
  391. #define PROPSHEETHEADERA_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERA, DUMMYUNION5_MEMBER(hbmHeader))
  392. #define PROPSHEETHEADERW_V2_SIZE CCSIZEOF_STRUCT(PROPSHEETHEADERW, DUMMYUNION5_MEMBER(hbmHeader))
  393. typedef struct _PROPSHEETHEADERA
  394. {
  395. DWORD dwSize;
  396. DWORD dwFlags;
  397. HWND hwndParent;
  398. HINSTANCE hInstance;
  399. union
  400. {
  401. HICON hIcon;
  402. LPCSTR pszIcon;
  403. } DUMMYUNIONNAME;
  404. LPCSTR pszCaption;
  405. UINT nPages;
  406. union
  407. {
  408. UINT nStartPage;
  409. LPCSTR pStartPage;
  410. } DUMMYUNIONNAME2;
  411. union
  412. {
  413. LPCPROPSHEETPAGEA ppsp;
  414. HPROPSHEETPAGE *phpage;
  415. } DUMMYUNIONNAME3;
  416. PFNPROPSHEETCALLBACK pfnCallback;
  417. #if (_WIN32_IE >= 0x0400)
  418. union
  419. {
  420. HBITMAP hbmWatermark;
  421. LPCSTR pszbmWatermark;
  422. } DUMMYUNIONNAME4;
  423. HPALETTE hplWatermark;
  424. union
  425. {
  426. HBITMAP hbmHeader; // Header bitmap shares the palette with watermark
  427. LPCSTR pszbmHeader;
  428. } DUMMYUNIONNAME5;
  429. #endif
  430. } PROPSHEETHEADERA, *LPPROPSHEETHEADERA;
  431. typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
  432. typedef struct _PROPSHEETHEADERW
  433. {
  434. DWORD dwSize;
  435. DWORD dwFlags;
  436. HWND hwndParent;
  437. HINSTANCE hInstance;
  438. union
  439. {
  440. HICON hIcon;
  441. LPCWSTR pszIcon;
  442. } DUMMYUNIONNAME;
  443. LPCWSTR pszCaption;
  444. UINT nPages;
  445. union
  446. {
  447. UINT nStartPage;
  448. LPCWSTR pStartPage;
  449. } DUMMYUNIONNAME2;
  450. union
  451. {
  452. LPCPROPSHEETPAGEW ppsp;
  453. HPROPSHEETPAGE *phpage;
  454. } DUMMYUNIONNAME3;
  455. PFNPROPSHEETCALLBACK pfnCallback;
  456. #if (_WIN32_IE >= 0x0400)
  457. union
  458. {
  459. HBITMAP hbmWatermark;
  460. LPCWSTR pszbmWatermark;
  461. } DUMMYUNIONNAME4;
  462. HPALETTE hplWatermark;
  463. union
  464. {
  465. HBITMAP hbmHeader;
  466. LPCWSTR pszbmHeader;
  467. } DUMMYUNIONNAME5;
  468. #endif
  469. } PROPSHEETHEADERW, *LPPROPSHEETHEADERW;
  470. typedef const PROPSHEETHEADERW *LPCPROPSHEETHEADERW;
  471. #if 0 //IEUNIX reserved.
  472. /* Macros for the missing definitions. */
  473. /* Not all, because mostly used in C++. */
  474. #if __STDC__ || defined (NONAMELESSUNION)
  475. # define PSH_nStartPage(X) ((X).u2.nStartPage)
  476. # define PSH_ppsp(X) ((X).u3.ppsp)
  477. #else
  478. # define PSH_nStartPage(X) ((X).nStartPage)
  479. # define PSH_ppsp(X) ((X).ppsp)
  480. #endif
  481. #endif
  482. #ifdef UNICODE
  483. #define PROPSHEETHEADER PROPSHEETHEADERW
  484. #define LPPROPSHEETHEADER LPPROPSHEETHEADERW
  485. #define LPCPROPSHEETHEADER LPCPROPSHEETHEADERW
  486. #define PROPSHEETHEADER_V1_SIZE PROPSHEETHEADERW_V1_SIZE
  487. #define PROPSHEETHEADER_V2_SIZE PROPSHEETHEADERW_V2_SIZE
  488. #else
  489. #define PROPSHEETHEADER PROPSHEETHEADERA
  490. #define LPPROPSHEETHEADER LPPROPSHEETHEADERA
  491. #define LPCPROPSHEETHEADER LPCPROPSHEETHEADERA
  492. #define PROPSHEETHEADER_V1_SIZE PROPSHEETHEADERA_V1_SIZE
  493. #define PROPSHEETHEADER_V2_SIZE PROPSHEETHEADERA_V2_SIZE
  494. #endif
  495. #define PSCB_INITIALIZED 1
  496. #define PSCB_PRECREATE 2
  497. #if (_WIN32_IE >= 0x560)
  498. // PSCB_BUTTONPRESSED will be sent when the user clicks a button in the
  499. // property dialog (OK, Cancel, Apply, or Close). The message will be sent
  500. // to PROPSHEETHEADER's pfnCallback if the PSH_USECALLBACK flag was specified.
  501. // The LPARAM will be equal to one of the following based on the button pressed:
  502. // This message is only supported on comctl32 v6.
  503. // PSBTN_FINISH (Close), PSBTN_OK, PSBTN_APPLYNOW, or PSBTN_CANCEL
  504. #define PSCB_BUTTONPRESSED 3
  505. #endif // _WIN32_IE >= 0x560
  506. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA constPropSheetPagePointer);
  507. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW constPropSheetPagePointer);
  508. WINCOMMCTRLAPI BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE);
  509. /* #!perl DeclareFunctionErrorValue("PropertySheetA", "-1"); */
  510. WINCOMMCTRLAPI INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
  511. /* #!perl DeclareFunctionErrorValue("PropertySheetW", "-1"); */
  512. WINCOMMCTRLAPI INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
  513. #ifdef UNICODE
  514. #define CreatePropertySheetPage CreatePropertySheetPageW
  515. #define PropertySheet PropertySheetW
  516. #else
  517. #define CreatePropertySheetPage CreatePropertySheetPageA
  518. #define PropertySheet PropertySheetA
  519. #endif
  520. #ifdef _WIN32 ;Internal
  521. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreateProxyPage32Ex(HPROPSHEETPAGE hpage16, HINSTANCE hinst16); ;Internal
  522. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreateProxyPage(HPROPSHEETPAGE hpage16, HINSTANCE hinst16); ;Internal
  523. #endif ;Internal
  524. typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
  525. typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
  526. typedef struct _PSHNOTIFY
  527. {
  528. NMHDR hdr;
  529. LPARAM lParam;
  530. } PSHNOTIFY, *LPPSHNOTIFY;
  531. // these need to match shell.h's ranges ;Internal
  532. #define PSN_FIRST (0U-200U)
  533. #define PSN_LAST (0U-299U)
  534. #define PSN_SETACTIVE (PSN_FIRST-0)
  535. #define PSN_KILLACTIVE (PSN_FIRST-1)
  536. // #define PSN_VALIDATE (PSN_FIRST-1)
  537. #define PSN_APPLY (PSN_FIRST-2)
  538. #define PSN_RESET (PSN_FIRST-3)
  539. // #define PSN_CANCEL (PSN_FIRST-3)
  540. #define PSN_HASHELP (PSN_FIRST-4) ;Internal
  541. #define PSN_HELP (PSN_FIRST-5)
  542. #define PSN_WIZBACK (PSN_FIRST-6)
  543. #define PSN_WIZNEXT (PSN_FIRST-7)
  544. #define PSN_WIZFINISH (PSN_FIRST-8)
  545. #define PSN_QUERYCANCEL (PSN_FIRST-9)
  546. #if (_WIN32_IE >= 0x0400)
  547. #define PSN_GETOBJECT (PSN_FIRST-10)
  548. #endif // 0x0400
  549. #if (_WIN32_IE >= 0x0500)
  550. #define PSN_LASTCHANCEAPPLY (PSN_FIRST-11) ;Internal
  551. #define PSN_TRANSLATEACCELERATOR (PSN_FIRST-12)
  552. #define PSN_QUERYINITIALFOCUS (PSN_FIRST-13)
  553. // Note! If you add a new PSN_*, make sure to tell the WOW people ;Internal
  554. #endif // 0x0500
  555. // Do not rely on PSNRET_INVALID because some apps return 1 for ;Internal
  556. // all WM_NOTIFY messages, even if they weren't handled. ;Internal
  557. #define PSNRET_NOERROR 0
  558. #define PSNRET_INVALID 1
  559. #define PSNRET_INVALID_NOCHANGEPAGE 2
  560. #define PSNRET_MESSAGEHANDLED 3
  561. #define PSM_SETCURSEL (WM_USER + 101)
  562. #define PropSheet_SetCurSel(hDlg, hpage, index) \
  563. SNDMSG(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
  564. #define PSM_REMOVEPAGE (WM_USER + 102)
  565. #define PropSheet_RemovePage(hDlg, index, hpage) \
  566. SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
  567. #define PSM_ADDPAGE (WM_USER + 103)
  568. #define PropSheet_AddPage(hDlg, hpage) \
  569. SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
  570. #define PSM_CHANGED (WM_USER + 104)
  571. #define PropSheet_Changed(hDlg, hwnd) \
  572. SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
  573. #define PSM_RESTARTWINDOWS (WM_USER + 105)
  574. #define PropSheet_RestartWindows(hDlg) \
  575. SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
  576. #define PSM_REBOOTSYSTEM (WM_USER + 106)
  577. #define PropSheet_RebootSystem(hDlg) \
  578. SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
  579. #define PSM_CANCELTOCLOSE (WM_USER + 107)
  580. #define PropSheet_CancelToClose(hDlg) \
  581. PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
  582. #define PSM_QUERYSIBLINGS (WM_USER + 108)
  583. #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
  584. SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
  585. #define PSM_UNCHANGED (WM_USER + 109)
  586. #define PropSheet_UnChanged(hDlg, hwnd) \
  587. SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
  588. #define PSM_APPLY (WM_USER + 110)
  589. #define PropSheet_Apply(hDlg) \
  590. SNDMSG(hDlg, PSM_APPLY, 0, 0L)
  591. #define PSM_SETTITLEA (WM_USER + 111)
  592. #define PSM_SETTITLEW (WM_USER + 120)
  593. ;begin_internal
  594. //
  595. // we keep PSM_DISABLEAPPLY / PSM_ENABLEAPPLY messages private,
  596. // because we dont want random prop sheets screwing with this.
  597. //
  598. #define PSM_DISABLEAPPLY (WM_USER + 122)
  599. #define PropSheet_DisableApply(hDlg) \
  600. SendMessage(hDlg, PSM_DISABLEAPPLY, 0, 0L)
  601. #define PSM_ENABLEAPPLY (WM_USER + 123)
  602. #define PropSheet_EnableApply(hDlg) \
  603. SendMessage(hDlg, PSM_ENABLEAPPLY, 0, 0L)
  604. ;end_internal
  605. #ifdef UNICODE
  606. #define PSM_SETTITLE PSM_SETTITLEW
  607. #else
  608. #define PSM_SETTITLE PSM_SETTITLEA
  609. #endif
  610. #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
  611. SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)(lpszText))
  612. #define PSM_SETWIZBUTTONS (WM_USER + 112)
  613. #define PropSheet_SetWizButtons(hDlg, dwFlags) \
  614. PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
  615. #define PropSheet_SetWizButtonsNow(hDlg, dwFlags) PropSheet_SetWizButtons(hDlg, dwFlags) ;Internal
  616. #define PSWIZB_BACK 0x00000001
  617. #define PSWIZB_NEXT 0x00000002
  618. #define PSWIZB_FINISH 0x00000004
  619. #define PSWIZB_DISABLEDFINISH 0x00000008
  620. #define PSM_PRESSBUTTON (WM_USER + 113)
  621. #define PropSheet_PressButton(hDlg, iButton) \
  622. PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
  623. #define PSBTN_BACK 0
  624. #define PSBTN_NEXT 1
  625. #define PSBTN_FINISH 2
  626. #define PSBTN_OK 3
  627. #define PSBTN_APPLYNOW 4
  628. #define PSBTN_CANCEL 5
  629. #define PSBTN_HELP 6
  630. #define PSBTN_MAX 6
  631. #define PSM_SETCURSELID (WM_USER + 114)
  632. #define PropSheet_SetCurSelByID(hDlg, id) \
  633. SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
  634. #define PSM_SETFINISHTEXTA (WM_USER + 115)
  635. #define PSM_SETFINISHTEXTW (WM_USER + 121)
  636. #ifdef UNICODE
  637. #define PSM_SETFINISHTEXT PSM_SETFINISHTEXTW
  638. #else
  639. #define PSM_SETFINISHTEXT PSM_SETFINISHTEXTA
  640. #endif
  641. #define PropSheet_SetFinishText(hDlg, lpszText) \
  642. SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
  643. #define PSM_GETTABCONTROL (WM_USER + 116)
  644. #define PropSheet_GetTabControl(hDlg) \
  645. (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
  646. #define PSM_ISDIALOGMESSAGE (WM_USER + 117)
  647. #define PropSheet_IsDialogMessage(hDlg, pMsg) \
  648. (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
  649. #define PSM_GETCURRENTPAGEHWND (WM_USER + 118)
  650. #define PropSheet_GetCurrentPageHwnd(hDlg) \
  651. (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
  652. #define PSM_INSERTPAGE (WM_USER + 119)
  653. #define PropSheet_InsertPage(hDlg, index, hpage) \
  654. SNDMSG(hDlg, PSM_INSERTPAGE, (WPARAM)(index), (LPARAM)(hpage))
  655. #if (_WIN32_IE >= 0x0500)
  656. #define PSM_SETHEADERTITLEA (WM_USER + 125)
  657. #define PSM_SETHEADERTITLEW (WM_USER + 126)
  658. #ifdef UNICODE
  659. #define PSM_SETHEADERTITLE PSM_SETHEADERTITLEW
  660. #else
  661. #define PSM_SETHEADERTITLE PSM_SETHEADERTITLEA
  662. #endif
  663. #define PropSheet_SetHeaderTitle(hDlg, index, lpszText) \
  664. SNDMSG(hDlg, PSM_SETHEADERTITLE, (WPARAM)(index), (LPARAM)(lpszText))
  665. #define PSM_SETHEADERSUBTITLEA (WM_USER + 127)
  666. #define PSM_SETHEADERSUBTITLEW (WM_USER + 128)
  667. #ifdef UNICODE
  668. #define PSM_SETHEADERSUBTITLE PSM_SETHEADERSUBTITLEW
  669. #else
  670. #define PSM_SETHEADERSUBTITLE PSM_SETHEADERSUBTITLEA
  671. #endif
  672. #define PropSheet_SetHeaderSubTitle(hDlg, index, lpszText) \
  673. SNDMSG(hDlg, PSM_SETHEADERSUBTITLE, (WPARAM)(index), (LPARAM)(lpszText))
  674. #define PSM_HWNDTOINDEX (WM_USER + 129)
  675. #define PropSheet_HwndToIndex(hDlg, hwnd) \
  676. (int)SNDMSG(hDlg, PSM_HWNDTOINDEX, (WPARAM)(hwnd), 0)
  677. #define PSM_INDEXTOHWND (WM_USER + 130)
  678. #define PropSheet_IndexToHwnd(hDlg, i) \
  679. (HWND)SNDMSG(hDlg, PSM_INDEXTOHWND, (WPARAM)(i), 0)
  680. #define PSM_PAGETOINDEX (WM_USER + 131)
  681. #define PropSheet_PageToIndex(hDlg, hpage) \
  682. (int)SNDMSG(hDlg, PSM_PAGETOINDEX, 0, (LPARAM)(hpage))
  683. #define PSM_INDEXTOPAGE (WM_USER + 132)
  684. #define PropSheet_IndexToPage(hDlg, i) \
  685. (HPROPSHEETPAGE)SNDMSG(hDlg, PSM_INDEXTOPAGE, (WPARAM)(i), 0)
  686. #define PSM_IDTOINDEX (WM_USER + 133)
  687. #define PropSheet_IdToIndex(hDlg, id) \
  688. (int)SNDMSG(hDlg, PSM_IDTOINDEX, 0, (LPARAM)(id))
  689. #define PSM_INDEXTOID (WM_USER + 134)
  690. #define PropSheet_IndexToId(hDlg, i) \
  691. SNDMSG(hDlg, PSM_INDEXTOID, (WPARAM)(i), 0)
  692. #define PSM_GETRESULT (WM_USER + 135)
  693. #define PropSheet_GetResult(hDlg) \
  694. SNDMSG(hDlg, PSM_GETRESULT, 0, 0)
  695. #define PSM_RECALCPAGESIZES (WM_USER + 136)
  696. #define PropSheet_RecalcPageSizes(hDlg) \
  697. SNDMSG(hDlg, PSM_RECALCPAGESIZES, 0, 0)
  698. #endif // 0x0500
  699. #define ID_PSRESTARTWINDOWS 0x2
  700. #define ID_PSREBOOTSYSTEM (ID_PSRESTARTWINDOWS | 0x1)
  701. #define WIZ_CXDLG 276
  702. #define WIZ_CYDLG 140
  703. #define WIZ_CXBMP 80
  704. #define WIZ_BODYX 92
  705. #define WIZ_BODYCX 184
  706. #define PROP_SM_CXDLG 212
  707. #define PROP_SM_CYDLG 188
  708. #define PROP_MED_CXDLG 227
  709. #define PROP_MED_CYDLG 215
  710. #define PROP_LG_CXDLG 252
  711. #define PROP_LG_CYDLG 218
  712. ;begin_both
  713. #ifdef __cplusplus
  714. }
  715. #endif
  716. #include <poppack.h>
  717. ;end_both
  718. #endif // _PRSHTP_H_ // ;internal
  719. #endif // _PRSHT_H_