home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / PRSHT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-08  |  13.4 KB  |  466 lines

  1. #if !defined(__TOPLEVEL_NEXT_COMMON_INCLUDE__)
  2. #define __TOPLEVEL_NEXT_COMMON_INCLUDE__
  3. #define __TOPLEVEL_PRSHT_H_ 
  4. #include <next_common_defines.h>
  5. #endif /* __TOPLEVEL_NEXT_COMMON_INCLUDE__ */
  6.  
  7. /*****************************************************************************\
  8. *                                                                             *
  9. * prsht.h - - Interface for the Windows Property Sheet Pages                  *
  10. *                                                                             *
  11. * Version 1.0                                                                 *
  12. *                                                                             *
  13. * Copyright (c) 1991-1995, Microsoft Corp.      All rights reserved.          *
  14. *                                                                             *
  15. \*****************************************************************************/
  16.  
  17. #ifndef _PRSHT_H_
  18. #define _PRSHT_H_
  19.  
  20. //
  21. // Define API decoration for direct importing of DLL references.
  22. //
  23. #ifndef WINCOMMCTRLAPI
  24. #if !defined(_COMCTL32_) && defined(_WIN32)
  25. #define WINCOMMCTRLAPI DECLSPEC_IMPORT
  26. #else
  27. #define WINCOMMCTRLAPI
  28. #endif
  29. #endif // WINCOMMCTRLAPI
  30.  
  31. //
  32. // For compilers that don't support nameless unions
  33. //
  34. #ifndef DUMMYUNIONNAME
  35. #ifdef NONAMELESSUNION
  36. #define DUMMYUNIONNAME   u
  37. #define DUMMYUNIONNAME2  u2
  38. #define DUMMYUNIONNAME3  u3
  39. #else
  40. #define DUMMYUNIONNAME
  41. #define DUMMYUNIONNAME2
  42. #define DUMMYUNIONNAME3
  43. #endif
  44. #endif // DUMMYUNIONNAME
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49.  
  50. #if (WINVER >= 0x0400)
  51.  
  52. #define MAXPROPPAGES            100
  53.  
  54. struct _PSP;
  55. typedef struct _PSP FAR* HPROPSHEETPAGE;
  56.  
  57. #ifndef UNICODE_ONLY
  58. typedef struct _PROPSHEETPAGEA FAR *LPPROPSHEETPAGEA;
  59. #endif //!UNICODE_ONLY
  60. #ifndef ANSI_ONLY
  61. typedef struct _PROPSHEETPAGEW FAR *LPPROPSHEETPAGEW;
  62. #endif //!ANSI_ONLY
  63.  
  64. #ifndef UNICODE_ONLY
  65. typedef UINT (CALLBACK FAR * LPFNPSPCALLBACKA)(HWND hwnd, UINT uMsg, LPPROPSHEETPAGEA ppsp);
  66. #endif //!UNICODE_ONLY
  67. #ifndef ANSI_ONLY
  68. typedef UINT (CALLBACK FAR * LPFNPSPCALLBACKW)(HWND hwnd, UINT uMsg, LPPROPSHEETPAGEW ppsp);
  69. #endif //!ANSI_ONLY
  70.  
  71. #ifdef UNICODE
  72. #define LPFNPSPCALLBACK         LPFNPSPCALLBACKW
  73. #else
  74. #define LPFNPSPCALLBACK         LPFNPSPCALLBACKA
  75. #endif
  76.  
  77. #define PSP_DEFAULT             0x0000
  78. #define PSP_DLGINDIRECT         0x0001
  79. #define PSP_USEHICON            0x0002
  80. #define PSP_USEICONID           0x0004
  81. #define PSP_USETITLE            0x0008
  82. #define PSP_RTLREADING          0x0010
  83.  
  84. #define PSP_HASHELP             0x0020
  85. #define PSP_USEREFPARENT        0x0040
  86. #define PSP_USECALLBACK         0x0080
  87.  
  88. #define PSPCB_RELEASE           1
  89. #define PSPCB_CREATE            2
  90.  
  91.  
  92. #ifndef UNICODE_ONLY
  93. typedef struct _PROPSHEETPAGEA {
  94.         DWORD           dwSize;
  95.         DWORD           dwFlags;
  96.         HINSTANCE       hInstance;
  97.         union {
  98.             LPCSTR          pszTemplate;
  99. #ifdef _WIN32
  100.             LPCDLGTEMPLATE  pResource;
  101. #else
  102.             const VOID FAR *pResource;
  103. #endif
  104.         } DUMMYUNIONNAME;
  105.         union {
  106.             HICON       hIcon;
  107.             LPCSTR      pszIcon;
  108.         } DUMMYUNIONNAME2;
  109.         LPCSTR          pszTitle;
  110.         DLGPROC         pfnDlgProc;
  111.         LPARAM          lParam;
  112.         LPFNPSPCALLBACKA pfnCallback;
  113.         UINT FAR * pcRefParent;
  114. #ifndef NeXT_PDO
  115. } PROPSHEETPAGEA, FAR *LPPROPSHEETPAGEA;
  116. #else
  117. } PROPSHEETPAGEA;
  118. #endif NeXT_PDO
  119. #endif //!UNICODE_ONLY
  120. #ifndef UNICODE_ONLY
  121. typedef const PROPSHEETPAGEA FAR *LPCPROPSHEETPAGEA;
  122. #endif //!UNICODE_ONLY
  123.  
  124. #ifndef ANSI_ONLY
  125. typedef struct _PROPSHEETPAGEW {
  126.         DWORD           dwSize;
  127.         DWORD           dwFlags;
  128.         HINSTANCE       hInstance;
  129.         union {
  130.             LPCWSTR          pszTemplate;
  131. #ifdef _WIN32
  132.             LPCDLGTEMPLATE  pResource;
  133. #else
  134.             const VOID FAR *pResource;
  135. #endif
  136.         }DUMMYUNIONNAME;
  137.         union {
  138.             HICON       hIcon;
  139.             LPCWSTR      pszIcon;
  140.         }DUMMYUNIONNAME2;
  141.         LPCWSTR          pszTitle;
  142.         DLGPROC         pfnDlgProc;
  143.         LPARAM          lParam;
  144.         LPFNPSPCALLBACKW pfnCallback;
  145.         UINT FAR * pcRefParent;
  146. #ifndef NeXT_PDO
  147. } PROPSHEETPAGEW, FAR *LPPROPSHEETPAGEW;
  148. #else
  149. } PROPSHEETPAGEW;
  150. #endif NeXT_PDO
  151. #endif //!ANSI_ONLY
  152. #ifndef ANSI_ONLY
  153. typedef const PROPSHEETPAGEW FAR *LPCPROPSHEETPAGEW;
  154. #endif //!ANSI_ONLY
  155.  
  156. #ifdef UNICODE
  157. #define PROPSHEETPAGE           PROPSHEETPAGEW
  158. #define LPPROPSHEETPAGE         LPPROPSHEETPAGEW
  159. #define LPCPROPSHEETPAGE        LPCPROPSHEETPAGEW
  160. #else
  161. #define PROPSHEETPAGE           PROPSHEETPAGEA
  162. #define LPPROPSHEETPAGE         LPPROPSHEETPAGEA
  163. #define LPCPROPSHEETPAGE        LPCPROPSHEETPAGEA
  164. #endif
  165.  
  166.  
  167. #define PSH_DEFAULT             0x0000
  168. #define PSH_PROPTITLE           0x0001
  169. #define PSH_USEHICON            0x0002
  170. #define PSH_USEICONID           0x0004
  171. #define PSH_PROPSHEETPAGE       0x0008
  172. #define PSH_WIZARD              0x0020
  173. #define PSH_USEPSTARTPAGE       0x0040
  174. #define PSH_NOAPPLYNOW          0x0080
  175. #define PSH_USECALLBACK         0x0100
  176. #define PSH_HASHELP             0x0200
  177. #define PSH_MODELESS            0x0400
  178. #define PSH_RTLREADING          0x0800
  179.  
  180. typedef int (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
  181.  
  182. #ifndef UNICODE_ONLY
  183. typedef struct _PROPSHEETHEADERA {
  184.         DWORD           dwSize;
  185.         DWORD           dwFlags;
  186.         HWND            hwndParent;
  187.         HINSTANCE       hInstance;
  188.         union {
  189.             HICON       hIcon;
  190.             LPCSTR      pszIcon;
  191.         }DUMMYUNIONNAME;
  192.         LPCSTR          pszCaption;
  193.  
  194.  
  195.         UINT            nPages;
  196.         union {
  197.             UINT        nStartPage;
  198.             LPCSTR      pStartPage;
  199.         }DUMMYUNIONNAME2;
  200.         union {
  201.             LPCPROPSHEETPAGEA ppsp;
  202.             HPROPSHEETPAGE FAR *phpage;
  203.         }DUMMYUNIONNAME3;
  204.         PFNPROPSHEETCALLBACK pfnCallback;
  205. } PROPSHEETHEADERA, FAR *LPPROPSHEETHEADERA;
  206. #endif //!UNICODE_ONLY
  207. #ifndef UNICODE_ONLY
  208. typedef const PROPSHEETHEADERA FAR *LPCPROPSHEETHEADERA;
  209. #endif //!UNICODE_ONLY
  210.  
  211. #ifndef ANSI_ONLY
  212. typedef struct _PROPSHEETHEADERW {
  213.         DWORD           dwSize;
  214.         DWORD           dwFlags;
  215.         HWND            hwndParent;
  216.         HINSTANCE       hInstance;
  217.         union {
  218.             HICON       hIcon;
  219.             LPCWSTR     pszIcon;
  220.         }DUMMYUNIONNAME;
  221.         LPCWSTR         pszCaption;
  222.  
  223.  
  224.         UINT            nPages;
  225.         union {
  226.             UINT        nStartPage;
  227.             LPCWSTR     pStartPage;
  228.         }DUMMYUNIONNAME2;
  229.         union {
  230.             LPCPROPSHEETPAGEW ppsp;
  231.             HPROPSHEETPAGE FAR *phpage;
  232.         }DUMMYUNIONNAME3;
  233.         PFNPROPSHEETCALLBACK pfnCallback;
  234. } PROPSHEETHEADERW, FAR *LPPROPSHEETHEADERW;
  235. #endif //!ANSI_ONLY
  236. #ifndef ANSI_ONLY
  237. typedef const PROPSHEETHEADERW FAR *LPCPROPSHEETHEADERW;
  238. #endif //!ANSI_ONLY
  239.  
  240. #ifdef UNICODE
  241. #define PROPSHEETHEADER         PROPSHEETHEADERW
  242. #define LPPROPSHEETHEADER       LPPROPSHEETHEADERW
  243. #define LPCPROPSHEETHEADER      LPCPROPSHEETHEADERW
  244. #else
  245. #define PROPSHEETHEADER         PROPSHEETHEADERA
  246. #define LPPROPSHEETHEADER       LPPROPSHEETHEADERA
  247. #define LPCPROPSHEETHEADER      LPCPROPSHEETHEADERA
  248. #endif
  249.  
  250.  
  251. #define PSCB_INITIALIZED  1
  252. #define PSCB_PRECREATE    2
  253.  
  254. #ifndef UNICODE_ONLY
  255. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
  256. #endif //!UNICODE_ONLY
  257. #ifndef ANSI_ONLY
  258. WINCOMMCTRLAPI HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
  259. #endif //!ANSI_ONLY
  260. WINCOMMCTRLAPI BOOL           WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE);
  261. #ifndef UNICODE_ONLY
  262. WINCOMMCTRLAPI int            WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
  263. #endif //!UNICODE_ONLY
  264. #ifndef ANSI_ONLY
  265. WINCOMMCTRLAPI int            WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
  266. #endif //!ANSI_ONLY
  267.  
  268. #ifdef UNICODE
  269. #define CreatePropertySheetPage  CreatePropertySheetPageW
  270. #define PropertySheet            PropertySheetW
  271. #else
  272. #define CreatePropertySheetPage  CreatePropertySheetPageA
  273. #define PropertySheet            PropertySheetA
  274. #endif
  275.  
  276.  
  277.  
  278. typedef BOOL (CALLBACK FAR * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
  279. typedef BOOL (CALLBACK FAR * LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
  280.  
  281.  
  282. typedef struct _PSHNOTIFY
  283. {
  284.     NMHDR hdr;
  285.     LPARAM lParam;
  286. } PSHNOTIFY, FAR *LPPSHNOTIFY;
  287.  
  288.  
  289. #define PSN_FIRST               (0U-200U)
  290. #define PSN_LAST                (0U-299U)
  291.  
  292.  
  293. #define PSN_SETACTIVE           (PSN_FIRST-0)
  294. #define PSN_KILLACTIVE          (PSN_FIRST-1)
  295. // #define PSN_VALIDATE            (PSN_FIRST-1)
  296. #define PSN_APPLY               (PSN_FIRST-2)
  297. #define PSN_RESET               (PSN_FIRST-3)
  298. // #define PSN_CANCEL              (PSN_FIRST-3)
  299. #define PSN_HELP                (PSN_FIRST-5)
  300. #define PSN_WIZBACK             (PSN_FIRST-6)
  301. #define PSN_WIZNEXT             (PSN_FIRST-7)
  302. #define PSN_WIZFINISH           (PSN_FIRST-8)
  303. #define PSN_QUERYCANCEL         (PSN_FIRST-9)
  304.  
  305.  
  306. #define PSNRET_NOERROR              0
  307. #define PSNRET_INVALID              1
  308. #define PSNRET_INVALID_NOCHANGEPAGE 2
  309.  
  310.  
  311. #define PSM_SETCURSEL           (WM_USER + 101)
  312. #define PropSheet_SetCurSel(hDlg, hpage, index) \
  313.         SendMessage(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
  314.  
  315.  
  316. #define PSM_REMOVEPAGE          (WM_USER + 102)
  317. #define PropSheet_RemovePage(hDlg, index, hpage) \
  318.         SendMessage(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
  319.  
  320.  
  321. #define PSM_ADDPAGE             (WM_USER + 103)
  322. #define PropSheet_AddPage(hDlg, hpage) \
  323.         SendMessage(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
  324.  
  325.  
  326. #define PSM_CHANGED             (WM_USER + 104)
  327. #define PropSheet_Changed(hDlg, hwnd) \
  328.         SendMessage(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
  329.  
  330.  
  331. #define PSM_RESTARTWINDOWS      (WM_USER + 105)
  332. #define PropSheet_RestartWindows(hDlg) \
  333.         SendMessage(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
  334.  
  335.  
  336. #define PSM_REBOOTSYSTEM        (WM_USER + 106)
  337. #define PropSheet_RebootSystem(hDlg) \
  338.         SendMessage(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
  339.  
  340.  
  341. #define PSM_CANCELTOCLOSE       (WM_USER + 107)
  342. #define PropSheet_CancelToClose(hDlg) \
  343.         SendMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
  344.  
  345.  
  346. #define PSM_QUERYSIBLINGS       (WM_USER + 108)
  347. #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
  348.         SendMessage(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
  349.  
  350.  
  351. #define PSM_UNCHANGED           (WM_USER + 109)
  352. #define PropSheet_UnChanged(hDlg, hwnd) \
  353.         SendMessage(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
  354.  
  355.  
  356. #define PSM_APPLY               (WM_USER + 110)
  357. #define PropSheet_Apply(hDlg) \
  358.         SendMessage(hDlg, PSM_APPLY, 0, 0L)
  359.  
  360.  
  361. #define PSM_SETTITLEA           (WM_USER + 111)
  362. #define PSM_SETTITLEW           (WM_USER + 120)
  363.  
  364. #ifdef UNICODE
  365. #define PSM_SETTITLE            PSM_SETTITLEW
  366. #else
  367. #define PSM_SETTITLE            PSM_SETTITLEA
  368. #endif
  369.  
  370. #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
  371.         SendMessage(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
  372.  
  373.  
  374. #define PSM_SETWIZBUTTONS       (WM_USER + 112)
  375. #define PropSheet_SetWizButtons(hDlg, dwFlags) \
  376.         PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
  377.  
  378.  
  379.  
  380. #define PSWIZB_BACK             0x00000001
  381. #define PSWIZB_NEXT             0x00000002
  382. #define PSWIZB_FINISH           0x00000004
  383. #define PSWIZB_DISABLEDFINISH   0x00000008
  384.  
  385.  
  386. #define PSM_PRESSBUTTON         (WM_USER + 113)
  387. #define PropSheet_PressButton(hDlg, iButton) \
  388.         SendMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
  389.  
  390.  
  391. #define PSBTN_BACK              0
  392. #define PSBTN_NEXT              1
  393. #define PSBTN_FINISH            2
  394. #define PSBTN_OK                3
  395. #define PSBTN_APPLYNOW          4
  396. #define PSBTN_CANCEL            5
  397. #define PSBTN_HELP              6
  398. #define PSBTN_MAX               6
  399.  
  400.  
  401.  
  402. #define PSM_SETCURSELID         (WM_USER + 114)
  403. #define PropSheet_SetCurSelByID(hDlg, id) \
  404.         SendMessage(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
  405.  
  406.  
  407. #define PSM_SETFINISHTEXTA      (WM_USER + 115)
  408. #define PSM_SETFINISHTEXTW      (WM_USER + 121)
  409.  
  410. #ifdef UNICODE
  411. #define PSM_SETFINISHTEXT       PSM_SETFINISHTEXTW
  412. #else
  413. #define PSM_SETFINISHTEXT       PSM_SETFINISHTEXTA
  414. #endif
  415.  
  416. #define PropSheet_SetFinishText(hDlg, lpszText) \
  417.         SendMessage(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
  418.  
  419.  
  420. #define PSM_GETTABCONTROL       (WM_USER + 116)
  421. #define PropSheet_GetTabControl(hDlg) \
  422.         (HWND)SendMessage(hDlg, PSM_GETTABCONTROL, 0, 0)
  423.  
  424. #define PSM_ISDIALOGMESSAGE     (WM_USER + 117)
  425. #define PropSheet_IsDialogMessage(hDlg, pMsg) \
  426.         (BOOL)SendMessage(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
  427.  
  428. #define PSM_GETCURRENTPAGEHWND  (WM_USER + 118)
  429. #define PropSheet_GetCurrentPageHwnd(hDlg) \
  430.         (HWND)SendMessage(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
  431.  
  432. #define ID_PSRESTARTWINDOWS     0x2
  433. #define ID_PSREBOOTSYSTEM       (ID_PSRESTARTWINDOWS | 0x1)
  434.  
  435.  
  436. #define WIZ_CXDLG               276
  437. #define WIZ_CYDLG               140
  438.  
  439. #define WIZ_CXBMP               80
  440.  
  441. #define WIZ_BODYX               92
  442. #define WIZ_BODYCX              184
  443.  
  444. #define PROP_SM_CXDLG           212
  445. #define PROP_SM_CYDLG           188
  446.  
  447. #define PROP_MED_CXDLG          227
  448. #define PROP_MED_CYDLG          215
  449.  
  450. #define PROP_LG_CXDLG           252
  451. #define PROP_LG_CYDLG           218
  452.  
  453. #endif // (WINVER >= 0x0400)
  454.  
  455. #ifdef __cplusplus
  456. }
  457. #endif
  458.  
  459. #endif
  460.  
  461. #if defined(__TOPLEVEL_PRSHT_H_)
  462. #undef __TOPLEVEL_NEXT_COMMON_INCLUDE__
  463. #undef __TOPLEVEL_PRSHT_H_
  464. #include <next_common_undefines.h>
  465. #endif /* __TOPLEVEL_PRSHT_H_ */
  466.