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

  1. /*
  2.  
  3. Copyright (c) 1985-1993, Microsoft Corporation
  4.  
  5. Module Name: winuser.h
  6.  
  7. --*/
  8.  
  9. #ifndef _WINUSER_
  10. #define _WINUSER_
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. #include <windef.h>
  17. #include <mmsystem.h>
  18.  
  19.  
  20.  
  21. typedef struct tagMSG {
  22.     HWND        hwnd;
  23.     UINT        message;
  24.     WPARAM      wParam;
  25.     LPARAM      lParam;
  26.     DWORD       time;
  27.     POINT       pt;
  28. } MSG, *PMSG, *NPMSG, *LPMSG;
  29.  
  30. #ifndef NORESOURCE
  31.  
  32. #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
  33. #define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
  34. #ifdef UNICODE
  35. #define MAKEINTRESOURCE  MAKEINTRESOURCEW
  36. #else
  37. #define MAKEINTRESOURCE  MAKEINTRESOURCEA
  38. #endif // !UNICODE
  39.  
  40. /*
  41.  * Predefined Resource Types
  42.  */
  43. #define RT_CURSOR           MAKEINTRESOURCE(1)
  44. #define RT_BITMAP           MAKEINTRESOURCE(2)
  45. #define RT_ICON             MAKEINTRESOURCE(3)
  46. #define RT_MENU             MAKEINTRESOURCE(4)
  47. #define RT_DIALOG           MAKEINTRESOURCE(5)
  48. #define RT_STRING           MAKEINTRESOURCE(6)
  49. #define RT_FONTDIR          MAKEINTRESOURCE(7)
  50. #define RT_FONT             MAKEINTRESOURCE(8)
  51. #define RT_ACCELERATOR      MAKEINTRESOURCE(9)
  52. #define RT_RCDATA           MAKEINTRESOURCE(10)
  53. #define RT_MESSAGETABLE     MAKEINTRESOURCE(11)
  54.  
  55. #define DIFFERENCE          11
  56. #define RT_GROUP_CURSOR     MAKEINTRESOURCE((DWORD)RT_CURSOR + DIFFERENCE)
  57. #define RT_GROUP_ICON       MAKEINTRESOURCE((DWORD)RT_ICON + DIFFERENCE)
  58. #define RT_VERSION          MAKEINTRESOURCE(16)
  59. #define RT_DLGINCLUDE       MAKEINTRESOURCE(17)
  60.  
  61. #endif /* !NORESOURCE */
  62.  
  63. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  64. // @CESYSGEN IF GWES_DLGMGR
  65. typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  66. // @CESYSGEN ENDIF
  67. // @CESYSGEN IF GWES_TIMER
  68. typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD);
  69. // @CESYSGEN ENDIF
  70.  
  71. /* WNDCLASS */
  72. typedef struct tagWNDCLASSA {
  73.     UINT        style;
  74.     WNDPROC     lpfnWndProc;
  75.     int         cbClsExtra;
  76.     int         cbWndExtra;
  77.     HINSTANCE   hInstance;
  78.     HICON       hIcon;
  79.     HCURSOR     hCursor;
  80.     HBRUSH      hbrBackground;
  81.     LPCSTR      lpszMenuName;
  82.     LPCSTR      lpszClassName;
  83. } WNDCLASSA, *PWNDCLASSA, *PWNDCLASSA, *LPWNDCLASSA;
  84.  
  85. typedef struct tagWNDCLASSW {
  86.     UINT        style;
  87.     WNDPROC     lpfnWndProc;
  88.     int         cbClsExtra;
  89.     int         cbWndExtra;
  90.     HINSTANCE   hInstance;
  91.     HICON       hIcon;
  92.     HCURSOR     hCursor;
  93.     HBRUSH      hbrBackground;
  94.     LPCWSTR     lpszMenuName;
  95.     LPCWSTR     lpszClassName;
  96. } WNDCLASSW, *PWNDCLASSW, *PWNDCLASSW, *LPWNDCLASSW;
  97.  
  98. #ifdef UNICODE
  99. typedef WNDCLASSW WNDCLASS;
  100. typedef PWNDCLASSW PWNDCLASS;
  101. typedef LPWNDCLASSW LPWNDCLASS;
  102. typedef PWNDCLASSW PWNDCLASS;
  103. #else
  104. typedef WNDCLASSA WNDCLASS;
  105. typedef PWNDCLASSA PWNDCLASS;
  106. typedef LPWNDCLASSA LPWNDCLASS;
  107. typedef PWNDCLASSA PWNDCLASS;
  108. #endif // UNICODE
  109.  
  110.  
  111. // @CESYSGEN IF GWES_WINMGR
  112.  
  113. #define HSHELL_WINDOWCREATED        1
  114. #define HSHELL_WINDOWDESTROYED      2
  115. #define HSHELL_WINDOWACTIVATED      4
  116. #define HSHELL_REDRAW               6
  117. #define HSHELL_TASKMAN              7
  118. #define HSHELL_CAPSLOCK                8
  119.  
  120. // @CESYSGEN ENDIF
  121.  
  122.  
  123. #define POINTSTOPOINT(pt, pts)                          \
  124.         { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts);   \
  125.           (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
  126.  
  127. #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
  128.  
  129. // @CESYSGEN IF GWES_WINMGR
  130. #define MAKEWPARAM(l, h)      (WPARAM)MAKELONG(l, h)
  131. #define MAKELPARAM(l, h)      (LPARAM)MAKELONG(l, h)
  132. #define MAKELRESULT(l, h)     (LRESULT)MAKELONG(l, h)
  133.  
  134.  
  135. /*
  136.  * Window Messages
  137.  */
  138.  
  139. #define WM_MOVE                         0x0003
  140. #define WM_SIZE                         0x0005
  141.  
  142. // @CESYSGEN ENDIF
  143.  
  144. // @CESYSGEN IF GWES_WMBASE
  145. // @CESYSGEN IF GWES_FOREGND
  146. #define WM_ACTIVATE                     0x0006
  147. /*
  148.  * WM_ACTIVATE state values
  149.  */
  150. #define     WA_INACTIVE     0
  151. #define     WA_ACTIVE       1
  152. #define     WA_CLICKACTIVE  2
  153.  
  154. #define WM_SETFOCUS                     0x0007
  155. #define WM_KILLFOCUS                    0x0008
  156. // @CESYSGEN ENDIF
  157. // @CESYSGEN ENDIF
  158.  
  159. // @CESYSGEN IF GWES_WINMGR
  160.  
  161. #define WM_SETREDRAW                    0x000B
  162. #define WM_SETTEXT                      0x000C
  163. #define WM_GETTEXT                      0x000D
  164. #define WM_GETTEXTLENGTH                0x000E
  165. #define WM_PAINT                        0x000F
  166.  
  167. // @CESYSGEN ENDIF
  168.  
  169. // @CESYSGEN IF GWES_WINMGR
  170. #define WM_ERASEBKGND                   0x0014
  171. #define WM_SYSCOLORCHANGE               0x0015
  172. #define WM_SHOWWINDOW                   0x0018
  173. #define WM_WININICHANGE                 0x001A
  174. #if(WINVER >= 0x0400)
  175. #define WM_SETTINGCHANGE                WM_WININICHANGE
  176. #endif /* WINVER >= 0x0400 */
  177.  
  178. #define WM_FONTCHANGE                   0x001D
  179. #define WM_CANCELMODE                   0x001F
  180. // @CESYSGEN ENDIF
  181.  
  182. // @CESYSGEN IF GWES_MCURSOR
  183. #define WM_SETCURSOR                    0x0020
  184. // @CESYSGEN ENDIF
  185.  
  186. // @CESYSGEN IF GWES_DLGMGR
  187. #define WM_NEXTDLGCTL                   0x0028
  188. // @CESYSGEN ENDIF
  189.  
  190. // @CESYSGEN IF GWES_WINMGR
  191. #define WM_DRAWITEM                     0x002B
  192. #define WM_MEASUREITEM                  0x002C
  193. #define WM_DELETEITEM                   0x002D
  194. #define WM_SETFONT                      0x0030
  195. #define WM_GETFONT                      0x0031
  196. #define WM_COMPAREITEM                  0x0039
  197.  
  198. #define WM_WINDOWPOSCHANGED             0x0047
  199.  
  200. // @CESYSGEN ENDIF
  201.  
  202. // @CESYSGEN IF GWES_WINMGR
  203.  
  204.  
  205. #define WM_NOTIFY                       0x004E
  206. #define WM_HELP                         0x0053
  207.  
  208. #define WM_STYLECHANGED                 0x007D
  209. // @CESYSGEN ENDIF
  210. // @CESYSGEN IF GWES_ICON || GWES_ICONCURS
  211. #define WM_GETICON                      0x007F
  212. #define WM_SETICON                      0x0080
  213. // @CESYSGEN ENDIF
  214. // @CESYSGEN IF GWES_DLGMGR
  215. #define WM_GETDLGCODE                   0x0087
  216. // @CESYSGEN ENDIF
  217.  
  218. // @CESYSGEN IF GWES_KBDUI
  219. #define WM_KEYFIRST                     0x0100
  220. #define WM_KEYDOWN                      0x0100
  221. #define WM_KEYUP                        0x0101
  222. #define WM_CHAR                         0x0102
  223. #define WM_DEADCHAR                     0x0103
  224. #define WM_SYSKEYDOWN                   0x0104
  225. #define WM_SYSKEYUP                     0x0105
  226. #define WM_SYSCHAR                      0x0106
  227. #define WM_SYSDEADCHAR                  0x0107
  228. #define WM_KEYLAST                      0x0108
  229.  
  230. #define WM_HOTKEY                       0x0312
  231.  
  232. // @CESYSGEN ENDIF
  233.  
  234. // @CESYSGEN IF GWES_DLGMGR
  235. #define WM_INITDIALOG                   0x0110
  236. // @CESYSGEN ENDIF
  237.  
  238. // @CESYSGEN IF GWES_WINMGR
  239. #define WM_COMMAND                      0x0111
  240. #define WM_SYSCOMMAND                   0x0112
  241. // @CESYSGEN ENDIF
  242. // @CESYSGEN IF GWES_TIMER
  243. #define WM_TIMER                           0x0113
  244. // @CESYSGEN ENDIF
  245. // @CESYSGEN IF GWES_WINMGR
  246. #define WM_HSCROLL                      0x0114
  247. #define WM_VSCROLL                      0x0115
  248. // @CESYSGEN ENDIF
  249. // @CESYSGEN IF GWES_MENU
  250. #define WM_INITMENUPOPUP                0x0117
  251. #define WM_MENUCHAR                     0x0120
  252. // @CESYSGEN ENDIF
  253.  
  254. #define WM_MOUSEFIRST                   0x0200
  255. #define WM_MOUSEMOVE                    0x0200
  256. #define WM_LBUTTONDOWN                  0x0201
  257. #define WM_LBUTTONUP                    0x0202
  258. #define WM_LBUTTONDBLCLK                0x0203
  259. #define WM_RBUTTONDOWN                  0x0204
  260. #define WM_RBUTTONUP                    0x0205
  261. #define WM_RBUTTONDBLCLK                0x0206
  262. #define WM_MBUTTONDOWN                  0x0207
  263. #define WM_MBUTTONUP                    0x0208
  264. #define WM_MBUTTONDBLCLK                0x0209
  265. #define WM_MOUSELAST                    0x0209
  266.  
  267. // @CESYSGEN IF GWES_MCURSOR
  268. #define WM_MOUSEWHEEL                   0x020A
  269. #undef WM_MOUSELAST
  270. #define WM_MOUSELAST                    0x020A
  271. // @CESYSGEN ENDIF
  272.  
  273. // @CESYSGEN IF GWES_MENU
  274. #define MENULOOP_WINDOW                 0
  275. #define MENULOOP_POPUP                  1
  276. #define WM_ENTERMENULOOP                0x0211
  277. #define WM_EXITMENULOOP                 0x0212
  278. // @CESYSGEN ENDIF
  279. #define WM_CAPTURECHANGED               0x0215
  280.  
  281. // @CESYSGEN IF GWES_CLIPBD
  282. #define WM_CUT                          0x0300
  283. #define WM_COPY                         0x0301
  284. #define WM_PASTE                        0x0302
  285. #define WM_CLEAR                        0x0303
  286. #define WM_UNDO                         0x0304
  287. #define WM_RENDERFORMAT                 0x0305
  288. #define WM_RENDERALLFORMATS             0x0306
  289. #define WM_DESTROYCLIPBOARD             0x0307
  290. // @CESYSGEN ENDIF
  291.  
  292. // @CESYSGEN IF GWES_PGDI || GWES_MGPAL
  293. #define WM_QUERYNEWPALETTE              0x030F
  294. #define WM_PALETTECHANGED               0x0311
  295. // @CESYSGEN ENDIF
  296.  
  297. // @CESYSGEN IF GWES_MSGBOX
  298. #define WM_CTLCOLORMSGBOX               0x0132
  299. // @CESYSGEN ENDIF
  300. // @CESYSGEN IF GWES_EDCTL
  301. #define WM_CTLCOLOREDIT                 0x0133
  302. // @CESYSGEN ENDIF
  303. // @CESYSGEN IF GWES_LBCTL
  304. #define WM_CTLCOLORLISTBOX              0x0134
  305. // @CESYSGEN ENDIF
  306. // @CESYSGEN IF GWES_BTNCTL
  307. #define WM_CTLCOLORBTN                  0x0135
  308. // @CESYSGEN ENDIF
  309. // @CESYSGEN IF GWES_DLGMGR
  310. #define WM_CTLCOLORDLG                  0x0136
  311. // @CESYSGEN ENDIF
  312. // @CESYSGEN IF GWES_SCBCTL
  313. #define WM_CTLCOLORSCROLLBAR            0x0137
  314. // @CESYSGEN ENDIF
  315. // @CESYSGEN IF GWES_STCCTL
  316. #define WM_CTLCOLORSTATIC               0x0138
  317. // @CESYSGEN ENDIF
  318. #define WM_VKEYTOITEM                   0x002E
  319. #define WM_CHARTOITEM                   0x002F
  320. #define WM_QUERYDRAGICON                0x0037
  321.  
  322. // New for WINCE
  323. #define WM_NETCONNECT                   0x03FE
  324. #define WM_HIBERNATE                    0x03FF
  325.  
  326. #define WM_APP                          0x8000
  327.  
  328. /*
  329.  * NOTE: All Message Numbers below 0x0400 are RESERVED.
  330.  *
  331.  * Private Window Messages Start Here:
  332.  */
  333. #define WM_USER                         0x0400
  334.  
  335.  
  336. // @CESYSGEN IF GWES_WINMGR
  337. /*
  338.  * WM_SIZE message wParam values
  339.  */
  340. #define SIZE_RESTORED       0
  341. #define SIZE_MINIMIZED      1
  342. #define SIZE_MAXIMIZED      2
  343. #define SIZE_MAXSHOW        3
  344. #define SIZE_MAXHIDE        4
  345.  
  346. /*
  347.  * Window Styles
  348.  */
  349. #ifdef UNDER_NT
  350. #ifndef WS_THICKFRAME
  351. #define WS_THICKFRAME       0x00040000L
  352. #endif // WS_THICKFRAME
  353. #define WS_OVERLAPPED       0x00000000L
  354. #else
  355. // @CESYSGEN IF GWES_NCLIENT
  356. #define WS_OVERLAPPED       WS_BORDER | WS_CAPTION
  357. // @CESYSGEN ENDIF
  358. #endif // UNDER_NT
  359. #define WS_CLIPSIBLINGS     0x04000000L
  360. #define WS_CLIPCHILDREN     0x02000000L
  361. // @CESYSGEN IF GWES_NCLIENT
  362. #define WS_CAPTION          0x00C00000L     /* WS_BORDER | WS_DLGFRAME  */
  363. #define WS_BORDER           0x00800000L
  364. #define WS_DLGFRAME         0x00400000L
  365. #define WS_VSCROLL          0x00200000L
  366. #define WS_HSCROLL          0x00100000L
  367. #define WS_SYSMENU          0x00080000L
  368. // @CESYSGEN ENDIF
  369. #define WS_POPUP            0x80000000L
  370.  
  371.  
  372. /*
  373.  * Class styles
  374.  */
  375. #define CS_DBLCLKS          0x0008
  376. #define CS_GLOBALCLASS      0x4000
  377.  
  378. /*
  379.  * Extended Window Styles
  380.  */
  381. // @CESYSGEN IF GWES_NCLIENT
  382. #define WS_EX_DLGMODALFRAME     0x00000001L
  383. // @CESYSGEN ENDIF
  384. #define WS_EX_TOPMOST           0x00000008L
  385. #if(WINVER >= 0x0400)
  386. // @CESYSGEN IF GWES_NCLIENT
  387. #define WS_EX_WINDOWEDGE        0x00000100L
  388. #define WS_EX_CLIENTEDGE        0x00000200L
  389.  
  390. #define WS_EX_CONTEXTHELP        0x00000400L
  391. #define WS_EX_STATICEDGE        0x00020000L
  392. // @CESYSGEN ENDIF
  393.  
  394. // @CESYSGEN IF GWES_NCLIENT
  395. #define WS_EX_OVERLAPPEDWINDOW  (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
  396.  
  397. #define WS_EX_CAPTIONOKBTN      0x80000000L
  398. #define WS_EX_NODRAG            0x40000000L
  399. // @CESYSGEN ENDIF
  400. #define WS_EX_ABOVESTARTUP        0x20000000L
  401. #define WS_EX_INK                0x10000000L
  402. #define WS_EX_NOANIMATION        0x04000000L
  403.  
  404. #endif /* WINVER >= 0x0400 */
  405.  
  406.  
  407. /*
  408.  * Class styles
  409.  */
  410. #define CS_VREDRAW          0x0001
  411. #define CS_HREDRAW          0x0002
  412. #define CS_DBLCLKS          0x0008
  413. #define CS_PARENTDC         0x0080
  414. #define CS_NOCLOSE          0x0200
  415. #define CS_GLOBALCLASS      0x4000
  416. // @CESYSGEN ENDIF GWES_WINMGR
  417.  
  418.  
  419. // @CESYSGEN IF GWES_NCLIENT
  420. /* flags for DrawFrameControl */
  421.  
  422. #define DFC_CAPTION             1
  423. #define DFC_SCROLL              3
  424. #define DFC_BUTTON              4
  425.  
  426. #define DFCS_CAPTIONCLOSE       0x0000
  427. #define DFCS_CAPTIONHELP        0x0004
  428. #define DFCS_CAPTIONOKBTN       0x0080
  429.  
  430. #define DFCS_SCROLLUP           0x0000
  431. #define DFCS_SCROLLDOWN         0x0001
  432. #define DFCS_SCROLLLEFT         0x0002
  433. #define DFCS_SCROLLRIGHT        0x0003
  434. #define DFCS_SCROLLCOMBOBOX     0x0005
  435.  
  436. #define DFCS_BUTTONCHECK        0x0000
  437. #define DFCS_BUTTONRADIO        0x0004
  438. #define DFCS_BUTTON3STATE       0x0008
  439. #define DFCS_BUTTONPUSH         0x0010
  440.  
  441. #define DFCS_INACTIVE           0x0100
  442. #define DFCS_PUSHED             0x0200
  443. #define DFCS_CHECKED            0x0400
  444.  
  445. WINUSERAPI BOOL    WINAPI DrawFrameControl(HDC, LPRECT, UINT, UINT);
  446. // @CESYSGEN ENDIF GWES_NCLIENT
  447.  
  448.  
  449.  
  450. // @CESYSGEN IF GWES_CLIPBD
  451. /*
  452.  * Predefined Clipboard Formats
  453.  */
  454. #define CF_TEXT             1
  455. #define CF_BITMAP           2
  456. #define CF_SYLK             4
  457. #define CF_DIF              5
  458. #define CF_TIFF             6
  459. #define CF_OEMTEXT          7
  460. #define CF_DIB              8
  461. #define CF_PALETTE          9
  462. #define CF_PENDATA          10
  463. #define CF_RIFF             11
  464. #define CF_WAVE             12
  465. #define CF_UNICODETEXT      13
  466. // @CESYSGEN ENDIF
  467. /*
  468.     WM_WININICHANGE section paramater
  469. */
  470. #define INI_INTL            1            // Regional Setting changed
  471.  
  472.  
  473. /*
  474.  * WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  475.  */
  476. #define HTERROR             (-2)
  477. #define HTTRANSPARENT       (-1)
  478. #define HTNOWHERE           0
  479. #define HTCLIENT            1
  480. #define HTCAPTION           2
  481. #define HTSYSMENU           3
  482. #define HTGROWBOX           4
  483. #define HTSIZE              HTGROWBOX
  484. #define HTMENU              5
  485. #define HTHSCROLL           6
  486. #define HTVSCROLL           7
  487. #define HTMINBUTTON         8
  488. #define HTMAXBUTTON         9
  489. #define HTLEFT              10
  490. #define HTRIGHT             11
  491. #define HTTOP               12
  492. #define HTTOPLEFT           13
  493. #define HTTOPRIGHT          14
  494. #define HTBOTTOM            15
  495. #define HTBOTTOMLEFT        16
  496. #define HTBOTTOMRIGHT       17
  497. #define HTBORDER            18
  498. #define HTREDUCE            HTMINBUTTON
  499. #define HTZOOM              HTMAXBUTTON
  500. #define HTSIZEFIRST         HTLEFT
  501. #define HTSIZELAST          HTBOTTOMRIGHT
  502. #if(WINVER >= 0x0400)
  503. #define HTOBJECT            19
  504. #define HTCLOSE             20
  505. #define HTHELP              21
  506. #endif /* WINVER >= 0x0400 */
  507.  
  508. WINUSERAPI
  509. UINT
  510. WINAPI
  511. RegisterWindowMessageW(
  512.     LPCWSTR lpString);
  513. #define RegisterWindowMessage  RegisterWindowMessageW
  514.  
  515.  
  516. typedef struct tagCREATESTRUCTA {
  517.     LPVOID      lpCreateParams;
  518.     HINSTANCE   hInstance;
  519.     HMENU       hMenu;
  520.     HWND        hwndParent;
  521.     int         cy;
  522.     int         cx;
  523.     int         y;
  524.     int         x;
  525.     LONG        style;
  526.     LPCSTR      lpszName;
  527.     LPCSTR      lpszClass;
  528.     DWORD       dwExStyle;
  529. } CREATESTRUCTA, *PCREATESTRUCTA, *LPCREATESTRUCTA;
  530.  
  531. typedef struct tagCREATESTRUCTW {
  532.     LPVOID      lpCreateParams;
  533.     HINSTANCE   hInstance;
  534.     HMENU       hMenu;
  535.     HWND        hwndParent;
  536.     int         cy;
  537.     int         cx;
  538.     int         y;
  539.     int         x;
  540.     LONG        style;
  541.     LPCWSTR     lpszName;
  542.     LPCWSTR     lpszClass;
  543.     DWORD       dwExStyle;
  544. } CREATESTRUCTW, *PCREATESTRUCTW, *LPCREATESTRUCTW;
  545.  
  546. #ifdef UNICODE
  547. typedef CREATESTRUCTW CREATESTRUCT;
  548. typedef LPCREATESTRUCTW LPCREATESTRUCT;
  549. typedef PCREATESTRUCTW LPCREATESTRUCT;
  550. #else
  551. typedef CREATESTRUCTA CREATESTRUCT;
  552. typedef LPCREATESTRUCTA LPCREATESTRUCT;
  553. typedef PCREATESTRUCTA LPCREATESTRUCT;
  554. #endif // UNICODE
  555.  
  556. // @CESYSGEN IF GWES_WINMGR
  557.  
  558. typedef struct tagSTYLESTRUCT
  559. {
  560.     DWORD   styleOld;
  561.     DWORD   styleNew;
  562. } STYLESTRUCT, * LPSTYLESTRUCT;
  563.  
  564.  
  565. /*
  566.  * WM_WINDOWPOSCHANGED struct pointed to by lParam
  567.  */
  568. typedef struct tagWINDOWPOS {
  569.     HWND    hwnd;
  570.     HWND    hwndInsertAfter;
  571.     int     x;
  572.     int     y;
  573.     int     cx;
  574.     int     cy;
  575.     UINT    flags;
  576. } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
  577. // @CESYSGEN ENDIF
  578.  
  579.  
  580.  
  581. #if(WINVER >= 0x0400)
  582. #define EW_RESTARTWINDOWS    0x0042L
  583. #define EW_REBOOTSYSTEM      0x0043L
  584. #define EW_EXITANDEXECAPP    0x0044L
  585. #endif /* WINVER >= 0x0400 */
  586.  
  587. #define EWX_LOGOFF   0
  588. #define EWX_SHUTDOWN 1
  589. #define EWX_REBOOT   2
  590. #define EWX_FORCE    4
  591. #define EWX_POWEROFF 8
  592.  
  593.  
  594. /* MESSAGES */
  595.  
  596. // @CESYSGEN IF GWES_MSGQUE
  597. /*
  598.  * Special HWND value for use with PostMessage() and SendMessage()
  599.  */
  600. #define HWND_BROADCAST  ((HWND)0xffff)
  601.  
  602. WINUSERAPI
  603. BOOL
  604. WINAPI
  605. PostMessageA(
  606.     HWND hWnd,
  607.     UINT Msg,
  608.     WPARAM wParam,
  609.     LPARAM lParam);
  610. WINUSERAPI
  611. BOOL
  612. WINAPI
  613. PostMessageW(
  614.     HWND hWnd,
  615.     UINT Msg,
  616.     WPARAM wParam,
  617.     LPARAM lParam);
  618. #ifdef UNICODE
  619. #define PostMessage  PostMessageW
  620. #else
  621. #define PostMessage  PostMessageA
  622. #endif // !UNICODE
  623.  
  624.  
  625.  
  626. WINUSERAPI
  627. BOOL
  628. WINAPI
  629. PostThreadMessageA(
  630.     DWORD idThread,
  631.     UINT Msg,
  632.     WPARAM wParam,
  633.     LPARAM lParam);
  634. WINUSERAPI
  635. BOOL
  636. WINAPI
  637. PostThreadMessageW(
  638.     DWORD idThread,
  639.     UINT Msg,
  640.     WPARAM wParam,
  641.     LPARAM lParam);
  642. #ifdef UNICODE
  643. #define PostThreadMessage  PostThreadMessageW
  644. #else
  645. #define PostThreadMessage  PostThreadMessageA
  646. #endif // !UNICODE
  647.  
  648. VOID
  649. WINAPI
  650. PostQuitMessage(
  651.     int     nExitCode
  652.     );
  653.  
  654.  
  655. WINUSERAPI
  656. LRESULT
  657. WINAPI
  658. SendMessageA(
  659.     HWND hWnd,
  660.     UINT Msg,
  661.     WPARAM wParam,
  662.     LPARAM lParam);
  663. WINUSERAPI
  664. LRESULT
  665. WINAPI
  666. SendMessageW(
  667.     HWND hWnd,
  668.     UINT Msg,
  669.     WPARAM wParam,
  670.     LPARAM lParam);
  671. #ifdef UNICODE
  672. #define SendMessage  SendMessageW
  673. #else
  674. #define SendMessage  SendMessageA
  675. #endif // !UNICODE
  676.  
  677.  
  678. WINUSERAPI
  679. BOOL
  680. WINAPI
  681. SendNotifyMessageA(
  682.     HWND hWnd,
  683.     UINT Msg,
  684.     WPARAM wParam,
  685.     LPARAM lParam);
  686. WINUSERAPI
  687. BOOL
  688. WINAPI
  689. SendNotifyMessageW(
  690.     HWND hWnd,
  691.     UINT Msg,
  692.     WPARAM wParam,
  693.     LPARAM lParam);
  694. #ifdef UNICODE
  695. #define SendNotifyMessage  SendNotifyMessageW
  696. #else
  697. #define SendNotifyMessage  SendNotifyMessageA
  698. #endif // !UNICODE
  699.  
  700.  
  701.  
  702. WINUSERAPI
  703. BOOL
  704. WINAPI
  705. GetMessageA(
  706.     LPMSG lpMsg,
  707.     HWND hWnd ,
  708.     UINT wMsgFilterMin,
  709.     UINT wMsgFilterMax);
  710. WINUSERAPI
  711. BOOL
  712. WINAPI
  713. GetMessageW(
  714.     LPMSG lpMsg,
  715.     HWND hWnd ,
  716.     UINT wMsgFilterMin,
  717.     UINT wMsgFilterMax);
  718. #ifdef UNICODE
  719. #define GetMessage  GetMessageW
  720. #else
  721. #define GetMessage  GetMessageA
  722. #endif // !UNICODE
  723.  
  724.  
  725.  
  726. WINUSERAPI
  727. BOOL
  728. WINAPI
  729. PeekMessageW(
  730.     PMSG pMsg,
  731.     HWND hWnd ,
  732.     UINT wMsgFilterMin,
  733.     UINT wMsgFilterMax,
  734.     UINT wRemoveMsg);
  735. WINUSERAPI
  736. BOOL
  737. WINAPI
  738. PeekMessageA(
  739.     PMSG pMsg,
  740.     HWND hWnd ,
  741.     UINT wMsgFilterMin,
  742.     UINT wMsgFilterMax,
  743.     UINT wRemoveMsg);
  744. #ifdef UNICODE
  745. #define PeekMessage  PeekMessageW
  746. #else
  747. #define PeekMessage  PeekMessageA
  748. #endif // !UNICODE
  749.  
  750. /*
  751.  * PeekMessage() Options
  752.  */
  753. #define PM_NOREMOVE         0x0000
  754. #define PM_REMOVE           0x0001
  755. #define PM_NOYIELD          0x0002
  756.  
  757.  
  758.  
  759. BOOL
  760. WINAPI
  761. TranslateMessage(
  762.     CONST MSG   *pMsg
  763.     );
  764.  
  765.  
  766. WINUSERAPI
  767. LONG
  768. WINAPI
  769. DispatchMessageA(
  770.     CONST MSG *lpMsg);
  771. WINUSERAPI
  772. LONG
  773. WINAPI
  774. DispatchMessageW(
  775.     CONST MSG *lpMsg);
  776. #ifdef UNICODE
  777. #define DispatchMessage  DispatchMessageW
  778. #else
  779. #define DispatchMessage  DispatchMessageA
  780. #endif // !UNICODE
  781.  
  782. DWORD
  783. WINAPI
  784. GetMessagePos(
  785.     VOID
  786.     );
  787.  
  788.  
  789. #define MSGSRC_UNKNOWN                0
  790. #define MSGSRC_SOFTWARE_POST         1
  791. #define MSGSRC_HARDWARE_KEYBOARD    2
  792.  
  793. UINT
  794. WINAPI
  795. GetMessageSource(
  796.     void
  797.     );
  798.  
  799. WINUSERAPI
  800. DWORD
  801. WINAPI
  802. MsgWaitForMultipleObjectsEx(
  803.     DWORD nCount,
  804.     LPHANDLE pHandles,
  805.     DWORD dwMilliseconds,
  806.     DWORD dwWakeMask,
  807.     DWORD dwFlags);
  808.  
  809. #define MWMO_INPUTAVAILABLE    0x0004
  810.  
  811. #ifdef UNDER_CE
  812. #define MsgWaitForMultipleObjects(cnt,hndl,wa,ms,wm)    \
  813.     MsgWaitForMultipleObjectsEx(cnt,hndl,ms,wm,0)
  814. #else
  815. WINUSERAPI
  816. DWORD
  817. WINAPI
  818. MsgWaitForMultipleObjects(
  819.     DWORD nCount,
  820.     LPHANDLE pHandles,
  821.     BOOL fWaitAll,
  822.     DWORD dwMilliseconds,
  823.     DWORD dwWakeMask);
  824. #endif
  825.  
  826.  
  827. /*
  828.  * Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
  829.  */
  830. #define QS_KEY              0x0001
  831. #define QS_MOUSEMOVE        0x0002
  832. #define QS_MOUSEBUTTON      0x0004
  833. #define QS_POSTMESSAGE      0x0008
  834. #define QS_TIMER            0x0010
  835. #define QS_PAINT            0x0020
  836. #define QS_SENDMESSAGE      0x0040
  837.  
  838.  
  839.  
  840. #define QS_MOUSE           (QS_MOUSEMOVE     | \
  841.                             QS_MOUSEBUTTON)
  842.  
  843. #define QS_INPUT           (QS_MOUSE         | \
  844.                             QS_KEY)
  845.  
  846. #define QS_ALLEVENTS       (QS_INPUT         | \
  847.                             QS_POSTMESSAGE   | \
  848.                             QS_TIMER         | \
  849.                             QS_PAINT)
  850.  
  851. #define QS_ALLINPUT        (QS_INPUT         | \
  852.                             QS_POSTMESSAGE   | \
  853.                             QS_TIMER         | \
  854.                             QS_PAINT         | \
  855.                             QS_SENDMESSAGE)
  856.  
  857.  
  858.  
  859. // @CESYSGEN ENDIF
  860.  
  861. /* CAPTURE */
  862.  
  863.  
  864. // @CESYSGEN IF GWES_FOREGND
  865. HWND
  866. WINAPI
  867. GetCapture(
  868.     VOID);
  869.  
  870. HWND
  871. WINAPI
  872. SetCapture(
  873.     HWND hWnd);
  874.  
  875. BOOL
  876. WINAPI
  877. ReleaseCapture(
  878.     VOID);
  879. // @CESYSGEN ENDIF
  880.  
  881.  
  882. // @CESYSGEN IF GWES_WINMGR
  883. BOOL
  884. WINAPI
  885. MoveWindow(
  886.     HWND hWnd,
  887.     int X,
  888.     int Y,
  889.     int nWidth,
  890.     int nHeight,
  891.     BOOL bRepaint);
  892.  
  893. BOOL
  894. WINAPI
  895. SetWindowPos (
  896.     HWND hwnd,
  897.     HWND hwndInsertAfter,
  898.     int x,
  899.     int y,
  900.     int dx,
  901.     int dy,
  902.     UINT fuFlags
  903.     );
  904.  
  905. BOOL
  906. WINAPI
  907. GetWindowRect (
  908.     HWND hwnd,
  909.     LPRECT prc
  910.     );
  911.  
  912. int
  913. WINAPI
  914. GetWindowTextLengthA(
  915.     HWND hWnd);
  916.  
  917. int
  918. WINAPI
  919. GetWindowTextLengthW(
  920.     HWND hWnd);
  921. #ifdef UNICODE
  922. #define GetWindowTextLength  GetWindowTextLengthW
  923. #else
  924. #define GetWindowTextLength  GetWindowTextLengthA
  925. #endif
  926.  
  927. BOOL
  928. WINAPI
  929. GetClientRect (
  930.     HWND hwnd,
  931.     LPRECT prc
  932.     );
  933.  
  934. BOOL
  935. WINAPI
  936. AdjustWindowRectEx (
  937.     LPRECT prc,
  938.     DWORD  dwStyle,
  939.     BOOL   bMenu,
  940.     DWORD  dwExStyle
  941.     );
  942.  
  943. BOOL
  944. WINAPI
  945. ValidateRect(
  946.     HWND hWnd ,
  947.     CONST RECT *lpRect);
  948.  
  949. BOOL
  950. WINAPI
  951. InvalidateRect (
  952.     HWND hwnd,
  953.     LPCRECT prc,
  954.     BOOL fErase
  955.     );
  956.  
  957. HWND
  958. WINAPI
  959. GetWindow (
  960.     HWND hwnd,
  961.     UINT uCmd
  962.     );
  963.  
  964. BOOL
  965. WINAPI
  966. BringWindowToTop(
  967.     HWND hWnd);
  968.  
  969. /* Flags for SetWindowPos API */
  970. #define HWND_TOP        ((HWND)0)
  971. #define HWND_TOPMOST    ((HWND)-1)
  972. #define HWND_NOTOPMOST    ((HWND)-2)
  973. #define HWND_BOTTOM     ((HWND)1)
  974.  
  975. #define SWP_NOSIZE            0x0001
  976. #define SWP_NOMOVE            0x0002
  977. #define SWP_NOZORDER        0x0004
  978. #define SWP_NOREDRAW        0x0008
  979. #define SWP_NOACTIVATE        0x0010
  980. #define SWP_FRAMECHANGED    0x0020  /* The frame changed: send WM_NCCALCSIZE */
  981. #define SWP_SHOWWINDOW        0x0040
  982. #define SWP_HIDEWINDOW        0x0080
  983. #define SWP_NOCOPYBITS      0x0100
  984. #define SWP_NOOWNERZORDER   0x0200  /* Don't do owner Z ordering */
  985. #define SWP_NOSENDCHANGING  0x0400
  986.  
  987. #define SWP_DRAWFRAME       SWP_FRAMECHANGED
  988. #define SWP_NOREPOSITION    SWP_NOOWNERZORDER
  989.  
  990.  
  991. /* Flags for GetWindow() api */
  992. #define GW_HWNDFIRST        0
  993. #define GW_HWNDLAST         1
  994. #define GW_HWNDNEXT         2
  995. #define GW_HWNDPREV         3
  996. #define GW_OWNER            4
  997. #define GW_CHILD            5
  998. #define GW_MAX              5
  999.  
  1000.  
  1001. int
  1002. WINAPI
  1003. ScrollWindowEx(
  1004.     HWND hWnd,
  1005.     int dx,
  1006.     int dy,
  1007.     CONST RECT *prcScroll,
  1008.     CONST RECT *prcClip ,
  1009.     HRGN hrgnUpdate,
  1010.     LPRECT prcUpdate,
  1011.     UINT flags);
  1012.  
  1013. #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
  1014. #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  1015. // @CESYSGEN ENDIF
  1016.  
  1017.  
  1018. // @CESYSGEN IF GWES_PGDI || GWES_MGWINMGR
  1019. BOOL
  1020. WINAPI
  1021. ScrollDC(
  1022.     HDC hDC,
  1023.     int dx,
  1024.     int dy,
  1025.     CONST RECT *lprcScroll,
  1026.     CONST RECT *lprcClip ,
  1027.     HRGN hrgnUpdate,
  1028.     LPRECT lprcUpdate);
  1029. // @CESYSGEN ENDIF
  1030.  
  1031.  
  1032. // @CESYSGEN IF GWES_MENU
  1033. /*
  1034.  * Menu flags
  1035.  */
  1036. #define MF_BYCOMMAND        0x00000000L
  1037. #define MF_BYPOSITION       0x00000400L
  1038.  
  1039. #define MF_SEPARATOR        0x00000800L
  1040.  
  1041. #define MF_ENABLED          0x00000000L
  1042. #define MF_GRAYED           0x00000001L
  1043.  
  1044. #define MF_UNCHECKED        0x00000000L
  1045. #define MF_CHECKED          0x00000008L
  1046.  
  1047. #define MF_STRING           0x00000000L
  1048. #define MF_OWNERDRAW        0x00000100L
  1049.  
  1050. #define MF_POPUP            0x00000010L
  1051. // @CESYSGEN IF GWES_COLUMN
  1052. #define MF_MENUBARBREAK     0x00000020L
  1053. #define MF_MENUBREAK        0x00000040L
  1054. // @CESYSGEN ENDIF
  1055.  
  1056. #define MF_UNHILITE         0x00000000L
  1057. #define MF_HILITE           0x00000080L
  1058.  
  1059. #define MF_END              0x00000080L  /* Obsolete -- only used by old RES files */
  1060.  
  1061. #define MFT_STRING          MF_STRING
  1062. #define MFT_MENUBARBREAK    MF_MENUBARBREAK
  1063. #define MFT_MENUBREAK       MF_MENUBREAK
  1064. #define MFT_OWNERDRAW       MF_OWNERDRAW
  1065. #define MFT_RADIOCHECK      0x00000200L
  1066. #define MFT_SEPARATOR       MF_SEPARATOR
  1067.  
  1068. /* Menu flags for Add/Check/EnableMenuItem() */
  1069. #define MFS_CHECKED         MF_CHECKED
  1070. #define MFS_HILITE          MF_HILITE
  1071. #define MFS_ENABLED         MF_ENABLED
  1072. #define MFS_UNCHECKED       MF_UNCHECKED
  1073. #define MFS_UNHILITE        MF_UNHILITE
  1074.  
  1075.  
  1076. #define SC_CLOSE        0xF060
  1077. #define SC_KEYMENU      0xF100
  1078.  
  1079. BOOL
  1080. WINAPI
  1081. CheckMenuRadioItem(HMENU, UINT, UINT, UINT, UINT);
  1082. // @CESYSGEN ENDIF
  1083.  
  1084. // @CESYSGEN IF GWES_LOADBMP || GWES_RSRC
  1085. HBITMAP
  1086. WINAPI
  1087. LoadBitmapA(
  1088.     HINSTANCE hInstance,
  1089.     LPCSTR lpBitmapName);
  1090.  
  1091. HBITMAP
  1092. WINAPI
  1093. LoadBitmapW(
  1094.     HINSTANCE hInstance,
  1095.     LPCWSTR lpBitmapName);
  1096. #ifdef UNICODE
  1097. #define LoadBitmap  LoadBitmapW
  1098. #else
  1099. #define LoadBitmap  LoadBitmapA
  1100. #endif // !UNICODE
  1101. // @CESYSGEN ENDIF
  1102.  
  1103. // @CESYSGEN IF GWES_ICON || GWES_ICONCURS
  1104.  
  1105. typedef struct _ICONINFO {
  1106.     BOOL    fIcon;
  1107.     DWORD   xHotspot;
  1108.     DWORD   yHotspot;
  1109.     HBITMAP hbmMask;
  1110.     HBITMAP hbmColor;
  1111. } ICONINFO;
  1112. typedef ICONINFO *PICONINFO;
  1113.  
  1114.  
  1115. HICON
  1116. WINAPI
  1117. LoadIconA(
  1118.     HINSTANCE hInstance,
  1119.     LPCSTR lpIconName);
  1120.  
  1121. HICON
  1122. WINAPI
  1123. LoadIconW(
  1124.     HINSTANCE hInstance,
  1125.     LPCWSTR lpIconName);
  1126. #ifdef UNICODE
  1127. #define LoadIcon  LoadIconW
  1128. #else
  1129. #define LoadIcon  LoadIconA
  1130. #endif // !UNICODE
  1131.  
  1132.  
  1133. BOOL
  1134. WINAPI
  1135. DestroyIcon(
  1136.     HICON hIcon);
  1137.  
  1138. // @CESYSGEN ENDIF
  1139.  
  1140.  
  1141.  
  1142. // @CESYSGEN IF GWES_LOADIMG || GWES_RSRC
  1143.  
  1144. // @CESYSGEN IF GWES_LOADBMP || GWES_RSRC
  1145. #define IMAGE_BITMAP        0
  1146. // @CESYSGEN ENDIF
  1147.  
  1148. // @CESYSGEN IF GWES_ICON || GWES_ICONCURS
  1149. #define IMAGE_ICON          1
  1150. // @CESYSGEN ENDIF
  1151.  
  1152. // @CESYSGEN IF GWES_ICONCURS
  1153. #define IMAGE_CURSOR        2
  1154. // @CESYSGEN ENDIF
  1155.  
  1156. #define LR_DEFAULTCOLOR     0x0000
  1157.  
  1158. HANDLE
  1159. WINAPI
  1160. LoadImageA(
  1161.     HINSTANCE,
  1162.     LPCSTR,
  1163.     UINT,
  1164.     int,
  1165.     int,
  1166.     UINT);
  1167.  
  1168. HANDLE
  1169. WINAPI
  1170. LoadImageW(
  1171.     HINSTANCE,
  1172.     LPCWSTR,
  1173.     UINT,
  1174.     int,
  1175.     int,
  1176.     UINT);
  1177. #ifdef UNICODE
  1178. #define LoadImage  LoadImageW
  1179. #else
  1180. #define LoadImage  LoadImageA
  1181. #endif // !UNICODE
  1182. // @CESYSGEN ENDIF
  1183.  
  1184. // @CESYSGEN IF GWES_ICON || GWES_ICONCURS
  1185. #define DI_MASK         0x0001
  1186. #define DI_IMAGE        0x0002
  1187. #define DI_NORMAL       0x0003
  1188.  
  1189. BOOL
  1190. WINAPI
  1191. DrawIconEx(
  1192.     HDC hdc,
  1193.     int xLeft,
  1194.     int yTop,
  1195.     HICON hIcon,
  1196.     int cxWidth,
  1197.     int cyWidth,
  1198.     UINT istepIfAniCur,
  1199.     HBRUSH hbrFlickerFreeDraw,
  1200.     UINT diFlags);
  1201.  
  1202. HICON
  1203. WINAPI
  1204. CreateIconIndirect(
  1205.     PICONINFO piconinfo);
  1206. // @CESYSGEN ENDIF
  1207.  
  1208.  
  1209. // @CESYSGEN IF GWES_LOADSTR || GWES_RSRC
  1210. int
  1211. WINAPI
  1212. LoadStringA(
  1213.     HINSTANCE hInstance,
  1214.     UINT uID,
  1215.     LPSTR lpBuffer,
  1216.     int nBufferMax);
  1217.  
  1218. int
  1219. WINAPI
  1220. LoadStringW(
  1221.     HINSTANCE hInstance,
  1222.     UINT uID,
  1223.     LPWSTR lpBuffer,
  1224.     int nBufferMax);
  1225. #ifdef UNICODE
  1226. #define LoadString  LoadStringW
  1227. #else
  1228. #define LoadString  LoadStringA
  1229. #endif // !UNICODE
  1230. // @CESYSGEN ENDIF
  1231.  
  1232.  
  1233. // @CESYSGEN IF GWES_WMBASE
  1234. /*
  1235.  * GetSystemMetrics() codes
  1236.  */
  1237. #define SM_CXSCREEN             0
  1238. #define SM_CYSCREEN             1
  1239. #define SM_CXVSCROLL            2
  1240. #define SM_CYHSCROLL            3
  1241. #define SM_CYCAPTION            4
  1242. #define SM_CXBORDER             5
  1243. #define SM_CYBORDER             6
  1244. #define SM_CXDLGFRAME           7
  1245. #define SM_CYDLGFRAME           8
  1246. #define SM_CXICON               11
  1247. #define SM_CYICON               12
  1248. // @CESYSGEN IF GWES_ICONCURS
  1249. #define SM_CXCURSOR             13
  1250. #define SM_CYCURSOR             14
  1251. // @CESYSGEN ENDIF
  1252. #define SM_CYMENU               15
  1253. #define SM_MOUSEPRESENT         19
  1254. #define SM_CYVSCROLL            20
  1255. #define SM_CXHSCROLL            21
  1256. #define SM_DEBUG                22
  1257. #define SM_CXDOUBLECLK          36
  1258. #define SM_CYDOUBLECLK          37
  1259. #define SM_CXICONSPACING        38
  1260. #define SM_CYICONSPACING        39
  1261. #define SM_CXEDGE               45
  1262. #define SM_CYEDGE               46
  1263. #define SM_CXSMICON             49
  1264. #define SM_CYSMICON             50
  1265.  
  1266. #define SM_CXFIXEDFRAME         SM_CXDLGFRAME
  1267. #define SM_CYFIXEDFRAME         SM_CYDLGFRAME
  1268.  
  1269.  
  1270. // @CESYSGEN ENDIF
  1271.  
  1272.  
  1273. // @CESYSGEN IF GWES_MENU
  1274. HMENU
  1275. WINAPI
  1276. LoadMenuA(
  1277.     HINSTANCE hInstance,
  1278.     LPCSTR lpMenuName);
  1279.  
  1280. HMENU
  1281. WINAPI
  1282. LoadMenuW(
  1283.     HINSTANCE hInstance,
  1284.     LPCWSTR lpMenuName);
  1285. #ifdef UNICODE
  1286. #define LoadMenu  LoadMenuW
  1287. #else
  1288. #define LoadMenu  LoadMenuA
  1289. #endif // !UNICODE
  1290.  
  1291. BOOL
  1292. WINAPI
  1293. DrawMenuBar(
  1294.     HWND hWnd);
  1295.  
  1296. HMENU
  1297. WINAPI
  1298. CreateMenu(
  1299.     VOID);
  1300.  
  1301.  
  1302. HMENU
  1303. WINAPI
  1304. CreatePopupMenu(
  1305.     VOID);
  1306.  
  1307.  
  1308. BOOL
  1309. WINAPI
  1310. DestroyMenu(
  1311.     HMENU hMenu);
  1312.  
  1313.  
  1314. DWORD
  1315. WINAPI
  1316. CheckMenuItem(
  1317.     HMENU hMenu,
  1318.     UINT uIDCheckItem,
  1319.     UINT uCheck);
  1320.  
  1321.  
  1322. BOOL
  1323. WINAPI
  1324. EnableMenuItem(
  1325.     HMENU hMenu,
  1326.     UINT uIDEnableItem,
  1327.     UINT uEnable);
  1328.  
  1329. HMENU
  1330. WINAPI
  1331. GetSubMenu(
  1332.     HMENU hMenu,
  1333.     int nPos);
  1334.  
  1335. BOOL
  1336. WINAPI
  1337. InsertMenuA(
  1338.     HMENU hMenu,
  1339.     UINT uPosition,
  1340.     UINT uFlags,
  1341.     UINT uIDNewItem,
  1342.     LPCSTR lpNewItem
  1343.     );
  1344.  
  1345. BOOL
  1346. WINAPI
  1347. InsertMenuW(
  1348.     HMENU hMenu,
  1349.     UINT uPosition,
  1350.     UINT uFlags,
  1351.     UINT uIDNewItem,
  1352.     LPCWSTR lpNewItem
  1353.     );
  1354. #ifdef UNICODE
  1355. #define InsertMenu  InsertMenuW
  1356. #else
  1357. #define InsertMenu  InsertMenuA
  1358. #endif // !UNICODE
  1359.  
  1360.  
  1361. BOOL
  1362. WINAPI
  1363. AppendMenuA(
  1364.     HMENU hMenu,
  1365.     UINT uFlags,
  1366.     UINT uIDNewItem,
  1367.     LPCSTR lpNewItem
  1368.     );
  1369.  
  1370. BOOL
  1371. WINAPI
  1372. AppendMenuW(
  1373.     HMENU hMenu,
  1374.     UINT uFlags,
  1375.     UINT uIDNewItem,
  1376.     LPCWSTR lpNewItem
  1377.     );
  1378. #ifdef UNICODE
  1379. #define AppendMenu  AppendMenuW
  1380. #else
  1381. #define AppendMenu  AppendMenuA
  1382. #endif // !UNICODE
  1383.  
  1384. BOOL
  1385. WINAPI RemoveMenu(
  1386.     HMENU hMenu,
  1387.     UINT uPosition,
  1388.     UINT uFlags);
  1389.  
  1390.  
  1391. BOOL
  1392. WINAPI
  1393. DeleteMenu(
  1394.     HMENU hMenu,
  1395.     UINT uPosition,
  1396.     UINT uFlags);
  1397.  
  1398.  
  1399.  
  1400. BOOL
  1401. WINAPI
  1402. TrackPopupMenu(
  1403.     HMENU hMenu,
  1404.     UINT uFlags,
  1405.     int x,
  1406.     int y,
  1407.     int nReserved,
  1408.     HWND hWnd,
  1409.     CONST RECT *prcRect);
  1410.  
  1411. typedef struct tagTPMPARAMS
  1412. {
  1413.     UINT    cbSize;     /* Size of structure */
  1414.     RECT    rcExclude;  /* Screen coordinates of rectangle to exclude when positioning */
  1415. }   TPMPARAMS;
  1416. typedef TPMPARAMS FAR *LPTPMPARAMS;
  1417.  
  1418. BOOL
  1419. WINAPI
  1420. TrackPopupMenuEx(
  1421.     HMENU hmenu,
  1422.     UINT uFlags,
  1423.     int x,
  1424.     int y,
  1425.     HWND hwnd,
  1426.     LPTPMPARAMS lptpm);
  1427.  
  1428. #define TrackPopupMenu(hm,u,x,y,r,hw,p) \
  1429.         TrackPopupMenuEx((hm),(u),(x),(y),(hw),0)
  1430.  
  1431. // WINCE doesn't support a system menu, but in order
  1432. // to maintain application compatibility we provide this
  1433. // macro to allow disabling of the close box on the caption.
  1434. #define GetSystemMenu(hwnd, bRevert)    ((HMENU)(hwnd))
  1435.  
  1436. /* return codes for WM_MENUCHAR */
  1437. #define MNC_IGNORE  0
  1438. #define MNC_CLOSE   1
  1439. #define MNC_EXECUTE 2
  1440. #define MNC_SELECT  3
  1441.  
  1442.  
  1443. #define MIIM_STATE       0x00000001
  1444. #define MIIM_ID          0x00000002
  1445. #define MIIM_SUBMENU     0x00000004
  1446. #define MIIM_CHECKMARKS  0x00000008
  1447. #define MIIM_TYPE        0x00000010
  1448. #define MIIM_DATA        0x00000020
  1449.  
  1450. typedef struct tagMENUITEMINFOA
  1451. {
  1452.     UINT    cbSize;
  1453.     UINT    fMask;
  1454.     UINT    fType;          // used if MIIM_TYPE
  1455.     UINT    fState;         // used if MIIM_STATE
  1456.     UINT    wID;            // used if MIIM_ID
  1457.     HMENU   hSubMenu;       // used if MIIM_SUBMENU
  1458.     HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
  1459.     HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
  1460.     DWORD   dwItemData;     // used if MIIM_DATA
  1461.     LPSTR   dwTypeData;     // used if MIIM_TYPE
  1462.     UINT    cch;            // used if MIIM_TYPE
  1463. }   MENUITEMINFOA, FAR *LPMENUITEMINFOA;
  1464. typedef struct tagMENUITEMINFOW
  1465. {
  1466.     UINT    cbSize;
  1467.     UINT    fMask;
  1468.     UINT    fType;          // used if MIIM_TYPE
  1469.     UINT    fState;         // used if MIIM_STATE
  1470.     UINT    wID;            // used if MIIM_ID
  1471.     HMENU   hSubMenu;       // used if MIIM_SUBMENU
  1472.     HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
  1473.     HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
  1474.     DWORD   dwItemData;     // used if MIIM_DATA
  1475.     LPWSTR  dwTypeData;     // used if MIIM_TYPE
  1476.     UINT    cch;            // used if MIIM_TYPE
  1477. }   MENUITEMINFOW, FAR *LPMENUITEMINFOW;
  1478. #ifdef UNICODE
  1479. typedef MENUITEMINFOW MENUITEMINFO;
  1480. typedef LPMENUITEMINFOW LPMENUITEMINFO;
  1481. #else
  1482. typedef MENUITEMINFOA MENUITEMINFO;
  1483. typedef LPMENUITEMINFOA LPMENUITEMINFO;
  1484. #endif // UNICODE
  1485. typedef MENUITEMINFOA CONST FAR *LPCMENUITEMINFOA;
  1486. typedef MENUITEMINFOW CONST FAR *LPCMENUITEMINFOW;
  1487. #ifdef UNICODE
  1488. typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
  1489. #else
  1490. typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
  1491. #endif // UNICODE
  1492.  
  1493.   WINUSERAPI
  1494.   BOOL
  1495.   WINAPI
  1496. GetMenuItemInfoA(
  1497.     HMENU,
  1498.     UINT,
  1499.     BOOL,
  1500.     LPMENUITEMINFOA
  1501.     );
  1502.  
  1503.  WINUSERAPI
  1504.   BOOL
  1505.   WINAPI
  1506. GetMenuItemInfoW(
  1507.     HMENU,
  1508.     UINT,
  1509.     BOOL,
  1510.     LPMENUITEMINFOW
  1511.     );
  1512.  
  1513. #ifdef UNICODE
  1514. #define GetMenuItemInfo  GetMenuItemInfoW
  1515. #else
  1516. #define GetMenuItemInfo  GetMenuItemInfoA
  1517. #endif // !UNICODE
  1518.  
  1519.  
  1520.  
  1521. WINUSERAPI
  1522. BOOL
  1523. WINAPI
  1524. SetMenuItemInfoA(
  1525.     HMENU,
  1526.     UINT,
  1527.     BOOL,
  1528.     LPCMENUITEMINFOA
  1529.     );
  1530. WINUSERAPI
  1531. BOOL
  1532. WINAPI
  1533. SetMenuItemInfoW(
  1534.     HMENU,
  1535.     UINT,
  1536.     BOOL,
  1537.     LPCMENUITEMINFOW
  1538.     );
  1539. #ifdef UNICODE
  1540. #define SetMenuItemInfo  SetMenuItemInfoW
  1541. #else
  1542. #define SetMenuItemInfo  SetMenuItemInfoA
  1543. #endif // !UNICODE
  1544.  
  1545.  
  1546.  
  1547. /*
  1548.  * Flags for TrackPopupMenu
  1549.  */
  1550. #define TPM_LEFTALIGN   0x0000L
  1551. #define TPM_CENTERALIGN 0x0004L
  1552. #define TPM_RIGHTALIGN  0x0008L
  1553.  
  1554. #define TPM_TOPALIGN        0x0000L
  1555. #define TPM_VCENTERALIGN    0x0010L
  1556. #define TPM_BOTTOMALIGN     0x0020L
  1557.  
  1558. #define TPM_HORIZONTAL      0x0000L     /* Horz alignment matters more */
  1559. #define TPM_VERTICAL        0x0040L     /* Vert alignment matters more */
  1560. #define TPM_NONOTIFY        0x0080L     /* Don't send any notification msgs */
  1561. #define TPM_RETURNCMD       0x0100L
  1562. // @CESYSGEN ENDIF
  1563.  
  1564. // @CESYSGEN IF GWES_ICON || GWES_ICONCURS
  1565. #define DrawIcon(hdc,x,y,hicon) \
  1566.         DrawIconEx(hdc,x,y,hicon,0,0,0,NULL, DI_NORMAL)
  1567. // @CESYSGEN ENDIF
  1568.  
  1569. // @CESYSGEN IF COREDLL_WMGR_C
  1570. /*
  1571.  * Defines for the fVirt field of the Accelerator table structure.
  1572.  */
  1573. #define FVIRTKEY  TRUE          /* Assumed to be == TRUE */
  1574. #define FNOINVERT 0x02
  1575. #define FSHIFT    0x04
  1576. #define FCONTROL  0x08
  1577. #define FALT      0x10
  1578.  
  1579. /*    The resource entries in the module each have an extra word of padding
  1580. between accelerator entries.  Win95 and WinNT both monkey with the
  1581. resource loading process to make the resulting memory image have 24-bits
  1582. but we just add the extra padding to the structure.  */
  1583. typedef struct tagACCEL {
  1584.     BYTE   fVirt;               /* Also called the flags field */
  1585.     WORD   key;
  1586.     WORD   cmd;
  1587.     WORD   pad;                    /* Different from Win95 and WinNT */
  1588. } ACCEL, *LPACCEL;
  1589.  
  1590.  
  1591. HACCEL
  1592. WINAPI
  1593. LoadAcceleratorsA(
  1594.     HINSTANCE hInstance,
  1595.     LPCSTR lpTableName);
  1596.  
  1597. HACCEL
  1598. WINAPI
  1599. LoadAcceleratorsW(
  1600.     HINSTANCE hInstance,
  1601.     LPCWSTR lpTableName);
  1602. #ifdef UNICODE
  1603. #define LoadAccelerators  LoadAcceleratorsW
  1604. #else
  1605. #define LoadAccelerators  LoadAcceleratorsA
  1606. #endif // !UNICODE
  1607.  
  1608.  
  1609. HACCEL
  1610. WINAPI
  1611. CreateAcceleratorTableA(
  1612.     LPACCEL, int);
  1613.  
  1614. HACCEL
  1615. WINAPI
  1616. CreateAcceleratorTableW(
  1617.     LPACCEL, int);
  1618. #ifdef UNICODE
  1619. #define CreateAcceleratorTable  CreateAcceleratorTableW
  1620. #else
  1621. #define CreateAcceleratorTable  CreateAcceleratorTableA
  1622. #endif // !UNICODE
  1623.  
  1624. BOOL
  1625. WINAPI
  1626. DestroyAcceleratorTable(
  1627.     HACCEL hAccel);
  1628.  
  1629. // @CESYSGEN ENDIF
  1630.  
  1631. // @CESYSGEN IF GWES_WINMGR
  1632. BOOL
  1633. WINAPI
  1634. SetSysColors(
  1635.     int cElements,
  1636.     CONST INT * lpaElements,
  1637.     CONST COLORREF * lpaRgbValues);
  1638.  
  1639. // @CESYSGEN ENDIF
  1640.  
  1641. // @CESYSGEN IF COREDLL_RECTAPI
  1642. BOOL
  1643. WINAPI
  1644. SetRect(
  1645.     LPRECT lprc,
  1646.     int xLeft,
  1647.     int yTop,
  1648.     int xRight,
  1649.     int yBottom);
  1650.  
  1651. BOOL
  1652. WINAPI
  1653. SetRectEmpty(
  1654.     LPRECT lprc);
  1655.  
  1656. BOOL
  1657. WINAPI
  1658. CopyRect(
  1659.     LPRECT lprcDst,
  1660.     CONST RECT *lprcSrc);
  1661.  
  1662. BOOL
  1663. WINAPI
  1664. InflateRect(
  1665.     LPRECT lprc,
  1666.     int dx,
  1667.     int dy);
  1668.  
  1669. BOOL
  1670. WINAPI
  1671. IntersectRect(
  1672.     LPRECT lprcDst,
  1673.     CONST RECT *lprcSrc1,
  1674.     CONST RECT *lprcSrc2);
  1675.  
  1676. BOOL
  1677. WINAPI
  1678. UnionRect(
  1679.     LPRECT lprcDst,
  1680.     CONST RECT *lprcSrc1,
  1681.     CONST RECT *lprcSrc2);
  1682.  
  1683. BOOL
  1684. WINAPI
  1685. OffsetRect(
  1686.     LPRECT lprc,
  1687.     int dx,
  1688.     int dy);
  1689.  
  1690. BOOL
  1691. WINAPI
  1692. IsRectEmpty(
  1693.     CONST RECT *lprc);
  1694.  
  1695. BOOL
  1696. WINAPI
  1697. EqualRect(
  1698.     CONST RECT *lprc1,
  1699.     CONST RECT *lprc2);
  1700.  
  1701. BOOL
  1702. WINAPI
  1703. PtInRect(
  1704.     CONST RECT *lprc,
  1705.     POINT pt);
  1706.  
  1707. BOOL
  1708. WINAPI
  1709. SubtractRect(
  1710.     LPRECT prcDst,
  1711.     CONST RECT *prcSrc1,
  1712.     CONST RECT *prcSrc2);
  1713.  
  1714. // @CESYSGEN ENDIF
  1715.  
  1716. // @CESYSGEN IF GWES_WINMGR
  1717. int
  1718. WINAPI
  1719. MapWindowPoints(
  1720.     HWND hWndFrom,
  1721.     HWND hWndTo,
  1722.     LPPOINT lpPoints,
  1723.     UINT cPoints);
  1724.  
  1725. HWND
  1726. WINAPI
  1727. WindowFromPoint(
  1728.     POINT Point);
  1729.  
  1730. HWND
  1731. WINAPI
  1732. ChildWindowFromPoint(
  1733.     HWND hWndParent,
  1734.     POINT Point);
  1735.  
  1736. BOOL
  1737. WINAPI
  1738. ClientToScreen(
  1739.     HWND hWnd,
  1740.     LPPOINT lpPoint);
  1741.  
  1742. BOOL
  1743. WINAPI
  1744. ScreenToClient(
  1745.     HWND hWnd,
  1746.     LPPOINT lpPoint);
  1747.  
  1748.  
  1749. typedef struct _PAINTSTRUCT {
  1750.     HDC     hdc;                /* display DC to be used for painting */
  1751.     BOOL    fErase;             /* Indicates whether background needs erased */
  1752.     RECT    rcPaint;            /* Rectangle where painting required */
  1753.     BOOL    fRestore;           /* RESERVED */
  1754.     BOOL    fIncUpdate;         /* RESERVED */
  1755.     BYTE    rgbReserved[32];    /* RESERVED */
  1756. } PAINTSTRUCT;
  1757.  
  1758. typedef PAINTSTRUCT *LPPAINTSTRUCT;
  1759. typedef PAINTSTRUCT *PPAINTSTRUCT;
  1760. typedef const PAINTSTRUCT *LPCPAINTSTRUCT;
  1761. typedef const PAINTSTRUCT *PCPAINTSTRUCT;
  1762.  
  1763.  
  1764.  
  1765. BOOL
  1766. WINAPI
  1767. SetWindowTextA(
  1768.     HWND hWnd,
  1769.     LPCSTR lpString);
  1770.  
  1771. BOOL
  1772. WINAPI
  1773. SetWindowTextW(
  1774.     HWND hWnd,
  1775.     LPCWSTR lpString);
  1776. #ifdef UNICODE
  1777. #define SetWindowText  SetWindowTextW
  1778. #else
  1779. #define SetWindowText  SetWindowTextA
  1780. #endif // !UNICODE
  1781.  
  1782.  
  1783. int
  1784. WINAPI
  1785. GetWindowTextA(
  1786.     HWND hWnd,
  1787.     LPSTR lpString,
  1788.     int nMaxCount);
  1789.  
  1790. int
  1791. WINAPI
  1792. GetWindowTextW(
  1793.     HWND hWnd,
  1794.     LPWSTR lpString,
  1795.     int nMaxCount);
  1796. #ifdef UNICODE
  1797. #define GetWindowText  GetWindowTextW
  1798. #else
  1799. #define GetWindowText  GetWindowTextA
  1800. #endif // !UNICODE
  1801.  
  1802.  
  1803.  
  1804. HDC
  1805. WINAPI
  1806. BeginPaint (
  1807.     HWND hwnd,
  1808.     LPPAINTSTRUCT pps
  1809.     );
  1810.  
  1811. BOOL
  1812. WINAPI
  1813. EndPaint (
  1814.     HWND hwnd,
  1815.     LPPAINTSTRUCT pps
  1816.     );
  1817.  
  1818. BOOL
  1819. WINAPI
  1820. GetUpdateRect(
  1821.     HWND hWnd,
  1822.     LPRECT lpRect,
  1823.     BOOL bErase);
  1824.  
  1825. int
  1826. WINAPI
  1827. GetUpdateRgn(
  1828.     HWND hWnd,
  1829.     HRGN hRgn,
  1830.     BOOL bErase);
  1831.  
  1832. HDC
  1833. WINAPI
  1834. GetDC (
  1835.     HWND hwnd
  1836.     );
  1837.  
  1838. HDC
  1839. WINAPI
  1840. GetWindowDC (
  1841.     HWND hwnd
  1842.     );
  1843.  
  1844. int
  1845. WINAPI
  1846. ReleaseDC (
  1847.     HWND hwnd,
  1848.     HDC hdc
  1849.     );
  1850.  
  1851.  
  1852.  
  1853.  
  1854. // @CESYSGEN ENDIF
  1855.  
  1856.  
  1857. // @CESYSGEN IF GWES_WMBASE
  1858.  
  1859. #define WM_NULL                         0x0000
  1860. #define WM_CREATE                       0x0001
  1861. #define WM_DESTROY                      0x0002
  1862.  
  1863. #define WM_CLOSE                        0x0010
  1864. #define WM_QUIT                         0x0012
  1865.  
  1866.  
  1867. #define WM_COPYDATA                     0x004A
  1868. /*
  1869.  * lParam of WM_COPYDATA message points to...
  1870.  */
  1871. typedef struct tagCOPYDATASTRUCT {
  1872.     DWORD dwData;
  1873.     DWORD cbData;
  1874.     PVOID lpData;
  1875. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  1876.  
  1877.  
  1878. BOOL
  1879. WINAPI
  1880. IsWindow(
  1881.     HWND hWnd);
  1882.  
  1883. BOOL
  1884. WINAPI
  1885. IsWindowVisible(
  1886.     HWND hWnd);
  1887.  
  1888.  
  1889. #define WS_CHILD            0x40000000L
  1890. #define WS_VISIBLE          0x10000000L
  1891. #define WS_DISABLED         0x08000000L
  1892.  
  1893.  
  1894. #define WS_GROUP            0x00020000L
  1895. #define WS_TABSTOP          0x00010000L
  1896.  
  1897. #define WS_EX_NOACTIVATE    0x08000000L
  1898.  
  1899.  
  1900. #define CW_USEDEFAULT       ((int)0x80000000)
  1901.  
  1902. /*
  1903.  * Special value for CreateWindow, et al.
  1904.  */
  1905. #define HWND_DESKTOP        ((HWND)0)
  1906.  
  1907. HWND
  1908. WINAPI
  1909. CreateWindowExA(
  1910.     DWORD dwExStyle,
  1911.     LPCSTR lpClassName,
  1912.     LPCSTR lpWindowName,
  1913.     DWORD dwStyle,
  1914.     int X,
  1915.     int Y,
  1916.     int nWidth,
  1917.     int nHeight,
  1918.     HWND hWndParent ,
  1919.     HMENU hMenu,
  1920.     HINSTANCE hInstance,
  1921.     LPVOID lpParam);
  1922.  
  1923. HWND
  1924. WINAPI
  1925. CreateWindowExW(
  1926.     DWORD dwExStyle,
  1927.     LPCWSTR lpClassName,
  1928.     LPCWSTR lpWindowName,
  1929.     DWORD dwStyle,
  1930.     int X,
  1931.     int Y,
  1932.     int nWidth,
  1933.     int nHeight,
  1934.     HWND hWndParent ,
  1935.     HMENU hMenu,
  1936.     HINSTANCE hInstance,
  1937.     LPVOID lpParam);
  1938.  
  1939. #ifdef UNICODE
  1940. #define CreateWindowEx  CreateWindowExW
  1941. #else
  1942. #define CreateWindowEx  CreateWindowExA
  1943. #endif // !UNICODE
  1944.  
  1945. #define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y,\
  1946. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  1947. CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  1948. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  1949.  
  1950. #define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y,\
  1951. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  1952. CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  1953. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  1954.  
  1955. #ifdef UNICODE
  1956. #define CreateWindow  CreateWindowW
  1957. #else
  1958. #define CreateWindow  CreateWindowA
  1959. #endif // !UNICODE
  1960.  
  1961.  
  1962.  
  1963. BOOL
  1964. WINAPI
  1965. DestroyWindow (
  1966.     HWND hwnd
  1967.     );
  1968.  
  1969.  
  1970. #ifdef STRICT
  1971.  
  1972. WINUSERAPI
  1973. LRESULT
  1974. WINAPI
  1975. CallWindowProcA(
  1976.     WNDPROC lpPrevWndFunc,
  1977.     HWND hWnd,
  1978.     UINT Msg,
  1979.     WPARAM wParam,
  1980.     LPARAM lParam);
  1981. WINUSERAPI
  1982. LRESULT
  1983. WINAPI
  1984. CallWindowProcW(
  1985.     WNDPROC lpPrevWndFunc,
  1986.     HWND hWnd,
  1987.     UINT Msg,
  1988.     WPARAM wParam,
  1989.     LPARAM lParam);
  1990. #ifdef UNICODE
  1991. #define CallWindowProc  CallWindowProcW
  1992. #else
  1993. #define CallWindowProc  CallWindowProcA
  1994. #endif // !UNICODE
  1995.  
  1996. #else /* !STRICT */
  1997.  
  1998. WINUSERAPI
  1999. LRESULT
  2000. WINAPI
  2001. CallWindowProcA(
  2002.     FARPROC lpPrevWndFunc,
  2003.     HWND hWnd,
  2004.     UINT Msg,
  2005.     WPARAM wParam,
  2006.     LPARAM lParam);
  2007. WINUSERAPI
  2008. LRESULT
  2009. WINAPI
  2010. CallWindowProcW(
  2011.     FARPROC lpPrevWndFunc,
  2012.     HWND hWnd,
  2013.     UINT Msg,
  2014.     WPARAM wParam,
  2015.     LPARAM lParam);
  2016. #ifdef UNICODE
  2017. #define CallWindowProc  CallWindowProcW
  2018. #else
  2019. #define CallWindowProc  CallWindowProcA
  2020. #endif // !UNICODE
  2021.  
  2022. #endif /* !STRICT */
  2023.  
  2024.  
  2025. DWORD
  2026. WINAPI
  2027. GetWindowThreadProcessId(
  2028.     HWND hWnd,
  2029.     LPDWORD lpdwProcessId);
  2030.  
  2031. WINUSERAPI
  2032. UINT
  2033. WINAPI
  2034. GetDoubleClickTime (VOID);
  2035.  
  2036.  
  2037. int
  2038. WINAPI
  2039. GetSystemMetrics(
  2040.     int nIndex);
  2041.  
  2042. #ifndef UNICODE_ONLY
  2043. WINUSERAPI
  2044. DWORD
  2045. WINAPI
  2046. GetClassLongA(
  2047.     HWND hWnd,
  2048.     int nIndex);
  2049. #endif //!UNICODE_ONLY
  2050. #ifndef ANSI_ONLY
  2051. WINUSERAPI
  2052. DWORD
  2053. WINAPI
  2054. GetClassLongW(
  2055.     HWND hWnd,
  2056.     int nIndex);
  2057. #endif //!ANSI_ONLY
  2058. #ifdef UNICODE
  2059. #define GetClassLong  GetClassLongW
  2060. #else
  2061. #define GetClassLong  GetClassLongA
  2062. #endif // !UNICODE
  2063.  
  2064. #ifndef UNICODE_ONLY
  2065. WINUSERAPI
  2066. DWORD
  2067. WINAPI
  2068. SetClassLongA(
  2069.     HWND hWnd,
  2070.     int nIndex,
  2071.     LONG dwNewLong);
  2072. #endif //!UNICODE_ONLY
  2073. #ifndef ANSI_ONLY
  2074. WINUSERAPI
  2075. DWORD
  2076. WINAPI
  2077. SetClassLongW(
  2078.     HWND hWnd,
  2079.     int nIndex,
  2080.     LONG dwNewLong);
  2081. #endif //!ANSI_ONLY
  2082. #ifdef UNICODE
  2083. #define SetClassLong  SetClassLongW
  2084. #else
  2085. #define SetClassLong  SetClassLongA
  2086. #endif // !UNICODE
  2087.  
  2088. #define GCL_HCURSOR     (-12)
  2089. #define GCL_HICON       (-14)
  2090. #define GCL_STYLE       (-26)
  2091.  
  2092.  
  2093.  
  2094. // @CESYSGEN IF COREDLL_WMGR_C
  2095. /* RegisterClass */
  2096.  
  2097. ATOM
  2098. WINAPI
  2099. RegisterClassA(
  2100.     CONST WNDCLASSA *lpWndClass
  2101.     );
  2102.  
  2103. ATOM
  2104. WINAPI
  2105. RegisterClassW (
  2106.     CONST WNDCLASSW *lpWndClass
  2107.     );
  2108.  
  2109. #ifdef UNICODE
  2110. #define RegisterClass  RegisterClassW
  2111. #else
  2112. #define RegisterClass  RegisterClassA
  2113. #endif // !UNICODE
  2114. // @CESYSGEN ENDIF
  2115.  
  2116.  
  2117. #ifndef UNICODE_ONLY
  2118. WINUSERAPI
  2119. BOOL
  2120. WINAPI
  2121. UnregisterClassA(
  2122.     LPCSTR lpClassName,
  2123.     HINSTANCE hInstance);
  2124. #endif //!UNICODE_ONLY
  2125. #ifndef ANSI_ONLY
  2126. WINUSERAPI
  2127. BOOL
  2128. WINAPI
  2129. UnregisterClassW(
  2130.     LPCWSTR lpClassName,
  2131.     HINSTANCE hInstance);
  2132. #endif //!ANSI_ONLY
  2133. #ifdef UNICODE
  2134. #define UnregisterClass  UnregisterClassW
  2135. #else
  2136. #define UnregisterClass  UnregisterClassA
  2137. #endif // !UNICODE
  2138.  
  2139.  
  2140. BOOL
  2141. WINAPI
  2142. GetClassInfoA(
  2143.     HINSTANCE hInstance,
  2144.     LPCSTR lpClassName,
  2145.     LPWNDCLASSA lpWndClass);
  2146.  
  2147. BOOL
  2148. WINAPI
  2149. GetClassInfoW(
  2150.     HINSTANCE hInstance,
  2151.     LPCWSTR lpClassName,
  2152.     LPWNDCLASSW lpWndClass);
  2153. #ifdef UNICODE
  2154. #define GetClassInfo  GetClassInfoW
  2155. #else
  2156. #define GetClassInfo  GetClassInfoA
  2157. #endif // !UNICODE
  2158.  
  2159.  
  2160. #define WM_ENABLE                       0x000A
  2161.  
  2162. BOOL
  2163. WINAPI
  2164. EnableWindow(
  2165.     HWND hWnd,
  2166.     BOOL bEnable);
  2167.  
  2168. BOOL
  2169. WINAPI
  2170. IsWindowEnabled(
  2171.     HWND hWnd);
  2172.  
  2173. /*
  2174.  * Color Types
  2175.  */
  2176. #ifdef UNDER_NT
  2177. #define COLOR_INDEX_MASK        0
  2178. #else
  2179. #define COLOR_INDEX_MASK        0x40000000
  2180. #endif // UNDER_NT
  2181. #define COLOR_SCROLLBAR         (0 | COLOR_INDEX_MASK)
  2182. #define COLOR_BACKGROUND        (1 | COLOR_INDEX_MASK)
  2183. #define COLOR_ACTIVECAPTION     (2 | COLOR_INDEX_MASK)
  2184. #define COLOR_INACTIVECAPTION   (3 | COLOR_INDEX_MASK)
  2185. #define COLOR_MENU              (4 | COLOR_INDEX_MASK)
  2186. #define COLOR_WINDOW            (5 | COLOR_INDEX_MASK)
  2187. #define COLOR_WINDOWFRAME       (6 | COLOR_INDEX_MASK)
  2188. #define COLOR_MENUTEXT          (7 | COLOR_INDEX_MASK)
  2189. #define COLOR_WINDOWTEXT        (8 | COLOR_INDEX_MASK)
  2190. #define COLOR_CAPTIONTEXT       (9 | COLOR_INDEX_MASK)
  2191. #define COLOR_ACTIVEBORDER      (10 | COLOR_INDEX_MASK)
  2192. #define COLOR_INACTIVEBORDER    (11 | COLOR_INDEX_MASK)
  2193. #define COLOR_APPWORKSPACE      (12 | COLOR_INDEX_MASK)
  2194. #define COLOR_HIGHLIGHT         (13 | COLOR_INDEX_MASK)
  2195. #define COLOR_HIGHLIGHTTEXT     (14 | COLOR_INDEX_MASK)
  2196. #define COLOR_BTNFACE           (15 | COLOR_INDEX_MASK)
  2197. #define COLOR_BTNSHADOW         (16 | COLOR_INDEX_MASK)
  2198. #define COLOR_GRAYTEXT          (17 | COLOR_INDEX_MASK)
  2199. #define COLOR_BTNTEXT           (18 | COLOR_INDEX_MASK)
  2200. #define COLOR_INACTIVECAPTIONTEXT (19 | COLOR_INDEX_MASK)
  2201. #define COLOR_BTNHIGHLIGHT      (20 | COLOR_INDEX_MASK)
  2202.  
  2203. #define COLOR_3DDKSHADOW        (21 | COLOR_INDEX_MASK)
  2204. #define COLOR_3DLIGHT           (22 | COLOR_INDEX_MASK)
  2205. #define COLOR_INFOTEXT          (23 | COLOR_INDEX_MASK)
  2206. #define COLOR_INFOBK            (24 | COLOR_INDEX_MASK)
  2207. #define COLOR_STATIC            (25 | COLOR_INDEX_MASK)
  2208. #define COLOR_STATICTEXT        (26 | COLOR_INDEX_MASK)
  2209. #define COLOR_LASTITEM          (27 | COLOR_INDEX_MASK)
  2210.  
  2211. #define COLOR_DESKTOP           COLOR_BACKGROUND
  2212. #define COLOR_3DFACE            COLOR_BTNFACE
  2213. #define COLOR_3DSHADOW          COLOR_BTNSHADOW
  2214. #define COLOR_3DHIGHLIGHT       COLOR_BTNHIGHLIGHT
  2215. #define COLOR_3DHILIGHT         COLOR_BTNHIGHLIGHT
  2216.  
  2217. DWORD
  2218. WINAPI
  2219. GetSysColor(
  2220.     int nIndex);
  2221.  
  2222. // @CESYSGEN ENDIF
  2223.  
  2224.  
  2225. // @CESYSGEN IF GWES_UIBASE
  2226.  
  2227.  
  2228. BOOL
  2229. WINAPI
  2230. GetMouseMovePoints(
  2231.     PPOINT    pptBuf,
  2232.     UINT    nBufPoints,
  2233.     UINT    *pnPointsRetrieved
  2234.     );
  2235.  
  2236.  
  2237. #define MOUSEEVENTF_MOVE        0x0001 /* mouse move */
  2238. #define MOUSEEVENTF_LEFTDOWN    0x0002 /* left button down */
  2239. #define MOUSEEVENTF_LEFTUP      0x0004 /* left button up */
  2240. #define MOUSEEVENTF_RIGHTDOWN   0x0008 /* right button down */
  2241. #define MOUSEEVENTF_RIGHTUP     0x0010 /* right button up */
  2242. #define MOUSEEVENTF_MIDDLEDOWN  0x0020 /* middle button down */
  2243. #define MOUSEEVENTF_MIDDLEUP    0x0040 /* middle button up */
  2244. #define MOUSEEVENTF_WHEEL       0x0800 /* wheel button rolled */
  2245. #define MOUSEEVENTF_ABSOLUTE    0x8000 /* absolute move */
  2246.  
  2247. VOID
  2248. WINAPI
  2249. mouse_event(
  2250.     DWORD dwFlags,
  2251.     DWORD dx,
  2252.     DWORD dy,
  2253.     DWORD cButtons,
  2254.     DWORD dwExtraInfo);
  2255.  
  2256.  
  2257.  
  2258. typedef struct tagMOUSEINPUT {
  2259.     LONG    dx;
  2260.     LONG    dy;
  2261.     DWORD   mouseData;
  2262.     DWORD   dwFlags;
  2263.     DWORD   time;
  2264.     DWORD   dwExtraInfo;
  2265. } MOUSEINPUT, *PMOUSEINPUT, FAR* LPMOUSEINPUT;
  2266.  
  2267. typedef struct tagKEYBDINPUT {
  2268.     WORD    wVk;
  2269.     WORD    wScan;
  2270.     DWORD   dwFlags;
  2271.     DWORD   time;
  2272.     DWORD   dwExtraInfo;
  2273. } KEYBDINPUT, *PKEYBDINPUT, FAR* LPKEYBDINPUT;
  2274.  
  2275. typedef struct tagHARDWAREINPUT {
  2276.     DWORD   uMsg;
  2277.     WORD    wParamL;
  2278.     WORD    wParamH;
  2279.     DWORD   dwExtraInfo;
  2280. } HARDWAREINPUT, *PHARDWAREINPUT, FAR* LPHARDWAREINPUT;
  2281.  
  2282. #define INPUT_MOUSE     0
  2283. #define INPUT_KEYBOARD  1
  2284. #define INPUT_HARDWARE  2
  2285.  
  2286. typedef struct tagINPUT {
  2287.     DWORD   type;
  2288.     union
  2289.     {
  2290.         MOUSEINPUT      mi;
  2291.         KEYBDINPUT      ki;
  2292.         HARDWAREINPUT    hi;
  2293.     };
  2294. } INPUT, *PINPUT, FAR* LPINPUT;
  2295.  
  2296.  
  2297. WINUSERAPI
  2298. UINT
  2299. WINAPI
  2300. SendInput(
  2301.     UINT    nInputs,
  2302.     LPINPUT    pInputs,
  2303.     int        cbSize
  2304.     );
  2305.  
  2306.  
  2307. // @CESYSGEN ENDIF
  2308.  
  2309.  
  2310.  
  2311. // @CESYSGEN IF GWES_ACCEL
  2312. int
  2313. WINAPI
  2314. TranslateAcceleratorA(
  2315.     HWND hWnd,
  2316.     HACCEL hAccTable,
  2317.     LPMSG lpMsg);
  2318.  
  2319. int
  2320. WINAPI
  2321. TranslateAcceleratorW(
  2322.     HWND hWnd,
  2323.     HACCEL hAccTable,
  2324.     LPMSG lpMsg);
  2325. #ifdef UNICODE
  2326. #define TranslateAccelerator  TranslateAcceleratorW
  2327. #else
  2328. #define TranslateAccelerator  TranslateAcceleratorA
  2329. #endif
  2330. // @CESYSGEN ENDIF
  2331.  
  2332.  
  2333.  
  2334. // @CESYSGEN IF GWES_IDLE
  2335.  
  2336.  
  2337. void
  2338. WINAPI
  2339. SystemIdleTimerReset(
  2340.     void
  2341.     );
  2342. // @CESYSGEN ENDIF
  2343.  
  2344.  
  2345. // @CESYSGEN IF GWES_DEFWNDPROC
  2346.  
  2347. LRESULT
  2348. WINAPI
  2349. DefWindowProcA(
  2350.     HWND hWnd,
  2351.     UINT Msg,
  2352.     WPARAM wParam,
  2353.     LPARAM lParam);
  2354.  
  2355. LRESULT
  2356. WINAPI
  2357. DefWindowProcW(
  2358.     HWND hWnd,
  2359.     UINT Msg,
  2360.     WPARAM wParam,
  2361.     LPARAM lParam);
  2362. #ifdef UNICODE
  2363. #define DefWindowProc  DefWindowProcW
  2364. #else
  2365. #define DefWindowProc  DefWindowProcA
  2366. #endif // !UNICODE
  2367.  
  2368. // @CESYSGEN ENDIF
  2369.  
  2370.  
  2371.  
  2372.  
  2373. // @CESYSGEN IF GWES_GSETWINLONG
  2374.  
  2375. /*
  2376.  *  Window field offsets for GetWindowLong()
  2377.  */
  2378. #define GWL_WNDPROC         (-4)
  2379. #define GWL_STYLE           (-16)
  2380. #define GWL_EXSTYLE         (-20)
  2381. #define GWL_USERDATA        (-21)
  2382. #define GWL_ID              (-12)
  2383.  
  2384.  
  2385. LONG
  2386. WINAPI
  2387. GetWindowLongA(
  2388.     HWND hWnd,
  2389.     int nIndex);
  2390.  
  2391. LONG
  2392. WINAPI
  2393. GetWindowLongW(
  2394.     HWND hWnd,
  2395.     int nIndex);
  2396. #ifdef UNICODE
  2397. #define GetWindowLong  GetWindowLongW
  2398. #else
  2399. #define GetWindowLong  GetWindowLongA
  2400. #endif // !UNICODE
  2401.  
  2402.  
  2403. LONG
  2404. WINAPI
  2405. SetWindowLongA(
  2406.     HWND hWnd,
  2407.     int nIndex,
  2408.     LONG dwNewLong);
  2409.  
  2410. LONG
  2411. WINAPI
  2412. SetWindowLongW(
  2413.     HWND hWnd,
  2414.     int nIndex,
  2415.     LONG dwNewLong);
  2416. #ifdef UNICODE
  2417. #define SetWindowLong  SetWindowLongW
  2418. #else
  2419. #define SetWindowLong  SetWindowLongA
  2420. #endif // !UNICODE
  2421.  
  2422. // @CESYSGEN ENDIF
  2423.  
  2424.  
  2425.  
  2426. // @CESYSGEN IF GWES_WINMGR
  2427. /* Flags for ShowWindow */
  2428. #define SW_HIDE             0
  2429. #define SW_SHOWNORMAL       1
  2430. #define SW_SHOWNOACTIVATE   4
  2431. #define SW_SHOW             5
  2432. #define SW_MINIMIZE         6
  2433. #define SW_SHOWNA           8
  2434.  
  2435. #ifdef UNDER_NT
  2436. #define SW_MAX              10
  2437. #endif
  2438.  
  2439. BOOL
  2440. WINAPI
  2441. IsChild(
  2442.     HWND hWndParent,
  2443.     HWND hWnd);
  2444.  
  2445.  
  2446. BOOL
  2447. WINAPI
  2448. ShowWindow (
  2449.     HWND hwnd,
  2450.     INT nCmdShow
  2451.     );
  2452.  
  2453. BOOL
  2454. WINAPI
  2455. UpdateWindow (
  2456.     HWND hwnd
  2457.     );
  2458.  
  2459. HWND
  2460. WINAPI
  2461. SetParent (
  2462.     HWND hwnd,
  2463.     HWND hwndParent
  2464.     );
  2465.  
  2466. HWND
  2467. WINAPI
  2468. GetParent (
  2469.     HWND hwnd
  2470.     );
  2471.  
  2472. WINUSERAPI
  2473. HWND
  2474. WINAPI
  2475. FindWindowA(
  2476.     LPCSTR lpClassName ,
  2477.     LPCSTR lpWindowName);
  2478. WINUSERAPI
  2479. HWND
  2480. WINAPI
  2481. FindWindowW(
  2482.     LPCWSTR lpClassName ,
  2483.     LPCWSTR lpWindowName);
  2484. #ifdef UNICODE
  2485. #define FindWindow  FindWindowW
  2486. #else
  2487. #define FindWindow  FindWindowA
  2488. #endif // !UNICODE
  2489.  
  2490.  
  2491. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  2492.  
  2493. BOOL
  2494. WINAPI
  2495. EnumWindows(
  2496.     WNDENUMPROC lpEnumFunc,
  2497.     LPARAM lParam);
  2498.  
  2499.  
  2500.  
  2501. int
  2502. WINAPI
  2503. GetClassNameA(
  2504.     HWND hWnd,
  2505.     LPSTR lpClassName,
  2506.     int nMaxCount);
  2507.  
  2508. int
  2509. WINAPI
  2510. GetClassNameW(
  2511.     HWND hWnd,
  2512.     LPWSTR lpClassName,
  2513.     int nMaxCount);
  2514. #ifdef UNICODE
  2515. #define GetClassName  GetClassNameW
  2516. #else
  2517. #define GetClassName  GetClassNameA
  2518. #endif // !UNICODE
  2519.  
  2520. // @CESYSGEN ENDIF
  2521. // @CESYSGEN IF GWES_MSGBOX
  2522. /*
  2523.  * MessageBox() Flags
  2524.  */
  2525. #define MB_OK                       0x00000000L
  2526. #define MB_OKCANCEL                 0x00000001L
  2527. #define MB_ABORTRETRYIGNORE         0x00000002L
  2528. #define MB_YESNOCANCEL              0x00000003L
  2529. #define MB_YESNO                    0x00000004L
  2530. #define MB_RETRYCANCEL              0x00000005L
  2531.  
  2532. #define MB_ICONHAND                 0x00000010L
  2533. #define MB_ICONQUESTION             0x00000020L
  2534. #define MB_ICONEXCLAMATION          0x00000030L
  2535. #define MB_ICONASTERISK             0x00000040L
  2536.  
  2537. #if(WINVER >= 0x0400)
  2538. #define MB_ICONWARNING              MB_ICONEXCLAMATION
  2539. #define MB_ICONERROR                MB_ICONHAND
  2540. #endif /* WINVER >= 0x0400 */
  2541.  
  2542. #define MB_ICONINFORMATION          MB_ICONASTERISK
  2543. #define MB_ICONSTOP                 MB_ICONHAND
  2544.  
  2545. #define MB_DEFBUTTON1               0x00000000L
  2546. #define MB_DEFBUTTON2               0x00000100L
  2547. #define MB_DEFBUTTON3               0x00000200L
  2548. #if(WINVER >= 0x0400)
  2549. #define MB_DEFBUTTON4               0x00000300L
  2550. #endif /* WINVER >= 0x0400 */
  2551.  
  2552. #define MB_APPLMODAL                0x00000000L
  2553. #define MB_SETFOREGROUND            0x00010000L
  2554.  
  2555. #define MB_TOPMOST                  0x00040000L
  2556.  
  2557. int
  2558. WINAPI
  2559. MessageBoxA(
  2560.     HWND hWnd ,
  2561.     LPCSTR lpText,
  2562.     LPCSTR lpCaption,
  2563.     UINT uType);
  2564.  
  2565. int
  2566. WINAPI
  2567. MessageBoxW(
  2568.     HWND hWnd ,
  2569.     LPCWSTR lpText,
  2570.     LPCWSTR lpCaption,
  2571.     UINT uType);
  2572. #ifdef UNICODE
  2573. #define MessageBox  MessageBoxW
  2574. #else
  2575. #define MessageBox  MessageBoxA
  2576. #endif // !UNICODE
  2577. // @CESYSGEN ENDIF
  2578.  
  2579. // @CESYSGEN IF GWES_MSGBEEP
  2580. BOOL
  2581. WINAPI
  2582. MessageBeep(
  2583.     UINT uType);
  2584. // @CESYSGEN ENDIF
  2585.  
  2586.  
  2587. // @CESYSGEN IF GWES_CARET
  2588. BOOL
  2589. WINAPI
  2590. CreateCaret(
  2591.     HWND hWnd,
  2592.     HBITMAP hBitmap,
  2593.     int nWidth,
  2594.     int nHeight);
  2595.  
  2596. BOOL
  2597. WINAPI
  2598. DestroyCaret(
  2599.     VOID);
  2600.  
  2601. BOOL
  2602. WINAPI
  2603. HideCaret(
  2604.     HWND hWnd);
  2605.  
  2606. BOOL
  2607. WINAPI
  2608. ShowCaret(
  2609.     HWND hWnd);
  2610.  
  2611. BOOL
  2612. WINAPI
  2613. SetCaretPos(
  2614.     int X,
  2615.     int Y);
  2616.  
  2617. BOOL
  2618. WINAPI
  2619. GetCaretPos(
  2620.     LPPOINT lpPoint);
  2621.  
  2622.  
  2623. BOOL
  2624. WINAPI
  2625. SetCaretBlinkTime(
  2626.     UINT uMSeconds
  2627.     );
  2628.  
  2629. UINT
  2630. WINAPI
  2631. GetCaretBlinkTime(
  2632.     VOID
  2633.     );
  2634. // @CESYSGEN ENDIF
  2635.  
  2636.  
  2637. // @CESYSGEN IF GWES_FOREGND
  2638. HWND
  2639. WINAPI
  2640. SetActiveWindow(
  2641.     HWND    hWnd);
  2642.  
  2643. HWND
  2644. WINAPI
  2645. GetForegroundWindow(
  2646.     VOID);
  2647.  
  2648. BOOL
  2649. WINAPI
  2650. SetForegroundWindow(
  2651.     HWND hWnd);
  2652.  
  2653.  
  2654. HWND
  2655. WINAPI
  2656. SetFocus(
  2657.     HWND hWnd
  2658.     );
  2659.  
  2660. HWND
  2661. WINAPI
  2662. GetActiveWindow(
  2663.     VOID
  2664.     );
  2665.  
  2666. HWND
  2667. WINAPI
  2668. GetFocus(
  2669.     VOID
  2670.     );
  2671.  
  2672.  
  2673. // @CESYSGEN ENDIF
  2674.  
  2675.  
  2676. // @CESYSGEN IF GWES_KBDUI
  2677. SHORT
  2678. WINAPI
  2679. GetAsyncKeyState(
  2680.     int vKey);
  2681.  
  2682. SHORT
  2683. WINAPI
  2684. GetKeyState(
  2685.     int nVirtKey);
  2686.  
  2687. WINUSERAPI
  2688. VOID
  2689. WINAPI
  2690. keybd_event(
  2691.     BYTE bVk,
  2692.     BYTE bScan,
  2693.     DWORD dwFlags,
  2694.     DWORD dwExtraInfo);
  2695.  
  2696.  
  2697. WINUSERAPI
  2698. BOOL
  2699. WINAPI
  2700. PostKeybdMessage(
  2701.     HWND    hwnd,
  2702.     UINT    VKey,
  2703.     UINT    KeyStateFlags,
  2704.     UINT    cCharacters,
  2705.     UINT    *pShiftStateBuffer,
  2706.     UINT *pCharacterBuffer
  2707.     );
  2708.  
  2709. WINUSERAPI
  2710. UINT
  2711. WINAPI
  2712. MapVirtualKeyA(
  2713.     UINT uCode,
  2714.     UINT uMapType);
  2715.  
  2716. WINUSERAPI
  2717. UINT
  2718. WINAPI
  2719. MapVirtualKeyW(
  2720.     UINT uCode,
  2721.     UINT uMapType);
  2722. #ifdef UNICODE
  2723. #define MapVirtualKey  MapVirtualKeyW
  2724. #else
  2725. #define MapVirtualKey  MapVirtualKeyA
  2726. #endif // !UNICODE
  2727.  
  2728.  
  2729. #define KEYEVENTF_KEYUP       0x0002
  2730. #define KEYEVENTF_SILENT      0x0004
  2731.  
  2732.  
  2733. /*
  2734.  * Virtual Keys, Standard Set
  2735.  */
  2736. #define VK_LBUTTON        0x01
  2737. #define VK_RBUTTON        0x02
  2738. #define VK_CANCEL         0x03
  2739. #define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
  2740.  
  2741. #define VK_BACK           0x08
  2742. #define VK_TAB            0x09
  2743.  
  2744. #define VK_CLEAR          0x0C
  2745. #define VK_RETURN         0x0D
  2746.  
  2747. #define VK_SHIFT          0x10
  2748. #define VK_CONTROL        0x11
  2749. #define VK_MENU           0x12
  2750. #define VK_PAUSE          0x13
  2751. #define VK_CAPITAL        0x14
  2752.  
  2753. #ifdef    JAPAN
  2754. #define    VK_KANA          0x15
  2755. #define    VK_KANJI      0x19
  2756. #endif
  2757.  
  2758. #define VK_ESCAPE         0x1B
  2759.  
  2760. #ifdef    JAPAN
  2761. #define    VK_CONVERT         0x1c
  2762. #define    VK_NOCONVERT      0x1d
  2763. #endif
  2764.  
  2765. #define VK_SPACE          0x20
  2766. #define VK_PRIOR          0x21
  2767. #define VK_NEXT           0x22
  2768. #define VK_END            0x23
  2769. #define VK_HOME           0x24
  2770. #define VK_LEFT           0x25
  2771. #define VK_UP             0x26
  2772. #define VK_RIGHT          0x27
  2773. #define VK_DOWN           0x28
  2774. #define VK_SELECT         0x29
  2775. #define VK_PRINT          0x2A
  2776. #define VK_EXECUTE        0x2B
  2777. #define VK_SNAPSHOT       0x2C
  2778. #define VK_INSERT         0x2D
  2779. #define VK_DELETE         0x2E
  2780. #define VK_HELP           0x2F
  2781.  
  2782. /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
  2783. /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
  2784.  
  2785. #define VK_LWIN           0x5B
  2786. #define VK_RWIN           0x5C
  2787. #define VK_APPS           0x5D
  2788.  
  2789. #define VK_NUMPAD0        0x60
  2790. #define VK_NUMPAD1        0x61
  2791. #define VK_NUMPAD2        0x62
  2792. #define VK_NUMPAD3        0x63
  2793. #define VK_NUMPAD4        0x64
  2794. #define VK_NUMPAD5        0x65
  2795. #define VK_NUMPAD6        0x66
  2796. #define VK_NUMPAD7        0x67
  2797. #define VK_NUMPAD8        0x68
  2798. #define VK_NUMPAD9        0x69
  2799. #define VK_MULTIPLY       0x6A
  2800. #define VK_ADD            0x6B
  2801. #define VK_SEPARATOR      0x6C
  2802. #define VK_SUBTRACT       0x6D
  2803. #define VK_DECIMAL        0x6E
  2804. #define VK_DIVIDE         0x6F
  2805. #define VK_F1             0x70
  2806. #define VK_F2             0x71
  2807. #define VK_F3             0x72
  2808. #define VK_F4             0x73
  2809. #define VK_F5             0x74
  2810. #define VK_F6             0x75
  2811. #define VK_F7             0x76
  2812. #define VK_F8             0x77
  2813. #define VK_F9             0x78
  2814. #define VK_F10            0x79
  2815. #define VK_F11            0x7A
  2816. #define VK_F12            0x7B
  2817. #define VK_F13            0x7C
  2818. #define VK_F14            0x7D
  2819. #define VK_F15            0x7E
  2820. #define VK_F16            0x7F
  2821. #define VK_F17            0x80
  2822. #define VK_F18            0x81
  2823. #define VK_F19            0x82
  2824. #define VK_F20            0x83
  2825. #define VK_F21            0x84
  2826. #define VK_F22            0x85
  2827. #define VK_F23            0x86
  2828. #define VK_F24            0x87
  2829.  
  2830. #define VK_NUMLOCK        0x90
  2831. #define VK_SCROLL         0x91
  2832.  
  2833. /*
  2834.  * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  2835.  * Used only as parameters to GetAsyncKeyState() and GetKeyState().
  2836.  * No other API or message will distinguish left and right keys in this way.
  2837.  */
  2838. #define VK_LSHIFT         0xA0
  2839. #define VK_RSHIFT         0xA1
  2840. #define VK_LCONTROL       0xA2
  2841. #define VK_RCONTROL       0xA3
  2842. #define VK_LMENU          0xA4
  2843. #define VK_RMENU          0xA5
  2844.  
  2845. #ifdef    JAPAN
  2846. #define    VK_EXTEND_BSLASH  0xE2
  2847. #else
  2848. #define    VK_OEM_102        0xE2
  2849. #endif
  2850.  
  2851. #define VK_ATTN           0xF6
  2852. #define VK_CRSEL          0xF7
  2853. #define VK_EXSEL          0xF8
  2854. #define VK_EREOF          0xF9
  2855. #define VK_PLAY           0xFA
  2856. #define VK_ZOOM           0xFB
  2857. #define VK_NONAME         0xFC
  2858. #define VK_PA1            0xFD
  2859. #define VK_OEM_CLEAR      0xFE
  2860.  
  2861.  
  2862. #define VK_SEMICOLON        0xBA
  2863. #define VK_EQUAL            0xBB
  2864. #define VK_COMMA            0xBC
  2865. #define VK_HYPHEN            0xBD
  2866. #define VK_PERIOD            0xBE
  2867. #define VK_SLASH            0xBF
  2868. #define VK_BACKQUOTE        0xC0
  2869.  
  2870. #define VK_LBRACKET            0xDB
  2871. #define VK_BACKSLASH        0xDC
  2872. #define VK_RBRACKET            0xDD
  2873. #define VK_APOSTROPHE        0xDE
  2874. #define VK_OFF              0xDF
  2875.  
  2876. // @CESYSGEN ENDIF
  2877.  
  2878.  
  2879.  
  2880. // @CESYSGEN IF GWES_STCCTL
  2881. // Static control styles, messages and notifications
  2882. #define SS_LEFT             0x00000000L
  2883. #define SS_CENTER           0x00000001L
  2884. #define SS_RIGHT        0x00000002L
  2885. #define SS_ICON         0x00000003L
  2886. #define SS_LEFTNOWORDWRAP   0x0000000CL
  2887. #define SS_BITMAP           0x0000000EL
  2888. #define SS_NOPREFIX         0x00000080L
  2889. #define SS_CENTERIMAGE      0x00000200L
  2890. #if(WINVER >= 0x0400)
  2891. #define SS_NOTIFY           0x00000100L
  2892. #define STN_CLICKED         0
  2893. #define STN_ENABLE          2
  2894. #define STN_DISABLE         3
  2895. #endif // WINVER >= 0x0400
  2896.  
  2897. #define STM_SETIMAGE        0x0172
  2898. #define STM_GETIMAGE        0x0173
  2899. // @CESYSGEN ENDIF
  2900.  
  2901. /*
  2902.  * EDITWORDBREAKPROC code values
  2903.  */
  2904. #define WB_LEFT            0
  2905. #define WB_RIGHT           1
  2906. #define WB_ISDELIMITER     2
  2907.  
  2908. typedef int (CALLBACK* EDITWORDBREAKPROC)(LPWSTR lpch, int ichCurrent, int cch, int code);
  2909.  
  2910. // @CESYSGEN IF GWES_BTNCTL
  2911. // Button control styles, messages and notifications
  2912. #define BS_PUSHBUTTON       0x00000000L
  2913. #define BS_DEFPUSHBUTTON    0x00000001L
  2914. #define BS_CHECKBOX         0x00000002L
  2915. #define BS_AUTOCHECKBOX     0x00000003L
  2916. #define BS_RADIOBUTTON      0x00000004L
  2917. #define BS_3STATE           0x00000005L
  2918. #define BS_AUTO3STATE       0x00000006L
  2919. #define BS_GROUPBOX         0x00000007L
  2920. #define BS_AUTORADIOBUTTON  0x00000009L
  2921. #define BS_OWNERDRAW        0x0000000BL
  2922. #define BS_LEFTTEXT         0x00000020L
  2923. #if (WINVER >= 0x0400)
  2924. #define BS_TEXT             0x00000000L
  2925. #define BS_ICON             0x00000040L
  2926. #define BS_BITMAP           0x00000080L
  2927. #define BS_LEFT             0x00000100L
  2928. #define BS_RIGHT            0x00000200L
  2929. #define BS_CENTER           0x00000300L
  2930. #define BS_TOP              0x00000400L
  2931. #define BS_BOTTOM           0x00000800L
  2932. #define BS_VCENTER          0x00000C00L
  2933. #define BS_PUSHLIKE         0x00001000L
  2934. #define BS_MULTILINE        0x00002000L
  2935. #define BS_NOTIFY           0x00004000L
  2936. #define BS_FLAT             0x00008000L
  2937. #define BS_RIGHTBUTTON      BS_LEFTTEXT
  2938. #endif // WINVER >= 0x0400
  2939.  
  2940. #define BN_CLICKED          0
  2941. #define BN_PAINT            1
  2942. #define BN_HILITE           2
  2943. #define BN_UNHILITE         3
  2944. #define BN_DISABLE          4
  2945. #define BN_DOUBLECLICKED    5
  2946. #if (WINVER >= 0x0400)
  2947. #define BN_PUSHED           BN_HILITE
  2948. #define BN_UNPUSHED         BN_UNHILITE
  2949. #define BN_DBLCLK           BN_DOUBLECLICKED
  2950. #define BN_SETFOCUS         6
  2951. #define BN_KILLFOCUS        7
  2952. #endif // WINVER >= 0x0400
  2953.  
  2954. #define BM_GETCHECK         0x00F0
  2955. #define BM_SETCHECK         0x00F1
  2956. #define BM_GETSTATE         0x00F2
  2957. #define BM_SETSTATE         0x00F3
  2958. #define BM_SETSTYLE         0x00F4
  2959. #if (WINVER >= 0x0400)
  2960. #define BM_CLICK            0x00F5
  2961. #define BM_GETIMAGE         0x00F6
  2962. #define BM_SETIMAGE         0x00F7
  2963.  
  2964. #define BST_UNCHECKED       0x0000
  2965. #define BST_CHECKED         0x0001
  2966. #define BST_INDETERMINATE   0x0002
  2967. #define BST_PUSHED          0x0004
  2968. #define BST_FOCUS           0x0008
  2969. #endif // WINVER >= 0x0400
  2970. // @CESYSGEN ENDIF
  2971.  
  2972. #define SW_SCROLLCHILDREN   0x0001  /* Scroll children within *lprcScroll. */
  2973. #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
  2974. #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  2975.  
  2976.  
  2977. #if(WINVER >= 0x0400)
  2978. typedef struct tagNMHDR
  2979. {
  2980.     HWND  hwndFrom;
  2981.     UINT  idFrom;
  2982.     UINT  code;         // NM_ code
  2983. }   NMHDR;
  2984. typedef NMHDR FAR * LPNMHDR;
  2985. #endif
  2986.  
  2987. /*
  2988.  *  Owner draw control types
  2989.  */
  2990. // @CESYSGEN IF GWES_MENU
  2991. #define ODT_MENU        1
  2992. // @CESYSGEN ENDIF
  2993. #define ODT_LISTBOX     2
  2994. #define ODT_COMBOBOX    3
  2995. #define ODT_BUTTON      4
  2996.  
  2997. /*
  2998.  *  Owner draw actions
  2999.  */
  3000. #define ODA_DRAWENTIRE  0x0001
  3001. #define ODA_SELECT      0x0002
  3002. #define ODA_FOCUS       0x0004
  3003.  
  3004. /*
  3005.  *  Owner draw state
  3006.  */
  3007. #define ODS_SELECTED    0x0001
  3008. #define ODS_GRAYED      0x0002
  3009. #define ODS_DISABLED    0x0004
  3010. #define ODS_CHECKED     0x0008
  3011. #define ODS_FOCUS       0x0010
  3012.  
  3013. /*
  3014.  * MEASUREITEMSTRUCT for ownerdraw
  3015.  */
  3016. typedef struct tagMEASUREITEMSTRUCT {
  3017.     UINT    CtlType;
  3018.     UINT    CtlID;
  3019.     UINT    itemID;
  3020.     UINT    itemWidth;
  3021.     UINT    itemHeight;
  3022.     UINT    itemData;
  3023. } MEASUREITEMSTRUCT, *PMEASUREITEMSTRUCT, *LPMEASUREITEMSTRUCT;
  3024.  
  3025. /*
  3026.  *  DRAWITEMSTRUCT for ownerdraw
  3027.  */
  3028. typedef struct tagDRAWITEMSTRUCT {
  3029.     UINT    CtlType;
  3030.     UINT    CtlID;
  3031.     UINT    itemID;
  3032.     UINT    itemAction;
  3033.     UINT    itemState;
  3034.     HWND    hwndItem;
  3035.     HDC     hDC;
  3036.     RECT    rcItem;
  3037.     DWORD   itemData;
  3038. } DRAWITEMSTRUCT, *PDRAWITEMSTRUCT, *LPDRAWITEMSTRUCT;
  3039.  
  3040. /*
  3041.  * DELETITEMSTRUCT for ownerdraw
  3042.  */
  3043. typedef struct tagDELETITEMSTRUCT {
  3044.     UINT    CtlType;
  3045.     UINT    CtlID;
  3046.     UINT    itemID;
  3047.     HWND    hwndItem;
  3048.     UINT    itemData;
  3049. } DELETEITEMSTRUCT, *PDELETEITEMSTRUCT, *LPDELETEITEMSTRUCT;
  3050.  
  3051. typedef struct tagCOMPAREITEMSTRUCT {
  3052.     UINT    CtlType;
  3053.     UINT    CtlID;
  3054.     HWND    hwndItem;
  3055.     UINT    itemID1;
  3056.     DWORD   itemData1;
  3057.     UINT    itemID2;
  3058.     DWORD   itemData2;
  3059.     DWORD   dwLocaleId;
  3060. } COMPAREITEMSTRUCT, *PCOMPAREITEMSTRUCT, *LPCOMPAREITEMSTRUCT;
  3061.  
  3062.  
  3063. // @CESYSGEN IF GWES_EDCTL
  3064. /*
  3065.  *  Edit Control Styles
  3066.  */
  3067. #define ES_LEFT         0x0000L
  3068. #define ES_CENTER       0x0001L
  3069. #define ES_RIGHT        0x0002L
  3070. #define ES_MULTILINE    0x0004L
  3071. #define ES_UPPERCASE    0x0008L
  3072. #define ES_LOWERCASE    0x0010L
  3073. #define ES_PASSWORD     0x0020L
  3074. #define ES_AUTOVSCROLL  0x0040L
  3075. #define ES_AUTOHSCROLL  0x0080L
  3076. #define ES_NOHIDESEL    0x0100L
  3077. #define ES_COMBOBOX     0x0200L
  3078. #define ES_OEMCONVERT   0x0400L
  3079. #define ES_READONLY     0x0800L
  3080. #define ES_WANTRETURN   0x1000L
  3081. #if(WINVER >= 0x0400)
  3082. #define ES_NUMBER           0x2000L
  3083. #endif /* WINVER >= 0x0400 */
  3084.  
  3085. /*
  3086.  *  Edit control notifications
  3087.  */
  3088. #define EN_SETFOCUS     0x0100
  3089. #define EN_KILLFOCUS    0x0200
  3090. #define EN_CHANGE       0x0300
  3091. #define EN_UPDATE       0x0400
  3092. #define EN_ERRSPACE     0x0500
  3093. #define EN_MAXTEXT      0x0501
  3094. #define EN_HSCROLL      0x0601
  3095. #define EN_VSCROLL      0x0602
  3096.  
  3097. #if(WINVER >= 0x0400)
  3098. /* Edit control EM_SETMARGIN parameters */
  3099. #define EC_LEFTMARGIN       0x0001
  3100. #define EC_RIGHTMARGIN      0x0002
  3101. #define EC_USEFONTINFO      0xffff
  3102. #endif /* WINVER >= 0x0400 */
  3103.  
  3104. /*
  3105.  *  Edit Control Messages
  3106.  */
  3107. #define EM_GETSEL               0x00B0
  3108. #define EM_SETSEL               0x00B1
  3109. #define EM_GETRECT              0x00B2
  3110. #define EM_SETRECT              0x00B3
  3111. #define EM_SETRECTNP            0x00B4
  3112. #define EM_SCROLL               0x00B5
  3113. #define EM_LINESCROLL           0x00B6
  3114. #define EM_SCROLLCARET          0x00B7
  3115. #define EM_GETMODIFY            0x00B8
  3116. #define EM_SETMODIFY            0x00B9
  3117. #define EM_GETLINECOUNT         0x00BA
  3118. #define EM_LINEINDEX            0x00BB
  3119. #define EM_SETHANDLE            0x00BC
  3120. #define EM_GETHANDLE            0x00BD
  3121. #define EM_GETTHUMB             0x00BE
  3122. #define EM_LINELENGTH           0x00C1
  3123. #define EM_REPLACESEL           0x00C2
  3124. #define EM_GETLINE              0x00C4
  3125. #define EM_LIMITTEXT            0x00C5
  3126. #define EM_CANUNDO              0x00C6
  3127. #define EM_UNDO                 0x00C7
  3128. #define EM_FMTLINES             0x00C8
  3129. #define EM_LINEFROMCHAR         0x00C9
  3130. #define EM_SETTABSTOPS          0x00CB
  3131. #define EM_SETPASSWORDCHAR      0x00CC
  3132. #define EM_EMPTYUNDOBUFFER      0x00CD
  3133. #define EM_GETFIRSTVISIBLELINE  0x00CE
  3134. #define EM_SETREADONLY          0x00CF
  3135. #define EM_SETWORDBREAKPROC     0x00D0
  3136. #define EM_GETWORDBREAKPROC     0x00D1
  3137. #define EM_GETPASSWORDCHAR      0x00D2
  3138. #if(WINVER >= 0x0400)
  3139. #define EM_SETMARGINS           0x00D3
  3140. #define EM_GETMARGINS           0x00D4
  3141. #define EM_SETLIMITTEXT         EM_LIMITTEXT   /* ;win40 Name change */
  3142. #define EM_GETLIMITTEXT         0x00D5
  3143. #define EM_POSFROMCHAR          0x00D6
  3144. #define EM_CHARFROMPOS          0x00D7
  3145. #endif /* WINVER >= 0x0400 */
  3146. // @CESYSGEN ENDIF
  3147.  
  3148.  
  3149. // @CESYSGEN IF GWES_SCBCTL
  3150. #ifndef NOSCROLL
  3151. /*
  3152.  * Scroll Bar Constants
  3153.  */
  3154. #define SB_HORZ             0
  3155. #define SB_VERT             1
  3156. #define SB_CTL              2
  3157. #define SB_BOTH             3
  3158.  
  3159. /*
  3160.  * Scroll Bar Commands
  3161.  */
  3162. #define SB_LINEUP           0
  3163. #define SB_LINELEFT         0
  3164. #define SB_LINEDOWN         1
  3165. #define SB_LINERIGHT        1
  3166. #define SB_PAGEUP           2
  3167. #define SB_PAGELEFT         2
  3168. #define SB_PAGEDOWN         3
  3169. #define SB_PAGERIGHT        3
  3170. #define SB_THUMBPOSITION    4
  3171. #define SB_THUMBTRACK       5
  3172. #define SB_TOP              6
  3173. #define SB_LEFT             6
  3174. #define SB_BOTTOM           7
  3175. #define SB_RIGHT            7
  3176. #define SB_ENDSCROLL        8
  3177.  
  3178. #endif /* !NOSCROLL */
  3179.  
  3180. /*
  3181.  * Scroll Bar Styles
  3182.  */
  3183. #define SBS_HORZ                    0x0000L
  3184. #define SBS_VERT                    0x0001L
  3185. #define SBS_TOPALIGN                0x0002L
  3186. #define SBS_LEFTALIGN               0x0002L
  3187. #define SBS_BOTTOMALIGN             0x0004L
  3188. #define SBS_RIGHTALIGN              0x0004L
  3189. #define SBS_SIZEBOXTOPLEFTALIGN     0x0002L
  3190. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  3191. #define SBS_SIZEBOX                 0x0008L
  3192. #if(WINVER >= 0x0400)
  3193. #define SBS_SIZEGRIP                0x0010L
  3194. #endif /* WINVER >= 0x0400 */
  3195.  
  3196. /*
  3197.  * Scroll bar messages
  3198.  */
  3199.  
  3200. #if(WINVER >= 0x0400)
  3201. #define SBM_SETSCROLLINFO           0x00E9
  3202. #define SBM_GETSCROLLINFO           0x00EA
  3203.  
  3204. #define SIF_RANGE           0x0001
  3205. #define SIF_PAGE            0x0002
  3206. #define SIF_POS             0x0004
  3207. #define SIF_DISABLENOSCROLL 0x0008
  3208. #define SIF_TRACKPOS        0x0010
  3209. #define SIF_ALL             (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
  3210.  
  3211. typedef struct tagSCROLLINFO
  3212. {
  3213.     UINT    cbSize;
  3214.     UINT    fMask;
  3215.     int     nMin;
  3216.     int     nMax;
  3217.     UINT    nPage;
  3218.     int     nPos;
  3219.     int     nTrackPos;
  3220. }   SCROLLINFO, FAR *LPSCROLLINFO;
  3221. typedef SCROLLINFO CONST FAR *LPCSCROLLINFO;
  3222.  
  3223. WINUSERAPI int     WINAPI SetScrollInfo(HWND, int, LPCSCROLLINFO, BOOL);
  3224. WINUSERAPI BOOL    WINAPI GetScrollInfo(HWND, int, LPSCROLLINFO);
  3225. #endif /* WINVER >= 0x0400 */
  3226. // @CESYSGEN ENDIF
  3227.  
  3228. #ifndef NOKEYSTATES
  3229. /*
  3230.  * Key State Masks for Mouse Messages
  3231.  */
  3232. #define MK_LBUTTON          0x0001
  3233. #define MK_RBUTTON          0x0002
  3234. #define MK_SHIFT            0x0004
  3235. #define MK_CONTROL          0x0008
  3236. #define MK_MBUTTON          0x0010
  3237.  
  3238. #endif /* !NOKEYSTATES */
  3239.  
  3240. // @CESYSGEN IF GWES_DLGMGR
  3241. /*
  3242.  *  Dialog Stuff
  3243.  */
  3244. #ifndef NOCTLMGR
  3245.  
  3246. /*
  3247.  * WARNING:
  3248.  * The following structures must NOT be DWORD padded because they are
  3249.  * followed by strings, etc that do not have to be DWORD aligned.
  3250.  */
  3251. #include "pshpack2.h"
  3252.  
  3253. /*
  3254.  * Dialog Box Command IDs
  3255.  */
  3256. #define IDOK                1
  3257. #define IDCANCEL            2
  3258. #define IDABORT             3
  3259. #define IDRETRY             4
  3260. #define IDIGNORE            5
  3261. #define IDYES               6
  3262. #define IDNO                7
  3263. #if(WINVER >= 0x0400)
  3264. #define IDCLOSE         8
  3265. #define IDHELP          9
  3266. #endif /* WINVER >= 0x0400 */
  3267.  
  3268. /*
  3269.  * Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  3270.  */
  3271. #define DWL_MSGRESULT   0
  3272. #define DWL_DLGPROC     4
  3273. #define DWL_USER        8
  3274.  
  3275. /*
  3276.  * original NT 32 bit dialog template:
  3277.  */
  3278. typedef struct {
  3279.     DWORD style;
  3280.     DWORD dwExtendedStyle;
  3281.     WORD cdit;
  3282.     short x;
  3283.     short y;
  3284.     short cx;
  3285.     short cy;
  3286. } DLGTEMPLATE;
  3287. typedef DLGTEMPLATE *LPDLGTEMPLATEA;
  3288. typedef DLGTEMPLATE *LPDLGTEMPLATEW;
  3289. #ifdef UNICODE
  3290. typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
  3291. #else
  3292. typedef LPDLGTEMPLATEA LPDLGTEMPLATE;
  3293. #endif // UNICODE
  3294. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
  3295. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
  3296. #ifdef UNICODE
  3297. typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
  3298. #else
  3299. typedef LPCDLGTEMPLATEA LPCDLGTEMPLATE;
  3300. #endif // UNICODE
  3301.  
  3302. /*
  3303.  * 32 bit Dialog item template.
  3304.  */
  3305. typedef struct {
  3306.     DWORD style;
  3307.     DWORD dwExtendedStyle;
  3308.     short x;
  3309.     short y;
  3310.     short cx;
  3311.     short cy;
  3312.     WORD id;
  3313. } DLGITEMTEMPLATE;
  3314. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
  3315. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
  3316. #ifdef UNICODE
  3317. typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
  3318. #else
  3319. typedef PDLGITEMTEMPLATEA PDLGITEMTEMPLATE;
  3320. #endif // UNICODE
  3321. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
  3322. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
  3323. #ifdef UNICODE
  3324. typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
  3325. #else
  3326. typedef LPDLGITEMTEMPLATEA LPDLGITEMTEMPLATE;
  3327. #endif // UNICODE
  3328.  
  3329. #include "poppack.h" /* Resume normal packing */
  3330.  
  3331. /*
  3332.  * Dialog Styles
  3333.  */
  3334. #define DS_ABSALIGN         0x01L
  3335. #define DS_SYSMODAL         0x02L
  3336. #define DS_LOCALEDIT        0x20L   /* Edit items get Local storage. */
  3337. #define DS_SETFONT          0x40L   /* User specified font for Dlg controls */
  3338. #define DS_MODALFRAME       0x80L   /* Can be combined with WS_CAPTION  */
  3339. #define DS_NOIDLEMSG        0x100L  /* WM_ENTERIDLE message will not be sent */
  3340. #define DS_SETFOREGROUND    0x200L  /* not in win3.1 */
  3341.  
  3342. #if(WINVER >= 0x0400)
  3343. #define DS_3DLOOK           0x0004L
  3344. #define DS_FIXEDSYS         0x0008L
  3345. #define DS_NOFAILCREATE     0x0010L
  3346. #define DS_CONTROL          0x0400L
  3347. #define DS_CENTER           0x0800L
  3348. #define DS_CENTERMOUSE      0x1000L
  3349. #define DS_CONTEXTHELP      0x2000L
  3350.  
  3351. #endif /* WINVER >= 0x0400 */
  3352.  
  3353. #define DM_GETDEFID         (WM_USER+0)
  3354. #define DM_SETDEFID         (WM_USER+1)
  3355.  
  3356.  
  3357. /*
  3358.  * Returned in HIWORD() of DM_GETDEFID result if msg is supported
  3359.  */
  3360. #define DC_HASDEFID         0x534B
  3361.  
  3362. #define DLGC_WANTARROWS         0x0001
  3363. #define DLGC_WANTTAB            0x0002
  3364. #define DLGC_WANTALLKEYS        0x0004
  3365. #define DLGC_WANTMESSAGE        0x0004
  3366. #define DLGC_HASSETSEL          0x0008
  3367. #define DLGC_DEFPUSHBUTTON      0x0010
  3368. #define DLGC_UNDEFPUSHBUTTON    0x0020
  3369. #define DLGC_RADIOBUTTON        0x0040
  3370. #define DLGC_WANTCHARS          0x0080
  3371. #define DLGC_STATIC             0x0100
  3372. #define DLGC_BUTTON             0x2000
  3373.  
  3374.  
  3375. // @CESYSGEN IF GWES_LBCTL
  3376. /*
  3377.  * Listbox Return Values
  3378.  */
  3379. #define LB_OKAY             0
  3380. #define LB_ERR              (-1)
  3381. #define LB_ERRSPACE         (-2)
  3382.  
  3383. /*
  3384. **  The idStaticPath parameter to DlgDirList can have the following values
  3385. **  ORed if the list box should show other details of the files along with
  3386. **  the name of the files;
  3387. */
  3388.                                   /* all other details also will be returned */
  3389.  
  3390. /*
  3391.  * Listbox Notification Codes
  3392.  */
  3393. #define LBN_ERRSPACE        (-2)
  3394. #define LBN_SELCHANGE       1
  3395. #define LBN_DBLCLK          2
  3396. #define LBN_SELCANCEL       3
  3397. #define LBN_SETFOCUS        4
  3398. #define LBN_KILLFOCUS       5
  3399.  
  3400. #ifndef NOWINMESSAGES
  3401.  
  3402. /*
  3403.  * Listbox messages
  3404.  */
  3405. #define LB_ADDSTRING            0x0180
  3406. #define LB_INSERTSTRING         0x0181
  3407. #define LB_DELETESTRING         0x0182
  3408. #define LB_SELITEMRANGEEX       0x0183
  3409. #define LB_RESETCONTENT         0x0184
  3410. #define LB_SETSEL               0x0185
  3411. #define LB_SETCURSEL            0x0186
  3412. #define LB_GETSEL               0x0187
  3413. #define LB_GETCURSEL            0x0188
  3414. #define LB_GETTEXT              0x0189
  3415. #define LB_GETTEXTLEN           0x018A
  3416. #define LB_GETCOUNT             0x018B
  3417. #define LB_SELECTSTRING         0x018C
  3418. #define LB_DIR                  0x018D
  3419. #define LB_GETTOPINDEX          0x018E
  3420. #define LB_FINDSTRING           0x018F
  3421. #define LB_GETSELCOUNT          0x0190
  3422. #define LB_GETSELITEMS          0x0191
  3423. #define LB_SETTABSTOPS          0x0192
  3424. #define LB_GETHORIZONTALEXTENT  0x0193
  3425. #define LB_SETHORIZONTALEXTENT  0x0194
  3426. #define LB_SETCOLUMNWIDTH       0x0195
  3427. #define LB_ADDFILE              0x0196
  3428. #define LB_SETTOPINDEX          0x0197
  3429. #define LB_GETITEMRECT          0x0198
  3430. #define LB_GETITEMDATA          0x0199
  3431. #define LB_SETITEMDATA          0x019A
  3432. #define LB_SELITEMRANGE         0x019B
  3433. #define LB_SETANCHORINDEX       0x019C
  3434. #define LB_GETANCHORINDEX       0x019D
  3435. #define LB_SETCARETINDEX        0x019E
  3436. #define LB_GETCARETINDEX        0x019F
  3437. #define LB_SETITEMHEIGHT        0x01A0
  3438. #define LB_GETITEMHEIGHT        0x01A1
  3439. #define LB_FINDSTRINGEXACT      0x01A2
  3440. #define LB_SETLOCALE            0x01A5
  3441. #define LB_GETLOCALE            0x01A6
  3442. #define LB_SETCOUNT             0x01A7
  3443. #if(WINVER >= 0x0400)
  3444. #define LB_INITSTORAGE          0x01A8
  3445. #define LB_ITEMFROMPOINT        0x01A9
  3446. #define LB_MULTIPLEADDSTRING    0x01B1
  3447. #endif /* WINVER >= 0x0400 */
  3448. #if(WINVER >= 0x0400)
  3449. #define LB_MSGMAX               0x01B1
  3450. #else
  3451. #define LB_MSGMAX               0x01A8
  3452. #endif
  3453.  
  3454. #endif /* !NOWINMESSAGES */
  3455.  
  3456. /*
  3457.  * Listbox Styles
  3458.  */
  3459. #define LBS_NOTIFY            0x0001L
  3460. #define LBS_SORT              0x0002L
  3461. #define LBS_NOREDRAW          0x0004L
  3462. #define LBS_MULTIPLESEL       0x0008L
  3463. #define LBS_HASSTRINGS        0x0040L
  3464. #define LBS_USETABSTOPS       0x0080L
  3465. #define LBS_NOINTEGRALHEIGHT  0x0100L
  3466. #define LBS_MULTICOLUMN       0x0200L
  3467. #define LBS_WANTKEYBOARDINPUT 0x0400L
  3468. #define LBS_EXTENDEDSEL       0x0800L
  3469. #define LBS_DISABLENOSCROLL   0x1000L
  3470. #define LBS_NODATA            0x2000L
  3471. #if(WINVER >= 0x0400)
  3472. #define LBS_NOSEL             0x4000L
  3473. #endif /* WINVER >= 0x0400 */
  3474. #define LBS_STANDARD          (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  3475.  
  3476. // Extended styles
  3477. #define LBS_EX_CONSTSTRINGDATA   0x00000002L
  3478. // @CESYSGEN ENDIF
  3479.  
  3480.  
  3481. // @CESYSGEN IF GWES_CMBCTL
  3482. /*
  3483.  * Combo Box return Values
  3484.  */
  3485. #define CB_OKAY             0
  3486. #define CB_ERR              (-1)
  3487. #define CB_ERRSPACE         (-2)
  3488.  
  3489. /*
  3490.  * Combo Box Notification Codes
  3491.  */
  3492. #define CBN_ERRSPACE        (-1)
  3493. #define CBN_SELCHANGE       1
  3494. #define CBN_DBLCLK          2
  3495. #define CBN_SETFOCUS        3
  3496. #define CBN_KILLFOCUS       4
  3497. #define CBN_EDITCHANGE      5
  3498. #define CBN_EDITUPDATE      6
  3499. #define CBN_DROPDOWN        7
  3500. #define CBN_CLOSEUP         8
  3501. #define CBN_SELENDOK        9
  3502. #define CBN_SELENDCANCEL    10
  3503.  
  3504. /*
  3505.  * Combo Box styles
  3506.  */
  3507. #define CBS_DROPDOWN          0x0002L
  3508. #define CBS_DROPDOWNLIST      0x0003L
  3509. #define CBS_AUTOHSCROLL       0x0040L
  3510. #define CBS_OEMCONVERT        0x0080L
  3511. #define CBS_SORT              0x0100L
  3512. #define CBS_HASSTRINGS        0x0200L
  3513. #define CBS_NOINTEGRALHEIGHT  0x0400L
  3514. #define CBS_DISABLENOSCROLL   0x0800L
  3515. #if(WINVER >= 0x0400)
  3516. #define CBS_UPPERCASE           0x2000L
  3517. #define CBS_LOWERCASE           0x4000L
  3518. #endif /* WINVER >= 0x0400 */
  3519.  
  3520. // Extended combo box styles
  3521. #define CBS_EX_CONSTSTRINGDATA  0x00000002L
  3522.  
  3523. /*
  3524.  * Combo Box messages
  3525.  */
  3526. #define CB_GETEDITSEL               0x0140
  3527. #define CB_LIMITTEXT                0x0141
  3528. #define CB_SETEDITSEL               0x0142
  3529. #define CB_ADDSTRING                0x0143
  3530. #define CB_DELETESTRING             0x0144
  3531. #define CB_DIR                      0x0145
  3532. #define CB_GETCOUNT                 0x0146
  3533. #define CB_GETCURSEL                0x0147
  3534. #define CB_GETLBTEXT                0x0148
  3535. #define CB_GETLBTEXTLEN             0x0149
  3536. #define CB_INSERTSTRING             0x014A
  3537. #define CB_RESETCONTENT             0x014B
  3538. #define CB_FINDSTRING               0x014C
  3539. #define CB_SELECTSTRING             0x014D
  3540. #define CB_SETCURSEL                0x014E
  3541. #define CB_SHOWDROPDOWN             0x014F
  3542. #define CB_GETITEMDATA              0x0150
  3543. #define CB_SETITEMDATA              0x0151
  3544. #define CB_GETDROPPEDCONTROLRECT    0x0152
  3545. #define CB_SETITEMHEIGHT            0x0153
  3546. #define CB_GETITEMHEIGHT            0x0154
  3547. #define CB_SETEXTENDEDUI            0x0155
  3548. #define CB_GETEXTENDEDUI            0x0156
  3549. #define CB_GETDROPPEDSTATE          0x0157
  3550. #define CB_FINDSTRINGEXACT          0x0158
  3551. #define CB_SETLOCALE                0x0159
  3552. #define CB_GETLOCALE                0x015A
  3553. #if(WINVER >= 0x0400)
  3554. #define CB_GETTOPINDEX              0x015b
  3555. #define CB_SETTOPINDEX              0x015c
  3556. #define CB_GETHORIZONTALEXTENT      0x015d
  3557. #define CB_SETHORIZONTALEXTENT      0x015e
  3558. #define CB_GETDROPPEDWIDTH          0x015f
  3559. #define CB_SETDROPPEDWIDTH          0x0160
  3560. #define CB_INITSTORAGE              0x0161
  3561. #define CB_MULTIPLEADDSTRING        0x0163
  3562. #endif /* WINVER >= 0x0400 */
  3563. #if(WINVER >= 0x0400)
  3564. #define CB_MSGMAX                   0x0163
  3565. #else
  3566. #define CB_MSGMAX                   0x015B
  3567. #endif
  3568. // @CESYSGEN ENDIF
  3569.  
  3570.  
  3571.  
  3572.  
  3573. WINUSERAPI
  3574. BOOL
  3575. WINAPI
  3576. IsDialogMessageA(
  3577.     HWND hDlg,
  3578.     LPMSG lpMsg);
  3579.  
  3580. WINUSERAPI
  3581. BOOL
  3582. WINAPI
  3583. IsDialogMessageW(
  3584.     HWND hDlg,
  3585.     LPMSG lpMsg);
  3586.  
  3587. #ifdef UNICODE
  3588. #define IsDialogMessage  IsDialogMessageW
  3589. #else
  3590. #define IsDialogMessage  IsDialogMessageA
  3591. #endif // !UNICODE
  3592.  
  3593. WINUSERAPI
  3594. HWND
  3595. WINAPI
  3596. CreateDialogIndirectParamA(
  3597.     HINSTANCE hInstance,
  3598.     LPCDLGTEMPLATEA lpTemplate,
  3599.     HWND hWndParent,
  3600.     DLGPROC lpDialogFunc,
  3601.     LPARAM dwInitParam);
  3602. WINUSERAPI
  3603. HWND
  3604. WINAPI
  3605. CreateDialogIndirectParamW(
  3606.     HINSTANCE hInstance,
  3607.     LPCDLGTEMPLATEW lpTemplate,
  3608.     HWND hWndParent,
  3609.     DLGPROC lpDialogFunc,
  3610.     LPARAM dwInitParam);
  3611. #ifdef UNICODE
  3612. #define CreateDialogIndirectParam  CreateDialogIndirectParamW
  3613. #else
  3614. #define CreateDialogIndirectParam  CreateDialogIndirectParamA
  3615. #endif // !UNICODE
  3616.  
  3617.  
  3618. #define CreateDialogIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3619.     CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3620. #define CreateDialogIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3621.     CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3622. #ifdef UNICODE
  3623. #define CreateDialogIndirect  CreateDialogIndirectW
  3624. #else
  3625. #define CreateDialogIndirect  CreateDialogIndirectA
  3626. #endif // !UNICODE
  3627.  
  3628. #define CreateDialogParamA(hInstance, lpszDlgName, hwndOwner, lpfnDialog, lParam)    \
  3629.     CreateDialogIndirectParamA(hInstance,   \
  3630.         (LPCDLGTEMPLATEA)LoadResource(hInstance, FindResource(hInstance, lpszDlgName, RT_DIALOG)), \
  3631.         hwndOwner, lpfnDialog, lParam)
  3632. #define CreateDialogParamW(hInstance, lpszDlgName, hwndOwner, lpfnDialog, lParam)    \
  3633.     CreateDialogIndirectParamW(hInstance,   \
  3634.         (LPCDLGTEMPLATEW)LoadResource(hInstance, FindResource(hInstance, lpszDlgName, RT_DIALOG)), \
  3635.         hwndOwner, lpfnDialog, lParam)
  3636. #ifdef UNICODE
  3637. #define CreateDialogParam  CreateDialogParamW
  3638. #else
  3639. #define CreateDialogParam  CreateDialogParamA
  3640. #endif // !UNICODE
  3641.  
  3642. #define CreateDialogA(hInstance, lpName, hWndParent, lpDialogFunc) \
  3643.     CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3644. #define CreateDialogW(hInstance, lpName, hWndParent, lpDialogFunc) \
  3645.     CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3646. #ifdef UNICODE
  3647. #define CreateDialog  CreateDialogW
  3648. #else
  3649. #define CreateDialog  CreateDialogA
  3650. #endif // !UNICODE
  3651.  
  3652. int
  3653. WINAPI
  3654. DialogBoxIndirectParamA(
  3655.     HINSTANCE hInstance,
  3656.     LPCDLGTEMPLATEA hDialogTemplate,
  3657.     HWND hWndParent ,
  3658.     DLGPROC lpDialogFunc,
  3659.     LPARAM dwInitParam);
  3660. int
  3661. WINAPI
  3662. DialogBoxIndirectParamW(
  3663.     HINSTANCE hInstance,
  3664.     LPCDLGTEMPLATEW hDialogTemplate,
  3665.     HWND hWndParent ,
  3666.     DLGPROC lpDialogFunc,
  3667.     LPARAM dwInitParam);
  3668. #ifdef UNICODE
  3669. #define DialogBoxIndirectParam  DialogBoxIndirectParamW
  3670. #else
  3671. #define DialogBoxIndirectParam  DialogBoxIndirectParamA
  3672. #endif // !UNICODE
  3673.  
  3674. #define DialogBoxIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3675.     DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3676. #define DialogBoxIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3677.     DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3678. #ifdef UNICODE
  3679. #define DialogBoxIndirect  DialogBoxIndirectW
  3680. #else
  3681. #define DialogBoxIndirect  DialogBoxIndirectA
  3682. #endif // !UNICODE
  3683.  
  3684. #define DialogBoxParamA(hInstance, lpszDlgName, hwndOwner, lpfnDialog, lParam)    \
  3685.     DialogBoxIndirectParamA(hInstance,   \
  3686.         (LPCDLGTEMPLATEA)LoadResource(hInstance, FindResource(hInstance, lpszDlgName, RT_DIALOG)), \
  3687.         hwndOwner, lpfnDialog, lParam)
  3688. #define DialogBoxParamW(hInstance, lpszDlgName, hwndOwner, lpfnDialog, lParam)    \
  3689.     DialogBoxIndirectParamW(hInstance,   \
  3690.         (LPCDLGTEMPLATEW)LoadResource(hInstance, FindResource(hInstance, lpszDlgName, RT_DIALOG)), \
  3691.         hwndOwner, lpfnDialog, lParam)
  3692. #ifdef UNICODE
  3693. #define DialogBoxParam  DialogBoxParamW
  3694. #else
  3695. #define DialogBoxParam  DialogBoxParamA
  3696. #endif // !UNICODE
  3697.  
  3698. #define DialogBoxA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3699.     DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3700. #define DialogBoxW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3701.     DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3702. #ifdef UNICODE
  3703. #define DialogBox  DialogBoxW
  3704. #else
  3705. #define DialogBox  DialogBoxA
  3706. #endif // !UNICODE
  3707.  
  3708. BOOL
  3709. WINAPI
  3710. EndDialog(
  3711.     HWND hDlg,
  3712.     int nResult);
  3713.  
  3714. HWND
  3715. WINAPI
  3716. GetNextDlgGroupItem (
  3717.     HWND hDlg,
  3718.     HWND hCtl,
  3719.     BOOL bPrevious
  3720.     );
  3721.  
  3722. HWND
  3723. WINAPI
  3724. GetNextDlgTabItem (
  3725.     HWND hDlg,
  3726.     HWND hCtl,
  3727.     BOOL bPrevious
  3728.     );
  3729.  
  3730. int
  3731. WINAPI
  3732. GetDlgCtrlID (
  3733.     HWND hWnd
  3734.     );
  3735.  
  3736. long
  3737. WINAPI
  3738. GetDialogBaseUnits(
  3739.     VOID
  3740.     );
  3741.  
  3742. BOOL
  3743. WINAPI
  3744. MapDialogRect (
  3745.     HWND hwnd,
  3746.     LPRECT prc
  3747.     );
  3748.  
  3749.  
  3750. HWND
  3751. WINAPI
  3752. GetDlgItem (
  3753.     HWND hDlg,
  3754.     int  iCtrlID
  3755.     );
  3756.  
  3757. WINUSERAPI
  3758. LRESULT
  3759. WINAPI
  3760. DefDlgProcA(
  3761.     HWND hDlg,
  3762.     UINT Msg,
  3763.     WPARAM wParam,
  3764.     LPARAM lParam);
  3765. WINUSERAPI
  3766. LRESULT
  3767. WINAPI
  3768. DefDlgProcW(
  3769.     HWND hDlg,
  3770.     UINT Msg,
  3771.     WPARAM wParam,
  3772.     LPARAM lParam);
  3773. #ifdef UNICODE
  3774. #define DefDlgProc  DefDlgProcW
  3775. #else
  3776. #define DefDlgProc  DefDlgProcA
  3777. #endif // !UNICODE
  3778.  
  3779.  
  3780. /*
  3781.  * Window extra bytes needed for private dialog classes.
  3782.  */
  3783. #define DLGWINDOWEXTRA 32
  3784.  
  3785. WINUSERAPI
  3786. BOOL
  3787. WINAPI
  3788. SetDlgItemInt(
  3789.     HWND hDlg,
  3790.     int nIDDlgItem,
  3791.     UINT uValue,
  3792.     BOOL bSigned);
  3793.  
  3794. WINUSERAPI
  3795. UINT
  3796. WINAPI
  3797. GetDlgItemInt(
  3798.     HWND hDlg,
  3799.     int nIDDlgItem,
  3800.     BOOL *lpTranslated,
  3801.     BOOL bSigned);
  3802.  
  3803. BOOL
  3804. WINAPI
  3805. CheckRadioButton(
  3806.     HWND hDlg,
  3807.     int nIDFirstButton,
  3808.     int nIDLastButton,
  3809.     int nIDCheckButton);
  3810.  
  3811. WINUSERAPI
  3812. LONG
  3813. WINAPI
  3814. SendDlgItemMessageA(
  3815.     HWND hDlg,
  3816.     int nIDDlgItem,
  3817.     UINT Msg,
  3818.     WPARAM wParam,
  3819.     LPARAM lParam);
  3820. WINUSERAPI
  3821. LONG
  3822. WINAPI
  3823. SendDlgItemMessageW(
  3824.     HWND hDlg,
  3825.     int nIDDlgItem,
  3826.     UINT Msg,
  3827.     WPARAM wParam,
  3828.     LPARAM lParam);
  3829. #ifdef UNICODE
  3830. #define SendDlgItemMessage  SendDlgItemMessageW
  3831. #else
  3832. #define SendDlgItemMessage  SendDlgItemMessageA
  3833. #endif // !UNICODE
  3834.  
  3835. WINUSERAPI
  3836. BOOL
  3837. WINAPI
  3838. SetDlgItemTextA(
  3839.     HWND hDlg,
  3840.     int nIDDlgItem,
  3841.     LPCSTR lpString);
  3842. WINUSERAPI
  3843. BOOL
  3844. WINAPI
  3845. SetDlgItemTextW(
  3846.     HWND hDlg,
  3847.     int nIDDlgItem,
  3848.     LPCWSTR lpString);
  3849. #ifdef UNICODE
  3850. #define SetDlgItemText  SetDlgItemTextW
  3851. #else
  3852. #define SetDlgItemText  SetDlgItemTextA
  3853. #endif // !UNICODE
  3854.  
  3855. WINUSERAPI
  3856. UINT
  3857. WINAPI
  3858. GetDlgItemTextA(
  3859.     HWND hDlg,
  3860.     int nIDDlgItem,
  3861.     LPSTR lpString,
  3862.     int nMaxCount);
  3863. WINUSERAPI
  3864. UINT
  3865. WINAPI
  3866. GetDlgItemTextW(
  3867.     HWND hDlg,
  3868.     int nIDDlgItem,
  3869.     LPWSTR lpString,
  3870.     int nMaxCount);
  3871. #ifdef UNICODE
  3872. #define GetDlgItemText  GetDlgItemTextW
  3873. #else
  3874. #define GetDlgItemText  GetDlgItemTextA
  3875. #endif // !UNICODE
  3876.  
  3877. #endif // !NOCTLMGR
  3878. // @CESYSGEN ENDIF GWES_DLGMGR
  3879.  
  3880.  
  3881.  
  3882. /*
  3883.  * Clipboard Manager Functions
  3884.  */
  3885.  
  3886. // @CESYSGEN IF GWES_CLIPBD
  3887. WINUSERAPI
  3888. BOOL
  3889. WINAPI
  3890. OpenClipboard(
  3891.     HWND hWndNewOwner);
  3892.  
  3893. WINUSERAPI
  3894. BOOL
  3895. WINAPI
  3896. CloseClipboard(
  3897.     VOID);
  3898.  
  3899. WINUSERAPI
  3900. HWND
  3901. WINAPI
  3902. GetClipboardOwner(
  3903.     VOID);
  3904.  
  3905. WINUSERAPI
  3906. HANDLE
  3907. WINAPI
  3908. SetClipboardData(
  3909.     UINT uFormat,
  3910.     HANDLE hMem);
  3911.  
  3912. WINUSERAPI
  3913. HANDLE
  3914. WINAPI
  3915.     GetClipboardData(
  3916.     UINT uFormat);
  3917.  
  3918. WINUSERAPI
  3919. HANDLE
  3920. WINAPI
  3921.     GetClipboardDataAlloc(
  3922.     UINT uFormat);
  3923.  
  3924.  
  3925. #ifndef UNICODE_ONLY
  3926. WINUSERAPI
  3927. UINT
  3928. WINAPI
  3929. RegisterClipboardFormatA(
  3930.     LPCSTR lpszFormat);
  3931. #endif //!UNICODE_ONLY
  3932. #ifndef ANSI_ONLY
  3933. WINUSERAPI
  3934. UINT
  3935. WINAPI
  3936. RegisterClipboardFormatW(
  3937.     LPCWSTR lpszFormat);
  3938. #endif //!ANSI_ONLY
  3939. #ifdef UNICODE
  3940. #define RegisterClipboardFormat  RegisterClipboardFormatW
  3941. #else
  3942. #define RegisterClipboardFormat  RegisterClipboardFormatA
  3943. #endif // !UNICODE
  3944.  
  3945. WINUSERAPI
  3946. int
  3947. WINAPI
  3948. CountClipboardFormats(
  3949.     VOID);
  3950.  
  3951. WINUSERAPI
  3952. UINT
  3953. WINAPI
  3954. EnumClipboardFormats(
  3955.     UINT format);
  3956.  
  3957. #ifndef UNICODE_ONLY
  3958. WINUSERAPI
  3959. int
  3960. WINAPI
  3961. GetClipboardFormatNameA(
  3962.     UINT format,
  3963.     LPSTR lpszFormatName,
  3964.     int cchMaxCount);
  3965. #endif //!UNICODE_ONLY
  3966. #ifndef ANSI_ONLY
  3967. WINUSERAPI
  3968. int
  3969. WINAPI
  3970. GetClipboardFormatNameW(
  3971.     UINT format,
  3972.     LPWSTR lpszFormatName,
  3973.     int cchMaxCount);
  3974. #endif //!ANSI_ONLY
  3975. #ifdef UNICODE
  3976. #define GetClipboardFormatName  GetClipboardFormatNameW
  3977. #else
  3978. #define GetClipboardFormatName  GetClipboardFormatNameA
  3979. #endif // !UNICODE
  3980.  
  3981. WINUSERAPI
  3982. BOOL
  3983. WINAPI
  3984. EmptyClipboard(
  3985.     VOID);
  3986.  
  3987. WINUSERAPI
  3988. BOOL
  3989. WINAPI
  3990. IsClipboardFormatAvailable(
  3991.     UINT format);
  3992.  
  3993. WINUSERAPI
  3994. int
  3995. WINAPI
  3996. GetPriorityClipboardFormat(
  3997.     UINT *paFormatPriorityList,
  3998.     int cFormats);
  3999.  
  4000. WINUSERAPI
  4001. HWND
  4002. WINAPI
  4003. GetOpenClipboardWindow(
  4004.     VOID);
  4005.  
  4006. // @CESYSGEN ENDIF
  4007.  
  4008.  
  4009.  
  4010. int
  4011. WINAPI
  4012. MapWindowPoints(
  4013.     HWND hwndFrom,
  4014.     HWND hwndTo,
  4015.     LPPOINT lpPoints,
  4016.     UINT cPoints
  4017.     );
  4018.  
  4019.  
  4020. /* 3D Border Styles */
  4021. #define BDR_RAISEDOUTER     0x0001
  4022. #define BDR_SUNKENOUTER     0x0002
  4023. #define BDR_RAISEDINNER     0x0004
  4024. #define BDR_SUNKENINNER     0x0008
  4025.  
  4026. #define BDR_OUTER           0x0003
  4027. #define BDR_INNER           0x000C
  4028. #define BDR_RAISED          0x0005
  4029. #define BDR_SUNKEN          0x000A
  4030.  
  4031. #define EDGE_RAISED         (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  4032. #define EDGE_SUNKEN         (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  4033. #define EDGE_ETCHED         (BDR_SUNKENOUTER | BDR_RAISEDINNER)
  4034. #define EDGE_BUMP           (BDR_RAISEDOUTER | BDR_SUNKENINNER)
  4035.  
  4036. /* Border Flags */
  4037. #define BF_LEFT             0x0001
  4038. #define BF_TOP              0x0002
  4039. #define BF_RIGHT            0x0004
  4040. #define BF_BOTTOM           0x0008
  4041.  
  4042. #define BF_DIAGONAL         0x0010
  4043.  
  4044. #define BF_DIAGONAL_ENDTOPRIGHT     (BF_DIAGONAL | BF_TOP | BF_RIGHT)
  4045. #define BF_DIAGONAL_ENDTOPLEFT      (BF_DIAGONAL | BF_TOP | BF_LEFT)
  4046. #define BF_DIAGONAL_ENDBOTTOMLEFT   (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
  4047. #define BF_DIAGONAL_ENDBOTTOMRIGHT  (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
  4048.  
  4049. #define BF_TOPLEFT          (BF_TOP | BF_LEFT)
  4050. #define BF_TOPRIGHT         (BF_TOP | BF_RIGHT)
  4051. #define BF_BOTTOMLEFT       (BF_BOTTOM | BF_LEFT)
  4052. #define BF_BOTTOMRIGHT      (BF_BOTTOM | BF_RIGHT)
  4053. #define BF_RECT             (BF_LEFT | BF_RIGHT | BF_TOP | BF_BOTTOM)
  4054.  
  4055. #define BF_MIDDLE           0x0800
  4056.  
  4057. #define BF_SOFT             0x1000
  4058. #define BF_ADJUST           0x2000
  4059. #define BF_FLAT             0x4000
  4060. #define BF_MONO             0x8000
  4061.  
  4062.  
  4063. /*
  4064.  *  Color Types
  4065.  */
  4066. #define CTLCOLOR_MSGBOX         0
  4067. #define CTLCOLOR_EDIT           1
  4068. #define CTLCOLOR_LISTBOX        2
  4069. #define CTLCOLOR_BTN            3
  4070. #define CTLCOLOR_SCOLLBAR       5
  4071. #define CTLCOLOR_STATIC         6
  4072. #define CTLCOLOR_MAX            7
  4073.  
  4074.  
  4075.  
  4076. // @CESYSGEN IF GWES_CURSOR
  4077.  
  4078. HCURSOR
  4079. WINAPI
  4080. SetCursor(
  4081.     HCURSOR hCursor);
  4082.  
  4083.  
  4084. #ifdef UNDER_NT
  4085.  
  4086. #ifndef UNICODE_ONLY
  4087. WINUSERAPI
  4088. HCURSOR
  4089. WINAPI
  4090. LoadCursorA(
  4091.     HINSTANCE hInstance,
  4092.     LPCSTR lpCursorName);
  4093. #endif //!UNICODE_ONLY
  4094. #ifndef ANSI_ONLY
  4095. WINUSERAPI
  4096. HCURSOR
  4097. WINAPI
  4098. LoadCursorW(
  4099.     HINSTANCE hInstance,
  4100.     LPCWSTR lpCursorName);
  4101. #endif //!ANSI_ONLY
  4102. #ifdef UNICODE
  4103. #define LoadCursor  LoadCursorW
  4104. #else
  4105. #define LoadCursor  LoadCursorA
  4106. #endif // !UNICODE
  4107.  
  4108. #define IDC_ARROW           MAKEINTRESOURCE(32512) // Arrow cursor for emulation
  4109.  
  4110. #else // UNDER_NT
  4111.  
  4112. WINUSERAPI
  4113. HCURSOR
  4114. WINAPI
  4115. LoadCursorA(
  4116.     HINSTANCE hInstance,
  4117.     LPCSTR lpCursorName);
  4118. WINUSERAPI
  4119. HCURSOR
  4120. WINAPI
  4121. LoadCursorW(
  4122.     HINSTANCE hInstance,
  4123.     LPCWSTR lpCursorName);
  4124. #undef LoadCursor
  4125. #ifdef UNICODE
  4126. #define LoadCursor  LoadCursorW
  4127. #else
  4128. #define LoadCursor  LoadCursorA
  4129. #endif // !UNICODE
  4130.  
  4131.  
  4132. #endif // UNDER_NT
  4133.  
  4134. /*
  4135.  * Standard Cursor IDs
  4136.  */
  4137. #define IDC_WAIT            MAKEINTRESOURCE(32514)
  4138.  
  4139. // @CESYSGEN ENDIF
  4140.  
  4141.                     
  4142. // @CESYSGEN IF GWES_MCURSOR
  4143.  
  4144. WINUSERAPI
  4145. int
  4146. WINAPI
  4147. ShowCursor(
  4148.     BOOL bShow);
  4149.  
  4150. WINUSERAPI
  4151. BOOL
  4152. WINAPI
  4153. SetCursorPos(
  4154.     int X,
  4155.     int Y);
  4156.  
  4157. WINUSERAPI
  4158. HCURSOR
  4159. WINAPI
  4160. SetCursor(
  4161.     HCURSOR hCursor);
  4162.  
  4163. WINUSERAPI
  4164. BOOL
  4165. WINAPI
  4166. GetCursorPos(
  4167.     LPPOINT lpPoint);
  4168.  
  4169. WINUSERAPI
  4170. BOOL
  4171. WINAPI
  4172. ClipCursor(
  4173.     CONST RECT *lpRect);
  4174.  
  4175. WINUSERAPI
  4176. BOOL
  4177. WINAPI
  4178. GetClipCursor(
  4179.     LPRECT lpRect);
  4180.  
  4181. WINUSERAPI
  4182. HCURSOR
  4183. WINAPI
  4184. GetCursor(
  4185.     VOID);
  4186.  
  4187. // @CESYSGEN ENDIF
  4188.  
  4189. // @CESYSGEN IF GWES_ICONCURS
  4190.  
  4191. WINUSERAPI
  4192. HCURSOR
  4193. WINAPI
  4194. LoadCursorA(
  4195.     HINSTANCE hInstance,
  4196.     LPCSTR lpCursorName);
  4197. WINUSERAPI
  4198. HCURSOR
  4199. WINAPI
  4200. LoadCursorW(
  4201.     HINSTANCE hInstance,
  4202.     LPCWSTR lpCursorName);
  4203. #undef LoadCursor
  4204. #ifdef UNICODE
  4205. #define LoadCursor  LoadCursorW
  4206. #else
  4207. #define LoadCursor  LoadCursorA
  4208. #endif // !UNICODE
  4209.  
  4210. WINUSERAPI
  4211. HCURSOR
  4212. WINAPI
  4213. CreateCursor(
  4214.     HINSTANCE hInst,
  4215.     int xHotSpot,
  4216.     int yHotSpot,
  4217.     int nWidth,
  4218.     int nHeight,
  4219.     CONST VOID *pvANDPlane,
  4220.     CONST VOID *pvXORPlane);
  4221.  
  4222. WINUSERAPI
  4223. BOOL
  4224. WINAPI
  4225. DestroyCursor(
  4226.     HCURSOR hCursor);
  4227.  
  4228. /*
  4229.  * Standard Cursor IDs
  4230.  */
  4231. #define IDC_ARROW           MAKEINTRESOURCE(32512)
  4232. #define IDC_IBEAM           MAKEINTRESOURCE(32513)
  4233. #define IDC_WAIT            MAKEINTRESOURCE(32514)
  4234. #define IDC_CROSS           MAKEINTRESOURCE(32515)
  4235. #define IDC_UPARROW         MAKEINTRESOURCE(32516)
  4236. #define IDC_SIZE            MAKEINTRESOURCE(32646)
  4237. #define IDC_ICON            MAKEINTRESOURCE(32512)
  4238. #define IDC_SIZENWSE        MAKEINTRESOURCE(32642)
  4239. #define IDC_SIZENESW        MAKEINTRESOURCE(32643)
  4240. #define IDC_SIZEWE          MAKEINTRESOURCE(32644)
  4241. #define IDC_SIZENS          MAKEINTRESOURCE(32645)
  4242. #define IDC_SIZEALL         MAKEINTRESOURCE(32646)
  4243. #define IDC_NO              MAKEINTRESOURCE(32648)
  4244. #define IDC_APPSTARTING     MAKEINTRESOURCE(32650)
  4245. #define IDC_HELP            MAKEINTRESOURCE(32651)
  4246.  
  4247. // @CESYSGEN ENDIF
  4248.  
  4249.  
  4250.  
  4251. int WINAPI SetScrollPos(HWND hwnd, int fnBar, int nPos, BOOL fRedraw);
  4252. BOOL WINAPI SetScrollRange(
  4253.     HWND hwnd,
  4254.     int fnBar,
  4255.     int nMinPos,
  4256.     int nMaxPos,
  4257.     BOOL fRedraw);
  4258.  
  4259.  
  4260.  
  4261.  
  4262. // @CESYSGEN IF GWES_TIMER
  4263. UINT WINAPI SetTimer(
  4264.     HWND hwnd,
  4265.     UINT idTimer,
  4266.     UINT uTimeOut,
  4267.     TIMERPROC pfnTimerProc);
  4268.  
  4269. BOOL WINAPI KillTimer(
  4270.     HWND hwnd,
  4271.     UINT idEvent);
  4272. // @CESYSGEN ENDIF
  4273.  
  4274.  
  4275. // @CESYSGEN IF GWES_KBDUI
  4276. DWORD
  4277. WINAPI
  4278. GetKeyboardStatus(
  4279.     VOID
  4280.     );
  4281.  
  4282. BOOL
  4283. WINAPI
  4284. EnableHardwareKeyboard(
  4285.     BOOL    fEnable
  4286.     );
  4287.  
  4288.  
  4289. WINUSERAPI
  4290. BOOL
  4291. WINAPI
  4292. RegisterHotKey(
  4293.     HWND    hWnd,
  4294.     int        id,
  4295.     UINT    fsModifiers,
  4296.     UINT    vk
  4297.     );
  4298.  
  4299. WINUSERAPI
  4300. BOOL
  4301. WINAPI
  4302. UnregisterHotKey(
  4303.     HWND    hWnd,
  4304.     int        id
  4305.     );
  4306.  
  4307. #define MOD_ALT         0x0001
  4308. #define MOD_CONTROL     0x0002
  4309. #define MOD_SHIFT       0x0004
  4310. #define MOD_WIN         0x0008
  4311. #define MOD_KEYUP        0x1000
  4312.  
  4313.  
  4314. #define IDHOT_SNAPWINDOW        (-1)    /* SHIFT-PRINTSCRN  */
  4315. #define IDHOT_SNAPDESKTOP       (-2)    /* PRINTSCRN        */
  4316.  
  4317.  
  4318.  
  4319. // @CESYSGEN ENDIF
  4320.  
  4321.  
  4322. #define SPIF_UPDATEINIFILE    0x0001
  4323. #define SPIF_SENDCHANGE        0x0002
  4324.  
  4325. // @CESYSGEN IF GWES_MCURSOR
  4326. #define SPI_GETMOUSE                3
  4327. #define SPI_SETMOUSE                4
  4328. // @CESYSGEN ENDIF
  4329.  
  4330.  
  4331. #define SPI_SETWORKAREA            47
  4332. #define SPI_GETWORKAREA            48
  4333.  
  4334.  
  4335. // @CESYSGEN IF GWES_IDLE
  4336. #define SPI_SETBATTERYIDLETIMEOUT    251
  4337. #define SPI_GETBATTERYIDLETIMEOUT    252
  4338.  
  4339. #define SPI_SETEXTERNALIDLETIMEOUT    253
  4340. #define SPI_GETEXTERNALIDLETIMEOUT    254
  4341.  
  4342. #define SPI_SETWAKEUPIDLETIMEOUT    255
  4343. #define SPI_GETWAKEUPIDLETIMEOUT    256
  4344.  
  4345. // @CESYSGEN ENDIF
  4346.  
  4347.  
  4348.  
  4349.  
  4350. #define SPI_GETPLATFORMTYPE 257
  4351. #define SPI_GETOEMINFO 258
  4352.  
  4353. WINUSERAPI
  4354. BOOL
  4355. WINAPI
  4356. SystemParametersInfoA(
  4357.     UINT uiAction,
  4358.     UINT uiParam,
  4359.     PVOID pvParam,
  4360.     UINT fWinIni);
  4361.  
  4362. WINUSERAPI
  4363. BOOL
  4364. WINAPI
  4365. SystemParametersInfoW(
  4366.     UINT uiAction,
  4367.     UINT uiParam,
  4368.     PVOID pvParam,
  4369.     UINT fWinIni);
  4370. #ifdef UNICODE
  4371. #define SystemParametersInfo  SystemParametersInfoW
  4372. #else
  4373. #define SystemParametersInfo  SystemParametersInfoA
  4374. #endif // !UNICODE
  4375.  
  4376.  
  4377. #ifdef __cplusplus
  4378. }
  4379. #endif /*__cplusplus*/
  4380.  
  4381.  
  4382. #ifdef WINCEOEM
  4383. #include <pwinuser.h>    // internal defines
  4384. #ifdef WINCEMACRO
  4385. #include <mwinuser.h>
  4386. #endif
  4387. #endif
  4388.  
  4389.  
  4390. #endif /* _WINUSER_ */
  4391.  
  4392.