home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / prsht.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  12.5 KB  |  430 lines

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