Leaked source code of windows server 2003
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.

420 lines
12 KiB

  1. /*****************************************************************************\
  2. * *
  3. * prsht.h - - Interface for the Windows Property Sheet Pages *
  4. * *
  5. * Version 1.0 *
  6. * *
  7. * Copyright (c) 1991-1996, Microsoft Corp. All rights reserved. *
  8. * *
  9. \*****************************************************************************/
  10. #ifndef _PRSHT_H_
  11. #define _PRSHT_H_
  12. //
  13. // Define API decoration for direct importing of DLL references.
  14. //
  15. #ifndef WINCOMMCTRLAPI
  16. #if !defined(_COMCTL32_) && defined(_WIN32)
  17. #define WINCOMMCTRLAPI DECLSPEC_IMPORT
  18. #else
  19. #define WINCOMMCTRLAPI
  20. #endif
  21. #endif // WINCOMMCTRLAPI
  22. //
  23. // For compilers that don't support nameless unions
  24. //
  25. #ifndef DUMMYUNIONNAME
  26. #ifdef NONAMELESSUNION
  27. #define DUMMYUNIONNAME u
  28. #define DUMMYUNIONNAME2 u2
  29. #define DUMMYUNIONNAME3 u3
  30. #else
  31. #define DUMMYUNIONNAME
  32. #define DUMMYUNIONNAME2
  33. #define DUMMYUNIONNAME3
  34. #endif
  35. #endif // DUMMYUNIONNAME
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. #ifdef __cplusplus
  40. #define SNDMSG ::SendMessage
  41. #else
  42. #define SNDMSG SendMessage
  43. #endif
  44. #define MAXPROPPAGES 100
  45. struct _PSP;
  46. typedef struct _PSP FAR* HPROPSHEETPAGE;
  47. #ifndef MIDL_PASS
  48. struct _PROPSHEETPAGEA;
  49. struct _PROPSHEETPAGEW;
  50. #endif
  51. typedef UINT (CALLBACK FAR * LPFNPSPCALLBACKA)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEA FAR *ppsp);
  52. typedef UINT (CALLBACK FAR * LPFNPSPCALLBACKW)(HWND hwnd, UINT uMsg, struct _PROPSHEETPAGEW FAR *ppsp);
  53. #ifdef UNICODE
  54. #define LPFNPSPCALLBACK LPFNPSPCALLBACKW
  55. #else
  56. #define LPFNPSPCALLBACK LPFNPSPCALLBACKA
  57. #endif
  58. #define PSP_DEFAULT 0x0000
  59. #define PSP_DLGINDIRECT 0x0001
  60. #define PSP_USEHICON 0x0002
  61. #define PSP_USEICONID 0x0004
  62. #define PSP_USETITLE 0x0008
  63. #define PSP_RTLREADING 0x0010
  64. #define PSP_HASHELP 0x0020
  65. #define PSP_USEREFPARENT 0x0040
  66. #define PSP_USECALLBACK 0x0080
  67. #define PSPCB_RELEASE 1
  68. #define PSPCB_CREATE 2
  69. typedef struct _PROPSHEETPAGEA {
  70. DWORD dwSize;
  71. DWORD dwFlags;
  72. HINSTANCE hInstance;
  73. union {
  74. LPCSTR pszTemplate;
  75. #ifdef _WIN32
  76. LPCDLGTEMPLATE pResource;
  77. #else
  78. const VOID FAR *pResource;
  79. #endif
  80. } DUMMYUNIONNAME;
  81. union {
  82. HICON hIcon;
  83. LPCSTR pszIcon;
  84. } DUMMYUNIONNAME2;
  85. LPCSTR pszTitle;
  86. DLGPROC pfnDlgProc;
  87. LPARAM lParam;
  88. LPFNPSPCALLBACKA pfnCallback;
  89. UINT FAR * pcRefParent;
  90. } PROPSHEETPAGEA, FAR *LPPROPSHEETPAGEA;
  91. typedef const PROPSHEETPAGEA FAR *LPCPROPSHEETPAGEA;
  92. typedef struct _PROPSHEETPAGEW {
  93. DWORD dwSize;
  94. DWORD dwFlags;
  95. HINSTANCE hInstance;
  96. union {
  97. LPCWSTR pszTemplate;
  98. #ifdef _WIN32
  99. LPCDLGTEMPLATE pResource;
  100. #else
  101. const VOID FAR *pResource;
  102. #endif
  103. }DUMMYUNIONNAME;
  104. union {
  105. HICON hIcon;
  106. LPCWSTR pszIcon;
  107. }DUMMYUNIONNAME2;
  108. LPCWSTR pszTitle;
  109. DLGPROC pfnDlgProc;
  110. LPARAM lParam;
  111. LPFNPSPCALLBACKW pfnCallback;
  112. UINT FAR * pcRefParent;
  113. } PROPSHEETPAGEW, FAR *LPPROPSHEETPAGEW;
  114. typedef const PROPSHEETPAGEW FAR *LPCPROPSHEETPAGEW;
  115. #ifdef UNICODE
  116. #define PROPSHEETPAGE PROPSHEETPAGEW
  117. #define LPPROPSHEETPAGE LPPROPSHEETPAGEW
  118. #define LPCPROPSHEETPAGE LPCPROPSHEETPAGEW
  119. #else
  120. #define PROPSHEETPAGE PROPSHEETPAGEA
  121. #define LPPROPSHEETPAGE LPPROPSHEETPAGEA
  122. #define LPCPROPSHEETPAGE LPCPROPSHEETPAGEA
  123. #endif
  124. #define PSH_DEFAULT 0x0000
  125. #define PSH_PROPTITLE 0x0001
  126. #define PSH_USEHICON 0x0002
  127. #define PSH_USEICONID 0x0004
  128. #define PSH_PROPSHEETPAGE 0x0008
  129. #define PSH_WIZARD 0x0020
  130. #define PSH_USEPSTARTPAGE 0x0040
  131. #define PSH_NOAPPLYNOW 0x0080
  132. #define PSH_USECALLBACK 0x0100
  133. #define PSH_HASHELP 0x0200
  134. #define PSH_MODELESS 0x0400
  135. #define PSH_RTLREADING 0x0800
  136. typedef int (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
  137. typedef struct _PROPSHEETHEADERA {
  138. DWORD dwSize;
  139. DWORD dwFlags;
  140. HWND hwndParent;
  141. HINSTANCE hInstance;
  142. union {
  143. HICON hIcon;
  144. LPCSTR pszIcon;
  145. }DUMMYUNIONNAME;
  146. LPCSTR pszCaption;
  147. UINT nPages;
  148. union {
  149. UINT nStartPage;
  150. LPCSTR pStartPage;
  151. }DUMMYUNIONNAME2;
  152. union {
  153. LPCPROPSHEETPAGEA ppsp;
  154. HPROPSHEETPAGE FAR *phpage;
  155. }DUMMYUNIONNAME3;
  156. PFNPROPSHEETCALLBACK pfnCallback;
  157. } PROPSHEETHEADERA, FAR *LPPROPSHEETHEADERA;
  158. typedef const PROPSHEETHEADERA FAR *LPCPROPSHEETHEADERA;
  159. typedef struct _PROPSHEETHEADERW {
  160. DWORD dwSize;
  161. DWORD dwFlags;
  162. HWND hwndParent;
  163. HINSTANCE hInstance;
  164. union {
  165. HICON hIcon;
  166. LPCWSTR pszIcon;
  167. }DUMMYUNIONNAME;
  168. LPCWSTR pszCaption;
  169. UINT nPages;
  170. union {
  171. UINT nStartPage;
  172. LPCWSTR pStartPage;
  173. }DUMMYUNIONNAME2;
  174. union {
  175. LPCPROPSHEETPAGEW ppsp;
  176. HPROPSHEETPAGE FAR *phpage;
  177. }DUMMYUNIONNAME3;
  178. PFNPROPSHEETCALLBACK pfnCallback;
  179. } PROPSHEETHEADERW, FAR *LPPROPSHEETHEADERW;
  180. typedef const PROPSHEETHEADERW FAR *LPCPROPSHEETHEADERW;
  181. #ifdef UNICODE
  182. #define PROPSHEETHEADER PROPSHEETHEADERW
  183. #define LPPROPSHEETHEADER LPPROPSHEETHEADERW
  184. #define LPCPROPSHEETHEADER LPCPROPSHEETHEADERW
  185. #else
  186. #define PROPSHEETHEADER PROPSHEETHEADERA
  187. #define LPPROPSHEETHEADER LPPROPSHEETHEADERA
  188. #define LPCPROPSHEETHEADER LPCPROPSHEETHEADERA
  189. #endif
  190. #define PSCB_INITIALIZED 1
  191. #define PSCB_PRECREATE 2
  192. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
  193. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
  194. WINCOMMCTRLAPI BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE);
  195. WINCOMMCTRLAPI int WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
  196. WINCOMMCTRLAPI int WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
  197. #ifdef UNICODE
  198. #define CreatePropertySheetPage CreatePropertySheetPageW
  199. #define PropertySheet PropertySheetW
  200. #else
  201. #define CreatePropertySheetPage CreatePropertySheetPageA
  202. #define PropertySheet PropertySheetA
  203. #endif
  204. typedef BOOL (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
  205. typedef BOOL (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
  206. typedef struct _PSHNOTIFY
  207. {
  208. NMHDR hdr;
  209. LPARAM lParam;
  210. } PSHNOTIFY, FAR *LPPSHNOTIFY;
  211. #define PSN_FIRST (0U-200U)
  212. #define PSN_LAST (0U-299U)
  213. #define PSN_SETACTIVE (PSN_FIRST-0)
  214. #define PSN_KILLACTIVE (PSN_FIRST-1)
  215. // #define PSN_VALIDATE (PSN_FIRST-1)
  216. #define PSN_APPLY (PSN_FIRST-2)
  217. #define PSN_RESET (PSN_FIRST-3)
  218. // #define PSN_CANCEL (PSN_FIRST-3)
  219. #define PSN_HELP (PSN_FIRST-5)
  220. #define PSN_WIZBACK (PSN_FIRST-6)
  221. #define PSN_WIZNEXT (PSN_FIRST-7)
  222. #define PSN_WIZFINISH (PSN_FIRST-8)
  223. #define PSN_QUERYCANCEL (PSN_FIRST-9)
  224. #define PSNRET_NOERROR 0
  225. #define PSNRET_INVALID 1
  226. #define PSNRET_INVALID_NOCHANGEPAGE 2
  227. #define PSM_SETCURSEL (WM_USER + 101)
  228. #define PropSheet_SetCurSel(hDlg, hpage, index) \
  229. SNDMSG(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
  230. #define PSM_REMOVEPAGE (WM_USER + 102)
  231. #define PropSheet_RemovePage(hDlg, index, hpage) \
  232. SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
  233. #define PSM_ADDPAGE (WM_USER + 103)
  234. #define PropSheet_AddPage(hDlg, hpage) \
  235. SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
  236. #define PSM_CHANGED (WM_USER + 104)
  237. #define PropSheet_Changed(hDlg, hwnd) \
  238. SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
  239. #define PSM_RESTARTWINDOWS (WM_USER + 105)
  240. #define PropSheet_RestartWindows(hDlg) \
  241. SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
  242. #define PSM_REBOOTSYSTEM (WM_USER + 106)
  243. #define PropSheet_RebootSystem(hDlg) \
  244. SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
  245. #define PSM_CANCELTOCLOSE (WM_USER + 107)
  246. #define PropSheet_CancelToClose(hDlg) \
  247. SNDMSG(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
  248. #define PSM_QUERYSIBLINGS (WM_USER + 108)
  249. #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
  250. SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
  251. #define PSM_UNCHANGED (WM_USER + 109)
  252. #define PropSheet_UnChanged(hDlg, hwnd) \
  253. SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
  254. #define PSM_APPLY (WM_USER + 110)
  255. #define PropSheet_Apply(hDlg) \
  256. SNDMSG(hDlg, PSM_APPLY, 0, 0L)
  257. #define PSM_SETTITLEA (WM_USER + 111)
  258. #define PSM_SETTITLEW (WM_USER + 120)
  259. #ifdef UNICODE
  260. #define PSM_SETTITLE PSM_SETTITLEW
  261. #else
  262. #define PSM_SETTITLE PSM_SETTITLEA
  263. #endif
  264. #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
  265. SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
  266. #define PSM_SETWIZBUTTONS (WM_USER + 112)
  267. #define PropSheet_SetWizButtons(hDlg, dwFlags) \
  268. PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
  269. #define PSWIZB_BACK 0x00000001
  270. #define PSWIZB_NEXT 0x00000002
  271. #define PSWIZB_FINISH 0x00000004
  272. #define PSWIZB_DISABLEDFINISH 0x00000008
  273. #define PSM_PRESSBUTTON (WM_USER + 113)
  274. #define PropSheet_PressButton(hDlg, iButton) \
  275. SNDMSG(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
  276. #define PSBTN_BACK 0
  277. #define PSBTN_NEXT 1
  278. #define PSBTN_FINISH 2
  279. #define PSBTN_OK 3
  280. #define PSBTN_APPLYNOW 4
  281. #define PSBTN_CANCEL 5
  282. #define PSBTN_HELP 6
  283. #define PSBTN_MAX 6
  284. #define PSM_SETCURSELID (WM_USER + 114)
  285. #define PropSheet_SetCurSelByID(hDlg, id) \
  286. SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
  287. #define PSM_SETFINISHTEXTA (WM_USER + 115)
  288. #define PSM_SETFINISHTEXTW (WM_USER + 121)
  289. #ifdef UNICODE
  290. #define PSM_SETFINISHTEXT PSM_SETFINISHTEXTW
  291. #else
  292. #define PSM_SETFINISHTEXT PSM_SETFINISHTEXTA
  293. #endif
  294. #define PropSheet_SetFinishText(hDlg, lpszText) \
  295. SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
  296. #define PSM_GETTABCONTROL (WM_USER + 116)
  297. #define PropSheet_GetTabControl(hDlg) \
  298. (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
  299. #define PSM_ISDIALOGMESSAGE (WM_USER + 117)
  300. #define PropSheet_IsDialogMessage(hDlg, pMsg) \
  301. (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
  302. #define PSM_GETCURRENTPAGEHWND (WM_USER + 118)
  303. #define PropSheet_GetCurrentPageHwnd(hDlg) \
  304. (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
  305. #define ID_PSRESTARTWINDOWS 0x2
  306. #define ID_PSREBOOTSYSTEM (ID_PSRESTARTWINDOWS | 0x1)
  307. #define WIZ_CXDLG 276
  308. #define WIZ_CYDLG 140
  309. #define WIZ_CXBMP 80
  310. #define WIZ_BODYX 92
  311. #define WIZ_BODYCX 184
  312. #define PROP_SM_CXDLG 212
  313. #define PROP_SM_CYDLG 188
  314. #define PROP_MED_CXDLG 227
  315. #define PROP_MED_CYDLG 215
  316. #define PROP_LG_CXDLG 252
  317. #define PROP_LG_CYDLG 218
  318. #ifdef __cplusplus
  319. }
  320. #endif
  321. #endif