home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Compilers / digital marsC compier / dm / include / win32 / Winuser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-08  |  188.1 KB  |  8,679 lines

  1. /****************************************************************************
  2. *                                                                           *
  3. * winuser.h -- USER procedure declarations, constant definitions and macros *
  4. *                                                                           *
  5. * Copyright (c) 1985-1996, Microsoft Corp. All rights reserved.             *
  6. *                                                                           *
  7. ****************************************************************************/
  8.  
  9.  
  10. #ifndef _WINUSER_
  11. #define _WINUSER_
  12.  
  13. //
  14. // Define API decoration for direct importing of DLL references.
  15. //
  16.  
  17. #if !defined(_USER32_)
  18. #define WINUSERAPI DECLSPEC_IMPORT
  19. #else
  20. #define WINUSERAPI
  21. #endif
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif /* __cplusplus */
  26.  
  27.  
  28. #ifndef WINVER
  29. #define WINVER  0x0400      /* version 4.0 */
  30. #endif /* !WINVER */
  31.  
  32. #include <stdarg.h>
  33.  
  34. #ifndef NOUSER
  35.  
  36. typedef HANDLE HDWP;
  37. typedef VOID MENUTEMPLATEA;
  38. typedef VOID MENUTEMPLATEW;
  39. #ifdef UNICODE
  40. typedef MENUTEMPLATEW MENUTEMPLATE;
  41. #else
  42. typedef MENUTEMPLATEA MENUTEMPLATE;
  43. #endif // UNICODE
  44. typedef PVOID LPMENUTEMPLATEA;
  45. typedef PVOID LPMENUTEMPLATEW;
  46. #ifdef UNICODE
  47. typedef LPMENUTEMPLATEW LPMENUTEMPLATE;
  48. #else
  49. typedef LPMENUTEMPLATEA LPMENUTEMPLATE;
  50. #endif // UNICODE
  51.  
  52. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  53.  
  54. #ifdef STRICT
  55.  
  56. typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  57. typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD);
  58. typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int);
  59. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  60. typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  61. typedef VOID (CALLBACK* SENDASYNCPROC)(HWND, UINT, DWORD, LRESULT);
  62.  
  63. typedef BOOL (CALLBACK* PROPENUMPROCA)(HWND, LPCSTR, HANDLE);
  64. typedef BOOL (CALLBACK* PROPENUMPROCW)(HWND, LPCWSTR, HANDLE);
  65.  
  66. typedef BOOL (CALLBACK* PROPENUMPROCEXA)(HWND, LPSTR, HANDLE, DWORD);
  67. typedef BOOL (CALLBACK* PROPENUMPROCEXW)(HWND, LPWSTR, HANDLE, DWORD);
  68.  
  69. typedef int (CALLBACK* EDITWORDBREAKPROCA)(LPSTR lpch, int ichCurrent, int cch, int code);
  70. typedef int (CALLBACK* EDITWORDBREAKPROCW)(LPWSTR lpch, int ichCurrent, int cch, int code);
  71.  
  72. #if(WINVER >= 0x0400)
  73. typedef BOOL (CALLBACK* DRAWSTATEPROC)(HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy);
  74. #endif /* WINVER >= 0x0400 */
  75. #else /* !STRICT */
  76.  
  77. typedef FARPROC DLGPROC;
  78. typedef FARPROC TIMERPROC;
  79. typedef FARPROC GRAYSTRINGPROC;
  80. typedef FARPROC WNDENUMPROC;
  81. typedef FARPROC HOOKPROC;
  82. typedef FARPROC SENDASYNCPROC;
  83.  
  84. typedef FARPROC EDITWORDBREAKPROCA;
  85. typedef FARPROC EDITWORDBREAKPROCW;
  86.  
  87. typedef FARPROC PROPENUMPROCA;
  88. typedef FARPROC PROPENUMPROCW;
  89.  
  90. typedef FARPROC PROPENUMPROCEXA;
  91. typedef FARPROC PROPENUMPROCEXW;
  92.  
  93. #if(WINVER >= 0x0400)
  94. typedef FARPROC DRAWSTATEPROC;
  95. #endif /* WINVER >= 0x0400 */
  96. #endif /* !STRICT */
  97.  
  98. #ifdef UNICODE
  99. typedef PROPENUMPROCW        PROPENUMPROC;
  100. typedef PROPENUMPROCEXW      PROPENUMPROCEX;
  101. typedef EDITWORDBREAKPROCW   EDITWORDBREAKPROC;
  102. #else  /* !UNICODE */
  103. typedef PROPENUMPROCA        PROPENUMPROC;
  104. typedef PROPENUMPROCEXA      PROPENUMPROCEX;
  105. typedef EDITWORDBREAKPROCA   EDITWORDBREAKPROC;
  106. #endif /* UNICODE */
  107.  
  108. #ifdef STRICT
  109.  
  110. typedef BOOL (CALLBACK* NAMEENUMPROCA)(LPSTR, LPARAM);
  111. typedef BOOL (CALLBACK* NAMEENUMPROCW)(LPWSTR, LPARAM);
  112.  
  113. typedef NAMEENUMPROCA   WINSTAENUMPROCA;
  114. typedef NAMEENUMPROCA   DESKTOPENUMPROCA;
  115. typedef NAMEENUMPROCW   WINSTAENUMPROCW;
  116. typedef NAMEENUMPROCW   DESKTOPENUMPROCW;
  117.  
  118. #else /* !STRICT */
  119.  
  120. typedef FARPROC NAMEENUMPROCA;
  121. typedef FARPROC NAMEENUMPROCW;
  122. typedef FARPROC WINSTAENUMPROCA;
  123. typedef FARPROC DESKTOPENUMPROCA;
  124. typedef FARPROC WINSTAENUMPROCW;
  125. typedef FARPROC DESKTOPENUMPROCW;
  126.  
  127. #endif /* !STRICT */
  128.  
  129. #ifdef UNICODE
  130. typedef WINSTAENUMPROCW     WINSTAENUMPROC;
  131. typedef DESKTOPENUMPROCW    DESKTOPENUMPROC;
  132. #else  /* !UNICODE */
  133. typedef WINSTAENUMPROCA     WINSTAENUMPROC;
  134. typedef DESKTOPENUMPROCA    DESKTOPENUMPROC;
  135. #endif /* UNICODE */
  136.  
  137. #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
  138. #define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
  139. #ifdef UNICODE
  140. #define MAKEINTRESOURCE  MAKEINTRESOURCEW
  141. #else
  142. #define MAKEINTRESOURCE  MAKEINTRESOURCEA
  143. #endif // !UNICODE
  144.  
  145. #ifndef NORESOURCE
  146.  
  147. /*
  148.  * Predefined Resource Types
  149.  */
  150. #define RT_CURSOR           MAKEINTRESOURCE(1)
  151. #define RT_BITMAP           MAKEINTRESOURCE(2)
  152. #define RT_ICON             MAKEINTRESOURCE(3)
  153. #define RT_MENU             MAKEINTRESOURCE(4)
  154. #define RT_DIALOG           MAKEINTRESOURCE(5)
  155. #define RT_STRING           MAKEINTRESOURCE(6)
  156. #define RT_FONTDIR          MAKEINTRESOURCE(7)
  157. #define RT_FONT             MAKEINTRESOURCE(8)
  158. #define RT_ACCELERATOR      MAKEINTRESOURCE(9)
  159. #define RT_RCDATA           MAKEINTRESOURCE(10)
  160. #define RT_MESSAGETABLE     MAKEINTRESOURCE(11)
  161.  
  162. #define DIFFERENCE          11
  163. #define RT_GROUP_CURSOR MAKEINTRESOURCE((DWORD)RT_CURSOR + DIFFERENCE)
  164. #define RT_GROUP_ICON   MAKEINTRESOURCE((DWORD)RT_ICON + DIFFERENCE)
  165. #define RT_VERSION      MAKEINTRESOURCE(16)
  166. #define RT_DLGINCLUDE   MAKEINTRESOURCE(17)
  167. #if(WINVER >= 0x0400)
  168. #define RT_PLUGPLAY     MAKEINTRESOURCE(19)
  169. #define RT_VXD          MAKEINTRESOURCE(20)
  170. #define RT_ANICURSOR    MAKEINTRESOURCE(21)
  171. #define RT_ANIICON      MAKEINTRESOURCE(22)
  172. #endif /* WINVER >= 0x0400 */
  173.  
  174. #endif /* !NORESOURCE */
  175.  
  176. WINUSERAPI
  177. int
  178. WINAPI
  179. wvsprintfA(
  180.     LPSTR,
  181.     LPCSTR,
  182.     va_list arglist);
  183. WINUSERAPI
  184. int
  185. WINAPI
  186. wvsprintfW(
  187.     LPWSTR,
  188.     LPCWSTR,
  189.     va_list arglist);
  190. #ifdef UNICODE
  191. #define wvsprintf  wvsprintfW
  192. #else
  193. #define wvsprintf  wvsprintfA
  194. #endif // !UNICODE
  195.  
  196. WINUSERAPI int WINAPIV wsprintfA(LPSTR, LPCSTR, ...);
  197. WINUSERAPI int WINAPIV wsprintfW(LPWSTR, LPCWSTR, ...);
  198. #ifdef UNICODE
  199. #define wsprintf  wsprintfW
  200. #else
  201. #define wsprintf  wsprintfA
  202. #endif // !UNICODE
  203.  
  204. #ifndef NOSCROLL
  205.  
  206. /*
  207.  * Scroll Bar Constants
  208.  */
  209. #define SB_HORZ             0
  210. #define SB_VERT             1
  211. #define SB_CTL              2
  212. #define SB_BOTH             3
  213.  
  214. /*
  215.  * Scroll Bar Commands
  216.  */
  217. #define SB_LINEUP           0
  218. #define SB_LINELEFT         0
  219. #define SB_LINEDOWN         1
  220. #define SB_LINERIGHT        1
  221. #define SB_PAGEUP           2
  222. #define SB_PAGELEFT         2
  223. #define SB_PAGEDOWN         3
  224. #define SB_PAGERIGHT        3
  225. #define SB_THUMBPOSITION    4
  226. #define SB_THUMBTRACK       5
  227. #define SB_TOP              6
  228. #define SB_LEFT             6
  229. #define SB_BOTTOM           7
  230. #define SB_RIGHT            7
  231. #define SB_ENDSCROLL        8
  232.  
  233. #endif /* !NOSCROLL */
  234.  
  235. #ifndef NOSHOWWINDOW
  236.  
  237. // begin_r_winuser
  238.  
  239. /*
  240.  * ShowWindow() Commands
  241.  */
  242. #define SW_HIDE             0
  243. #define SW_SHOWNORMAL       1
  244. #define SW_NORMAL           1
  245. #define SW_SHOWMINIMIZED    2
  246. #define SW_SHOWMAXIMIZED    3
  247. #define SW_MAXIMIZE         3
  248. #define SW_SHOWNOACTIVATE   4
  249. #define SW_SHOW             5
  250. #define SW_MINIMIZE         6
  251. #define SW_SHOWMINNOACTIVE  7
  252. #define SW_SHOWNA           8
  253. #define SW_RESTORE          9
  254. #define SW_SHOWDEFAULT      10
  255. #define SW_MAX              10
  256.  
  257. /*
  258.  * Old ShowWindow() Commands
  259.  */
  260. #define HIDE_WINDOW         0
  261. #define SHOW_OPENWINDOW     1
  262. #define SHOW_ICONWINDOW     2
  263. #define SHOW_FULLSCREEN     3
  264. #define SHOW_OPENNOACTIVATE 4
  265.  
  266. /*
  267.  * Identifiers for the WM_SHOWWINDOW message
  268.  */
  269. #define SW_PARENTCLOSING    1
  270. #define SW_OTHERZOOM        2
  271. #define SW_PARENTOPENING    3
  272. #define SW_OTHERUNZOOM      4
  273.  
  274. // end_r_winuser
  275.  
  276. #endif /* !NOSHOWWINDOW */
  277.  
  278. /*
  279.  * WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
  280.  */
  281. #define KF_EXTENDED         0x0100
  282. #define KF_DLGMODE          0x0800
  283. #define KF_MENUMODE         0x1000
  284. #define KF_ALTDOWN          0x2000
  285. #define KF_REPEAT           0x4000
  286. #define KF_UP               0x8000
  287.  
  288. #ifndef NOVIRTUALKEYCODES
  289.  
  290. // begin_r_winuser
  291.  
  292. /*
  293.  * Virtual Keys, Standard Set
  294.  */
  295. #define VK_LBUTTON        0x01
  296. #define VK_RBUTTON        0x02
  297. #define VK_CANCEL         0x03
  298. #define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
  299.  
  300. #define VK_BACK           0x08
  301. #define VK_TAB            0x09
  302.  
  303. #define VK_CLEAR          0x0C
  304. #define VK_RETURN         0x0D
  305.  
  306. #define VK_SHIFT          0x10
  307. #define VK_CONTROL        0x11
  308. #define VK_MENU           0x12
  309. #define VK_PAUSE          0x13
  310. #define VK_CAPITAL        0x14
  311.  
  312.  
  313. #define VK_ESCAPE         0x1B
  314.  
  315. #define VK_SPACE          0x20
  316. #define VK_PRIOR          0x21
  317. #define VK_NEXT           0x22
  318. #define VK_END            0x23
  319. #define VK_HOME           0x24
  320. #define VK_LEFT           0x25
  321. #define VK_UP             0x26
  322. #define VK_RIGHT          0x27
  323. #define VK_DOWN           0x28
  324. #define VK_SELECT         0x29
  325. #define VK_PRINT          0x2A
  326. #define VK_EXECUTE        0x2B
  327. #define VK_SNAPSHOT       0x2C
  328. #define VK_INSERT         0x2D
  329. #define VK_DELETE         0x2E
  330. #define VK_HELP           0x2F
  331.  
  332. /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
  333. /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
  334.  
  335. #define VK_LWIN           0x5B
  336. #define VK_RWIN           0x5C
  337. #define VK_APPS           0x5D
  338.  
  339. #define VK_NUMPAD0        0x60
  340. #define VK_NUMPAD1        0x61
  341. #define VK_NUMPAD2        0x62
  342. #define VK_NUMPAD3        0x63
  343. #define VK_NUMPAD4        0x64
  344. #define VK_NUMPAD5        0x65
  345. #define VK_NUMPAD6        0x66
  346. #define VK_NUMPAD7        0x67
  347. #define VK_NUMPAD8        0x68
  348. #define VK_NUMPAD9        0x69
  349. #define VK_MULTIPLY       0x6A
  350. #define VK_ADD            0x6B
  351. #define VK_SEPARATOR      0x6C
  352. #define VK_SUBTRACT       0x6D
  353. #define VK_DECIMAL        0x6E
  354. #define VK_DIVIDE         0x6F
  355. #define VK_F1             0x70
  356. #define VK_F2             0x71
  357. #define VK_F3             0x72
  358. #define VK_F4             0x73
  359. #define VK_F5             0x74
  360. #define VK_F6             0x75
  361. #define VK_F7             0x76
  362. #define VK_F8             0x77
  363. #define VK_F9             0x78
  364. #define VK_F10            0x79
  365. #define VK_F11            0x7A
  366. #define VK_F12            0x7B
  367. #define VK_F13            0x7C
  368. #define VK_F14            0x7D
  369. #define VK_F15            0x7E
  370. #define VK_F16            0x7F
  371. #define VK_F17            0x80
  372. #define VK_F18            0x81
  373. #define VK_F19            0x82
  374. #define VK_F20            0x83
  375. #define VK_F21            0x84
  376. #define VK_F22            0x85
  377. #define VK_F23            0x86
  378. #define VK_F24            0x87
  379.  
  380. #define VK_NUMLOCK        0x90
  381. #define VK_SCROLL         0x91
  382.  
  383. /*
  384.  * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  385.  * Used only as parameters to GetAsyncKeyState() and GetKeyState().
  386.  * No other API or message will distinguish left and right keys in this way.
  387.  */
  388. #define VK_LSHIFT         0xA0
  389. #define VK_RSHIFT         0xA1
  390. #define VK_LCONTROL       0xA2
  391. #define VK_RCONTROL       0xA3
  392. #define VK_LMENU          0xA4
  393. #define VK_RMENU          0xA5
  394.  
  395. #if(WINVER >= 0x0400)
  396. #define VK_PROCESSKEY     0xE5
  397. #endif /* WINVER >= 0x0400 */
  398.  
  399. #define VK_ATTN           0xF6
  400. #define VK_CRSEL          0xF7
  401. #define VK_EXSEL          0xF8
  402. #define VK_EREOF          0xF9
  403. #define VK_PLAY           0xFA
  404. #define VK_ZOOM           0xFB
  405. #define VK_NONAME         0xFC
  406. #define VK_PA1            0xFD
  407. #define VK_OEM_CLEAR      0xFE
  408.  
  409. // end_r_winuser
  410.  
  411. #endif /* !NOVIRTUALKEYCODES */
  412.  
  413. #ifndef NOWH
  414.  
  415. /*
  416.  * SetWindowsHook() codes
  417.  */
  418. #define WH_MIN              (-1)
  419. #define WH_MSGFILTER        (-1)
  420. #define WH_JOURNALRECORD    0
  421. #define WH_JOURNALPLAYBACK  1
  422. #define WH_KEYBOARD         2
  423. #define WH_GETMESSAGE       3
  424. #define WH_CALLWNDPROC      4
  425. #define WH_CBT              5
  426. #define WH_SYSMSGFILTER     6
  427. #define WH_MOUSE            7
  428. #define WH_HARDWARE         8
  429. #define WH_DEBUG            9
  430. #define WH_SHELL           10
  431. #define WH_FOREGROUNDIDLE  11
  432. #if(WINVER >= 0x0400)
  433. #define WH_CALLWNDPROCRET  12
  434. #endif /* WINVER >= 0x0400 */
  435. #if(WINVER >= 0x0400)
  436. #define WH_MAX             12
  437. #else
  438. #define WH_MAX             11
  439. #endif
  440. #define WH_MINHOOK         WH_MIN
  441. #define WH_MAXHOOK         WH_MAX
  442.  
  443. /*
  444.  * Hook Codes
  445.  */
  446. #define HC_ACTION           0
  447. #define HC_GETNEXT          1
  448. #define HC_SKIP             2
  449. #define HC_NOREMOVE         3
  450. #define HC_NOREM            HC_NOREMOVE
  451. #define HC_SYSMODALON       4
  452. #define HC_SYSMODALOFF      5
  453.  
  454. /*
  455.  * CBT Hook Codes
  456.  */
  457. #define HCBT_MOVESIZE       0
  458. #define HCBT_MINMAX         1
  459. #define HCBT_QS             2
  460. #define HCBT_CREATEWND      3
  461. #define HCBT_DESTROYWND     4
  462. #define HCBT_ACTIVATE       5
  463. #define HCBT_CLICKSKIPPED   6
  464. #define HCBT_KEYSKIPPED     7
  465. #define HCBT_SYSCOMMAND     8
  466. #define HCBT_SETFOCUS       9
  467.  
  468. /*
  469.  * HCBT_CREATEWND parameters pointed to by lParam
  470.  */
  471. typedef struct tagCBT_CREATEWNDA
  472. {
  473.     struct tagCREATESTRUCTA *lpcs;
  474.     HWND           hwndInsertAfter;
  475. } CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
  476. /*
  477.  * HCBT_CREATEWND parameters pointed to by lParam
  478.  */
  479. typedef struct tagCBT_CREATEWNDW
  480. {
  481.     struct tagCREATESTRUCTW *lpcs;
  482.     HWND           hwndInsertAfter;
  483. } CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
  484. #ifdef UNICODE
  485. typedef CBT_CREATEWNDW CBT_CREATEWND;
  486. typedef LPCBT_CREATEWNDW LPCBT_CREATEWND;
  487. #else
  488. typedef CBT_CREATEWNDA CBT_CREATEWND;
  489. typedef LPCBT_CREATEWNDA LPCBT_CREATEWND;
  490. #endif // UNICODE
  491.  
  492. /*
  493.  * HCBT_ACTIVATE structure pointed to by lParam
  494.  */
  495. typedef struct tagCBTACTIVATESTRUCT
  496. {
  497.     BOOL    fMouse;
  498.     HWND    hWndActive;
  499. } CBTACTIVATESTRUCT, *LPCBTACTIVATESTRUCT;
  500.  
  501. /*
  502.  * WH_MSGFILTER Filter Proc Codes
  503.  */
  504. #define MSGF_DIALOGBOX      0
  505. #define MSGF_MESSAGEBOX     1
  506. #define MSGF_MENU           2
  507. #define MSGF_MOVE           3
  508. #define MSGF_SIZE           4
  509. #define MSGF_SCROLLBAR      5
  510. #define MSGF_NEXTWINDOW     6
  511. #define MSGF_MAINLOOP       8
  512. #define MSGF_MAX            8
  513. #define MSGF_USER           4096
  514.  
  515. /*
  516.  * Shell support
  517.  */
  518. #define HSHELL_WINDOWCREATED        1
  519. #define HSHELL_WINDOWDESTROYED      2
  520. #define HSHELL_ACTIVATESHELLWINDOW  3
  521.  
  522. #if(WINVER >= 0x0400)
  523. #define HSHELL_WINDOWACTIVATED      4
  524. #define HSHELL_GETMINRECT           5
  525. #define HSHELL_REDRAW               6
  526. #define HSHELL_TASKMAN              7
  527. #define HSHELL_LANGUAGE             8
  528. #endif /* WINVER >= 0x0400 */
  529.  
  530.  
  531. /*
  532.  * Message Structure used in Journaling
  533.  */
  534. typedef struct tagEVENTMSG {
  535.     UINT    message;
  536.     UINT    paramL;
  537.     UINT    paramH;
  538.     DWORD    time;
  539.     HWND     hwnd;
  540. } EVENTMSG, *PEVENTMSGMSG, NEAR *NPEVENTMSGMSG, FAR *LPEVENTMSGMSG;
  541.  
  542. typedef struct tagEVENTMSG *PEVENTMSG, NEAR *NPEVENTMSG, FAR *LPEVENTMSG;
  543.  
  544. /*
  545.  * Message structure used by WH_CALLWNDPROC
  546.  */
  547. typedef struct tagCWPSTRUCT {
  548.     LPARAM  lParam;
  549.     WPARAM  wParam;
  550.     UINT    message;
  551.     HWND    hwnd;
  552. } CWPSTRUCT, *PCWPSTRUCT, NEAR *NPCWPSTRUCT, FAR *LPCWPSTRUCT;
  553.  
  554. #if(WINVER >= 0x0400)
  555. /*
  556.  * Message structure used by WH_CALLWNDPROCRET
  557.  */
  558. typedef struct tagCWPRETSTRUCT {
  559.     LRESULT lResult;
  560.     LPARAM  lParam;
  561.     WPARAM  wParam;
  562.     UINT    message;
  563.     HWND    hwnd;
  564. } CWPRETSTRUCT, *PCWPRETSTRUCT, NEAR *NPCWPRETSTRUCT, FAR *LPCWPRETSTRUCT;
  565. #endif /* WINVER >= 0x0400 */
  566.  
  567. /*
  568.  * Structure used by WH_DEBUG
  569.  */
  570. typedef struct tagDEBUGHOOKINFO
  571. {
  572.     DWORD   idThread;
  573.     DWORD   idThreadInstaller;
  574.     LPARAM  lParam;
  575.     WPARAM  wParam;
  576.     int     code;
  577. } DEBUGHOOKINFO, *PDEBUGHOOKINFO, NEAR *NPDEBUGHOOKINFO, FAR* LPDEBUGHOOKINFO;
  578.  
  579. /*
  580.  * Structure used by WH_MOUSE
  581.  */
  582. typedef struct tagMOUSEHOOKSTRUCT {
  583.     POINT   pt;
  584.     HWND    hwnd;
  585.     UINT    wHitTestCode;
  586.     DWORD   dwExtraInfo;
  587. } MOUSEHOOKSTRUCT, FAR *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
  588. #if(WINVER >= 0x0400)
  589. /*
  590.  * Structure used by WH_HARDWARE
  591.  */
  592. typedef struct tagHARDWAREHOOKSTRUCT {
  593.     HWND    hwnd;
  594.     UINT    message;
  595.     WPARAM  wParam;
  596.     LPARAM  lParam;
  597. } HARDWAREHOOKSTRUCT, FAR *LPHARDWAREHOOKSTRUCT, *PHARDWAREHOOKSTRUCT;
  598. #endif /* WINVER >= 0x0400 */
  599. #endif /* !NOWH */
  600.  
  601. /*
  602.  * Keyboard Layout API
  603.  */
  604. #define HKL_PREV            0
  605. #define HKL_NEXT            1
  606.  
  607.  
  608. #define KLF_ACTIVATE        0x00000001
  609. #define KLF_SUBSTITUTE_OK   0x00000002
  610. #define KLF_UNLOADPREVIOUS  0x00000004
  611. #define KLF_REORDER         0x00000008
  612. #if(WINVER >= 0x0400)
  613. #define KLF_REPLACELANG     0x00000010
  614. #define KLF_NOTELLSHELL     0x00000080
  615. #endif /* WINVER >= 0x0400 */
  616.  
  617. /*
  618.  * Size of KeyboardLayoutName (number of characters), including nul terminator
  619.  */
  620. #define KL_NAMELENGTH       9
  621.  
  622. WINUSERAPI
  623. HKL
  624. WINAPI
  625. LoadKeyboardLayoutA(
  626.     LPCSTR pwszKLID,
  627.     UINT Flags);
  628. WINUSERAPI
  629. HKL
  630. WINAPI
  631. LoadKeyboardLayoutW(
  632.     LPCWSTR pwszKLID,
  633.     UINT Flags);
  634. #ifdef UNICODE
  635. #define LoadKeyboardLayout  LoadKeyboardLayoutW
  636. #else
  637. #define LoadKeyboardLayout  LoadKeyboardLayoutA
  638. #endif // !UNICODE
  639.  
  640.  
  641. #if(WINVER >= 0x0400)
  642. WINUSERAPI
  643. HKL
  644. WINAPI
  645. ActivateKeyboardLayout(
  646.     HKL hkl,
  647.     UINT Flags);
  648. #else
  649. WINUSERAPI
  650. BOOL
  651. WINAPI
  652. ActivateKeyboardLayout(
  653.     HKL hkl,
  654.     UINT Flags);
  655. #endif /* WINVER >= 0x0400 */
  656.  
  657. #if(WINVER >= 0x0400)
  658. WINUSERAPI
  659. int
  660. WINAPI
  661. ToUnicodeEx(
  662.     UINT wVirtKey,
  663.     UINT wScanCode,
  664.     PBYTE lpKeyState,
  665.     LPWSTR pwszBuff,
  666.     int cchBuff,
  667.     UINT wFlags,
  668.     HKL dwhkl);
  669. #endif /* WINVER >= 0x0400 */
  670.  
  671. WINUSERAPI
  672. BOOL
  673. WINAPI
  674. UnloadKeyboardLayout(
  675.     HKL hkl);
  676.  
  677. WINUSERAPI
  678. BOOL
  679. WINAPI
  680. GetKeyboardLayoutNameA(
  681.     LPSTR pwszKLID);
  682. WINUSERAPI
  683. BOOL
  684. WINAPI
  685. GetKeyboardLayoutNameW(
  686.     LPWSTR pwszKLID);
  687. #ifdef UNICODE
  688. #define GetKeyboardLayoutName  GetKeyboardLayoutNameW
  689. #else
  690. #define GetKeyboardLayoutName  GetKeyboardLayoutNameA
  691. #endif // !UNICODE
  692.  
  693. #if(WINVER >= 0x0400)
  694. WINUSERAPI
  695. int
  696. WINAPI
  697. GetKeyboardLayoutList(
  698.         int nBuff,
  699.         HKL FAR *lpList);
  700.  
  701. WINUSERAPI
  702. HKL
  703. WINAPI
  704. GetKeyboardLayout(
  705.     DWORD dwLayout
  706. );
  707. #endif /* WINVER >= 0x0400 */
  708.  
  709. #ifndef NODESKTOP
  710. /*
  711.  * Desktop-specific access flags
  712.  */
  713. #define DESKTOP_READOBJECTS         0x0001L
  714. #define DESKTOP_CREATEWINDOW        0x0002L
  715. #define DESKTOP_CREATEMENU          0x0004L
  716. #define DESKTOP_HOOKCONTROL         0x0008L
  717. #define DESKTOP_JOURNALRECORD       0x0010L
  718. #define DESKTOP_JOURNALPLAYBACK     0x0020L
  719. #define DESKTOP_ENUMERATE           0x0040L
  720. #define DESKTOP_WRITEOBJECTS        0x0080L
  721. #define DESKTOP_SWITCHDESKTOP       0x0100L
  722.  
  723. /*
  724.  * Desktop-specific control flags
  725.  */
  726. #define DF_ALLOWOTHERACCOUNTHOOK    0x0001L
  727.  
  728. #ifdef _WINGDI_
  729. #ifndef NOGDI
  730.  
  731. WINUSERAPI
  732. HDESK
  733. WINAPI
  734. CreateDesktopA(
  735.     LPSTR lpszDesktop,
  736.     LPSTR lpszDevice,
  737.     LPDEVMODEA pDevmode,
  738.     DWORD dwFlags,
  739.     DWORD dwDesiredAccess,
  740.     LPSECURITY_ATTRIBUTES lpsa);
  741. WINUSERAPI
  742. HDESK
  743. WINAPI
  744. CreateDesktopW(
  745.     LPWSTR lpszDesktop,
  746.     LPWSTR lpszDevice,
  747.     LPDEVMODEW pDevmode,
  748.     DWORD dwFlags,
  749.     DWORD dwDesiredAccess,
  750.     LPSECURITY_ATTRIBUTES lpsa);
  751. #ifdef UNICODE
  752. #define CreateDesktop  CreateDesktopW
  753. #else
  754. #define CreateDesktop  CreateDesktopA
  755. #endif // !UNICODE
  756.  
  757. #endif /* NOGDI */
  758. #endif /* _WINGDI_ */
  759.  
  760. WINUSERAPI
  761. HDESK
  762. WINAPI
  763. OpenDesktopA(
  764.     LPSTR lpszDesktop,
  765.     DWORD dwFlags,
  766.     BOOL fInherit,
  767.     DWORD dwDesiredAccess);
  768. WINUSERAPI
  769. HDESK
  770. WINAPI
  771. OpenDesktopW(
  772.     LPWSTR lpszDesktop,
  773.     DWORD dwFlags,
  774.     BOOL fInherit,
  775.     DWORD dwDesiredAccess);
  776. #ifdef UNICODE
  777. #define OpenDesktop  OpenDesktopW
  778. #else
  779. #define OpenDesktop  OpenDesktopA
  780. #endif // !UNICODE
  781.  
  782. WINUSERAPI
  783. HDESK
  784. WINAPI
  785. OpenInputDesktop(
  786.     DWORD dwFlags,
  787.     BOOL fInherit,
  788.     DWORD dwDesiredAccess);
  789.  
  790. WINUSERAPI
  791. BOOL
  792. WINAPI
  793. EnumDesktopsA(
  794.     HWINSTA hwinsta,
  795.     DESKTOPENUMPROCA lpEnumFunc,
  796.     LPARAM lParam);
  797. WINUSERAPI
  798. BOOL
  799. WINAPI
  800. EnumDesktopsW(
  801.     HWINSTA hwinsta,
  802.     DESKTOPENUMPROCW lpEnumFunc,
  803.     LPARAM lParam);
  804. #ifdef UNICODE
  805. #define EnumDesktops  EnumDesktopsW
  806. #else
  807. #define EnumDesktops  EnumDesktopsA
  808. #endif // !UNICODE
  809.  
  810. WINUSERAPI
  811. BOOL
  812. WINAPI
  813. EnumDesktopWindows(
  814.     HDESK hDesktop,
  815.     WNDENUMPROC lpfn,
  816.     LPARAM lParam);
  817.  
  818. WINUSERAPI
  819. BOOL
  820. WINAPI
  821. SwitchDesktop(
  822.     HDESK hDesktop);
  823.  
  824. WINUSERAPI
  825. BOOL
  826. WINAPI
  827. SetThreadDesktop(
  828.     HDESK hDesktop);
  829.  
  830. WINUSERAPI
  831. BOOL
  832. WINAPI
  833. CloseDesktop(
  834.     HDESK hDesktop);
  835.  
  836. WINUSERAPI
  837. HDESK
  838. WINAPI
  839. GetThreadDesktop(
  840.     DWORD dwThreadId);
  841.  
  842. #endif  /* !NODESKTOP */
  843.  
  844. #ifndef NOWINDOWSTATION
  845. /*
  846.  * Windowstation-specific access flags
  847.  */
  848. #define WINSTA_ENUMDESKTOPS         0x0001L
  849. #define WINSTA_READATTRIBUTES       0x0002L
  850. #define WINSTA_ACCESSCLIPBOARD      0x0004L
  851. #define WINSTA_CREATEDESKTOP        0x0008L
  852. #define WINSTA_WRITEATTRIBUTES      0x0010L
  853. #define WINSTA_ACCESSGLOBALATOMS    0x0020L
  854. #define WINSTA_EXITWINDOWS          0x0040L
  855. #define WINSTA_ENUMERATE            0x0100L
  856. #define WINSTA_READSCREEN           0x0200L
  857.  
  858. /*
  859.  * Windowstation-specific attribute flags
  860.  */
  861. #define WSF_VISIBLE                 0x0001L
  862.  
  863. WINUSERAPI
  864. HWINSTA
  865. WINAPI
  866. CreateWindowStationA(
  867.     LPSTR lpwinsta,
  868.     DWORD dwReserved,
  869.     DWORD dwDesiredAccess,
  870.     LPSECURITY_ATTRIBUTES lpsa);
  871. WINUSERAPI
  872. HWINSTA
  873. WINAPI
  874. CreateWindowStationW(
  875.     LPWSTR lpwinsta,
  876.     DWORD dwReserved,
  877.     DWORD dwDesiredAccess,
  878.     LPSECURITY_ATTRIBUTES lpsa);
  879. #ifdef UNICODE
  880. #define CreateWindowStation  CreateWindowStationW
  881. #else
  882. #define CreateWindowStation  CreateWindowStationA
  883. #endif // !UNICODE
  884.  
  885. WINUSERAPI
  886. HWINSTA
  887. WINAPI
  888. OpenWindowStationA(
  889.     LPSTR lpszWinSta,
  890.     BOOL fInherit,
  891.     DWORD dwDesiredAccess);
  892. WINUSERAPI
  893. HWINSTA
  894. WINAPI
  895. OpenWindowStationW(
  896.     LPWSTR lpszWinSta,
  897.     BOOL fInherit,
  898.     DWORD dwDesiredAccess);
  899. #ifdef UNICODE
  900. #define OpenWindowStation  OpenWindowStationW
  901. #else
  902. #define OpenWindowStation  OpenWindowStationA
  903. #endif // !UNICODE
  904.  
  905. WINUSERAPI
  906. BOOL
  907. WINAPI
  908. EnumWindowStationsA(
  909.     WINSTAENUMPROCA lpEnumFunc,
  910.     LPARAM lParam);
  911. WINUSERAPI
  912. BOOL
  913. WINAPI
  914. EnumWindowStationsW(
  915.     WINSTAENUMPROCW lpEnumFunc,
  916.     LPARAM lParam);
  917. #ifdef UNICODE
  918. #define EnumWindowStations  EnumWindowStationsW
  919. #else
  920. #define EnumWindowStations  EnumWindowStationsA
  921. #endif // !UNICODE
  922.  
  923. WINUSERAPI
  924. BOOL
  925. WINAPI
  926. CloseWindowStation(
  927.     HWINSTA hWinSta);
  928.  
  929. WINUSERAPI
  930. BOOL
  931. WINAPI
  932. SetProcessWindowStation(
  933.     HWINSTA hWinSta);
  934.  
  935. WINUSERAPI
  936. HWINSTA
  937. WINAPI
  938. GetProcessWindowStation(
  939.     VOID);
  940. #endif  /* !NOWINDOWSTATION */
  941.  
  942. #ifndef NOSECURITY
  943.  
  944. WINUSERAPI
  945. BOOL
  946. WINAPI
  947. SetUserObjectSecurity(
  948.     HANDLE hObj,
  949.     PSECURITY_INFORMATION pSIRequested,
  950.     PSECURITY_DESCRIPTOR pSID);
  951.  
  952. WINUSERAPI
  953. BOOL
  954. WINAPI
  955. GetUserObjectSecurity(
  956.     HANDLE hObj,
  957.     PSECURITY_INFORMATION pSIRequested,
  958.     PSECURITY_DESCRIPTOR pSID,
  959.     DWORD nLength,
  960.     LPDWORD lpnLengthNeeded);
  961.  
  962. #define UOI_FLAGS       1
  963. #define UOI_NAME        2
  964. #define UOI_TYPE        3
  965. #define UOI_USER_SID    4
  966.  
  967. typedef struct tagUSEROBJECTFLAGS {
  968.     BOOL fInherit;
  969.     BOOL fReserved;
  970.     DWORD dwFlags;
  971. } USEROBJECTFLAGS, *PUSEROBJECTFLAGS;
  972.  
  973. WINUSERAPI
  974. BOOL
  975. WINAPI
  976. GetUserObjectInformationA(
  977.     HANDLE hObj,
  978.     int nIndex,
  979.     PVOID pvInfo,
  980.     DWORD nLength,
  981.     LPDWORD lpnLengthNeeded);
  982. WINUSERAPI
  983. BOOL
  984. WINAPI
  985. GetUserObjectInformationW(
  986.     HANDLE hObj,
  987.     int nIndex,
  988.     PVOID pvInfo,
  989.     DWORD nLength,
  990.     LPDWORD lpnLengthNeeded);
  991. #ifdef UNICODE
  992. #define GetUserObjectInformation  GetUserObjectInformationW
  993. #else
  994. #define GetUserObjectInformation  GetUserObjectInformationA
  995. #endif // !UNICODE
  996.  
  997. WINUSERAPI
  998. BOOL
  999. WINAPI
  1000. SetUserObjectInformationA(
  1001.     HANDLE hObj,
  1002.     int nIndex,
  1003.     PVOID pvInfo,
  1004.     DWORD nLength);
  1005. WINUSERAPI
  1006. BOOL
  1007. WINAPI
  1008. SetUserObjectInformationW(
  1009.     HANDLE hObj,
  1010.     int nIndex,
  1011.     PVOID pvInfo,
  1012.     DWORD nLength);
  1013. #ifdef UNICODE
  1014. #define SetUserObjectInformation  SetUserObjectInformationW
  1015. #else
  1016. #define SetUserObjectInformation  SetUserObjectInformationA
  1017. #endif // !UNICODE
  1018.  
  1019. #endif  /* !NOSECURITY */
  1020.  
  1021. #if(WINVER >= 0x0400)
  1022. typedef struct tagWNDCLASSEXA {
  1023.     UINT        cbSize;
  1024.     /* Win 3.x */
  1025.     UINT        style;
  1026.     WNDPROC     lpfnWndProc;
  1027.     int         cbClsExtra;
  1028.     int         cbWndExtra;
  1029.     HINSTANCE   hInstance;
  1030.     HICON       hIcon;
  1031.     HCURSOR     hCursor;
  1032.     HBRUSH      hbrBackground;
  1033.     LPCSTR      lpszMenuName;
  1034.     LPCSTR      lpszClassName;
  1035.     /* Win 4.0 */
  1036.     HICON       hIconSm;
  1037. } WNDCLASSEXA, *PWNDCLASSEXA, NEAR *NPWNDCLASSEXA, FAR *LPWNDCLASSEXA;
  1038. typedef struct tagWNDCLASSEXW {
  1039.     UINT        cbSize;
  1040.     /* Win 3.x */
  1041.     UINT        style;
  1042.     WNDPROC     lpfnWndProc;
  1043.     int         cbClsExtra;
  1044.     int         cbWndExtra;
  1045.     HINSTANCE   hInstance;
  1046.     HICON       hIcon;
  1047.     HCURSOR     hCursor;
  1048.     HBRUSH      hbrBackground;
  1049.     LPCWSTR     lpszMenuName;
  1050.     LPCWSTR     lpszClassName;
  1051.     /* Win 4.0 */
  1052.     HICON       hIconSm;
  1053. } WNDCLASSEXW, *PWNDCLASSEXW, NEAR *NPWNDCLASSEXW, FAR *LPWNDCLASSEXW;
  1054. #ifdef UNICODE
  1055. typedef WNDCLASSEXW WNDCLASSEX;
  1056. typedef PWNDCLASSEXW PWNDCLASSEX;
  1057. typedef NPWNDCLASSEXW NPWNDCLASSEX;
  1058. typedef LPWNDCLASSEXW LPWNDCLASSEX;
  1059. #else
  1060. typedef WNDCLASSEXA WNDCLASSEX;
  1061. typedef PWNDCLASSEXA PWNDCLASSEX;
  1062. typedef NPWNDCLASSEXA NPWNDCLASSEX;
  1063. typedef LPWNDCLASSEXA LPWNDCLASSEX;
  1064. #endif // UNICODE
  1065. #endif /* WINVER >= 0x0400 */
  1066.  
  1067. typedef struct tagWNDCLASSA {
  1068.     UINT        style;
  1069.     WNDPROC     lpfnWndProc;
  1070.     int         cbClsExtra;
  1071.     int         cbWndExtra;
  1072.     HINSTANCE   hInstance;
  1073.     HICON       hIcon;
  1074.     HCURSOR     hCursor;
  1075.     HBRUSH      hbrBackground;
  1076.     LPCSTR      lpszMenuName;
  1077.     LPCSTR      lpszClassName;
  1078. } WNDCLASSA, *PWNDCLASSA, NEAR *NPWNDCLASSA, FAR *LPWNDCLASSA;
  1079. typedef struct tagWNDCLASSW {
  1080.     UINT        style;
  1081.     WNDPROC     lpfnWndProc;
  1082.     int         cbClsExtra;
  1083.     int         cbWndExtra;
  1084.     HINSTANCE   hInstance;
  1085.     HICON       hIcon;
  1086.     HCURSOR     hCursor;
  1087.     HBRUSH      hbrBackground;
  1088.     LPCWSTR     lpszMenuName;
  1089.     LPCWSTR     lpszClassName;
  1090. } WNDCLASSW, *PWNDCLASSW, NEAR *NPWNDCLASSW, FAR *LPWNDCLASSW;
  1091. #ifdef UNICODE
  1092. typedef WNDCLASSW WNDCLASS;
  1093. typedef PWNDCLASSW PWNDCLASS;
  1094. typedef NPWNDCLASSW NPWNDCLASS;
  1095. typedef LPWNDCLASSW LPWNDCLASS;
  1096. #else
  1097. typedef WNDCLASSA WNDCLASS;
  1098. typedef PWNDCLASSA PWNDCLASS;
  1099. typedef NPWNDCLASSA NPWNDCLASS;
  1100. typedef LPWNDCLASSA LPWNDCLASS;
  1101. #endif // UNICODE
  1102.  
  1103.  
  1104.  
  1105. #ifndef NOMSG
  1106.  
  1107. /*
  1108.  * Message structure
  1109.  */
  1110. typedef struct tagMSG {
  1111.     HWND        hwnd;
  1112.     UINT        message;
  1113.     WPARAM      wParam;
  1114.     LPARAM      lParam;
  1115.     DWORD       time;
  1116.     POINT       pt;
  1117. } MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
  1118.  
  1119. #define POINTSTOPOINT(pt, pts)                          \
  1120.         { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts);   \
  1121.           (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
  1122.  
  1123. #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
  1124. #define MAKEWPARAM(l, h)      (WPARAM)MAKELONG(l, h)
  1125. #define MAKELPARAM(l, h)      (LPARAM)MAKELONG(l, h)
  1126. #define MAKELRESULT(l, h)     (LRESULT)MAKELONG(l, h)
  1127.  
  1128.  
  1129. #endif /* !NOMSG */
  1130.  
  1131. #ifndef NOWINOFFSETS
  1132.  
  1133. /*
  1134.  * Window field offsets for GetWindowLong()
  1135.  */
  1136. #define GWL_WNDPROC         (-4)
  1137. #define GWL_HINSTANCE       (-6)
  1138. #define GWL_HWNDPARENT      (-8)
  1139. #define GWL_STYLE           (-16)
  1140. #define GWL_EXSTYLE         (-20)
  1141. #define GWL_USERDATA        (-21)
  1142. #define GWL_ID              (-12)
  1143.  
  1144. /*
  1145.  * Class field offsets for GetClassLong()
  1146.  */
  1147. #define GCL_MENUNAME        (-8)
  1148. #define GCL_HBRBACKGROUND   (-10)
  1149. #define GCL_HCURSOR         (-12)
  1150. #define GCL_HICON           (-14)
  1151. #define GCL_HMODULE         (-16)
  1152. #define GCL_CBWNDEXTRA      (-18)
  1153. #define GCL_CBCLSEXTRA      (-20)
  1154. #define GCL_WNDPROC         (-24)
  1155. #define GCL_STYLE           (-26)
  1156. #define GCW_ATOM            (-32)
  1157.  
  1158. #if(WINVER >= 0x0400)
  1159. #define GCL_HICONSM         (-34)
  1160. #endif /* WINVER >= 0x0400 */
  1161.  
  1162. #endif /* !NOWINOFFSETS */
  1163.  
  1164. #ifndef NOWINMESSAGES
  1165.  
  1166. // begin_r_winuser
  1167.  
  1168. /*
  1169.  * Window Messages
  1170.  */
  1171.  
  1172. #define WM_NULL                         0x0000
  1173. #define WM_CREATE                       0x0001
  1174. #define WM_DESTROY                      0x0002
  1175. #define WM_MOVE                         0x0003
  1176. #define WM_SIZE                         0x0005
  1177.  
  1178. #define WM_ACTIVATE                     0x0006
  1179. /*
  1180.  * WM_ACTIVATE state values
  1181.  */
  1182. #define     WA_INACTIVE     0
  1183. #define     WA_ACTIVE       1
  1184. #define     WA_CLICKACTIVE  2
  1185.  
  1186. #define WM_SETFOCUS                     0x0007
  1187. #define WM_KILLFOCUS                    0x0008
  1188. #define WM_ENABLE                       0x000A
  1189. #define WM_SETREDRAW                    0x000B
  1190. #define WM_SETTEXT                      0x000C
  1191. #define WM_GETTEXT                      0x000D
  1192. #define WM_GETTEXTLENGTH                0x000E
  1193. #define WM_PAINT                        0x000F
  1194. #define WM_CLOSE                        0x0010
  1195. #define WM_QUERYENDSESSION              0x0011
  1196. #define WM_QUIT                         0x0012
  1197. #define WM_QUERYOPEN                    0x0013
  1198. #define WM_ERASEBKGND                   0x0014
  1199. #define WM_SYSCOLORCHANGE               0x0015
  1200. #define WM_ENDSESSION                   0x0016
  1201. #define WM_SHOWWINDOW                   0x0018
  1202. #define WM_WININICHANGE                 0x001A
  1203. #if(WINVER >= 0x0400)
  1204. #define WM_SETTINGCHANGE                WM_WININICHANGE
  1205. #endif /* WINVER >= 0x0400 */
  1206.  
  1207.  
  1208. #define WM_DEVMODECHANGE                0x001B
  1209. #define WM_ACTIVATEAPP                  0x001C
  1210. #define WM_FONTCHANGE                   0x001D
  1211. #define WM_TIMECHANGE                   0x001E
  1212. #define WM_CANCELMODE                   0x001F
  1213. #define WM_SETCURSOR                    0x0020
  1214. #define WM_MOUSEACTIVATE                0x0021
  1215. #define WM_CHILDACTIVATE                0x0022
  1216. #define WM_QUEUESYNC                    0x0023
  1217.  
  1218. #define WM_GETMINMAXINFO                0x0024
  1219. // end_r_winuser
  1220. /*
  1221.  * Struct pointed to by WM_GETMINMAXINFO lParam
  1222.  */
  1223. typedef struct tagMINMAXINFO {
  1224.     POINT ptReserved;
  1225.     POINT ptMaxSize;
  1226.     POINT ptMaxPosition;
  1227.     POINT ptMinTrackSize;
  1228.     POINT ptMaxTrackSize;
  1229. } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
  1230.  
  1231. // begin_r_winuser
  1232. #define WM_PAINTICON                    0x0026
  1233. #define WM_ICONERASEBKGND               0x0027
  1234. #define WM_NEXTDLGCTL                   0x0028
  1235. #define WM_SPOOLERSTATUS                0x002A
  1236. #define WM_DRAWITEM                     0x002B
  1237. #define WM_MEASUREITEM                  0x002C
  1238. #define WM_DELETEITEM                   0x002D
  1239. #define WM_VKEYTOITEM                   0x002E
  1240. #define WM_CHARTOITEM                   0x002F
  1241. #define WM_SETFONT                      0x0030
  1242. #define WM_GETFONT                      0x0031
  1243. #define WM_SETHOTKEY                    0x0032
  1244. #define WM_GETHOTKEY                    0x0033
  1245. #define WM_QUERYDRAGICON                0x0037
  1246. #define WM_COMPAREITEM                  0x0039
  1247.  
  1248. #define WM_COMPACTING                   0x0041
  1249. #define WM_COMMNOTIFY                   0x0044  /* no longer suported */
  1250. #define WM_WINDOWPOSCHANGING            0x0046
  1251. #define WM_WINDOWPOSCHANGED             0x0047
  1252.  
  1253. #define WM_POWER                        0x0048
  1254. /*
  1255.  * wParam for WM_POWER window message and DRV_POWER driver notification
  1256.  */
  1257. #define PWR_OK              1
  1258. #define PWR_FAIL            (-1)
  1259. #define PWR_SUSPENDREQUEST  1
  1260. #define PWR_SUSPENDRESUME   2
  1261. #define PWR_CRITICALRESUME  3
  1262.  
  1263. #define WM_COPYDATA                     0x004A
  1264. #define WM_CANCELJOURNAL                0x004B
  1265.  
  1266. // end_r_winuser
  1267.  
  1268. /*
  1269.  * lParam of WM_COPYDATA message points to...
  1270.  */
  1271. typedef struct tagCOPYDATASTRUCT {
  1272.     DWORD dwData;
  1273.     DWORD cbData;
  1274.     PVOID lpData;
  1275. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  1276.  
  1277. // begin_r_winuser
  1278.  
  1279. #if(WINVER >= 0x0400)
  1280. #define WM_NOTIFY                       0x004E
  1281. #define WM_INPUTLANGCHANGEREQUEST       0x0050
  1282. #define WM_INPUTLANGCHANGE              0x0051
  1283. #define WM_TCARD                        0x0052
  1284. #define WM_HELP                         0x0053
  1285. #define WM_USERCHANGED                  0x0054
  1286. #define WM_NOTIFYFORMAT                 0x0055
  1287.  
  1288. #define NFR_ANSI                             1
  1289. #define NFR_UNICODE                          2
  1290. #define NF_QUERY                             3
  1291. #define NF_REQUERY                           4
  1292.  
  1293. #define WM_CONTEXTMENU                  0x007B
  1294. #define WM_STYLECHANGING                0x007C
  1295. #define WM_STYLECHANGED                 0x007D
  1296. #define WM_DISPLAYCHANGE                0x007E
  1297. #define WM_GETICON                      0x007F
  1298. #define WM_SETICON                      0x0080
  1299. #endif /* WINVER >= 0x0400 */
  1300.  
  1301.  
  1302. #define WM_NCCREATE                     0x0081
  1303. #define WM_NCDESTROY                    0x0082
  1304. #define WM_NCCALCSIZE                   0x0083
  1305. #define WM_NCHITTEST                    0x0084
  1306. #define WM_NCPAINT                      0x0085
  1307. #define WM_NCACTIVATE                   0x0086
  1308. #define WM_GETDLGCODE                   0x0087
  1309.  
  1310. #define WM_NCMOUSEMOVE                  0x00A0
  1311. #define WM_NCLBUTTONDOWN                0x00A1
  1312. #define WM_NCLBUTTONUP                  0x00A2
  1313. #define WM_NCLBUTTONDBLCLK              0x00A3
  1314. #define WM_NCRBUTTONDOWN                0x00A4
  1315. #define WM_NCRBUTTONUP                  0x00A5
  1316. #define WM_NCRBUTTONDBLCLK              0x00A6
  1317. #define WM_NCMBUTTONDOWN                0x00A7
  1318. #define WM_NCMBUTTONUP                  0x00A8
  1319. #define WM_NCMBUTTONDBLCLK              0x00A9
  1320.  
  1321. #define WM_KEYFIRST                     0x0100
  1322. #define WM_KEYDOWN                      0x0100
  1323. #define WM_KEYUP                        0x0101
  1324. #define WM_CHAR                         0x0102
  1325. #define WM_DEADCHAR                     0x0103
  1326. #define WM_SYSKEYDOWN                   0x0104
  1327. #define WM_SYSKEYUP                     0x0105
  1328. #define WM_SYSCHAR                      0x0106
  1329. #define WM_SYSDEADCHAR                  0x0107
  1330. #define WM_KEYLAST                      0x0108
  1331.  
  1332. #if(WINVER >= 0x0400)
  1333. #define WM_IME_STARTCOMPOSITION         0x010D
  1334. #define WM_IME_ENDCOMPOSITION           0x010E
  1335. #define WM_IME_COMPOSITION              0x010F
  1336. #define WM_IME_KEYLAST                  0x010F
  1337. #endif /* WINVER >= 0x0400 */
  1338.  
  1339. #define WM_INITDIALOG                   0x0110
  1340. #define WM_COMMAND                      0x0111
  1341. #define WM_SYSCOMMAND                   0x0112
  1342. #define WM_TIMER                        0x0113
  1343. #define WM_HSCROLL                      0x0114
  1344. #define WM_VSCROLL                      0x0115
  1345. #define WM_INITMENU                     0x0116
  1346. #define WM_INITMENUPOPUP                0x0117
  1347. #define WM_MENUSELECT                   0x011F
  1348. #define WM_MENUCHAR                     0x0120
  1349. #define WM_ENTERIDLE                    0x0121
  1350.  
  1351. #define WM_CTLCOLORMSGBOX               0x0132
  1352. #define WM_CTLCOLOREDIT                 0x0133
  1353. #define WM_CTLCOLORLISTBOX              0x0134
  1354. #define WM_CTLCOLORBTN                  0x0135
  1355. #define WM_CTLCOLORDLG                  0x0136
  1356. #define WM_CTLCOLORSCROLLBAR            0x0137
  1357. #define WM_CTLCOLORSTATIC               0x0138
  1358.  
  1359.  
  1360.  
  1361. #define WM_MOUSEFIRST                   0x0200
  1362. #define WM_MOUSEMOVE                    0x0200
  1363. #define WM_LBUTTONDOWN                  0x0201
  1364. #define WM_LBUTTONUP                    0x0202
  1365. #define WM_LBUTTONDBLCLK                0x0203
  1366. #define WM_RBUTTONDOWN                  0x0204
  1367. #define WM_RBUTTONUP                    0x0205
  1368. #define WM_RBUTTONDBLCLK                0x0206
  1369. #define WM_MBUTTONDOWN                  0x0207
  1370. #define WM_MBUTTONUP                    0x0208
  1371. #define WM_MBUTTONDBLCLK                0x0209
  1372. #if(_WIN32_WINNT >= 0x0400)
  1373. #define WM_MOUSEWHEEL                   0x020A
  1374. #endif /* _WIN32_WINNT >= 0x0400 */
  1375. #if (_WIN32_WINNT < 0x0400)
  1376. #define WM_MOUSELAST                    0x0209
  1377. #else
  1378. #define WM_MOUSELAST                    0x020A
  1379. #endif /* if (_WIN32_WINNT < 0x0400) */
  1380.  
  1381. #if(_WIN32_WINNT >= 0x0400)
  1382. #define WHEEL_DELTA                     120     /* Value for rolling one detent */
  1383. #endif /* _WIN32_WINNT >= 0x0400 */
  1384. #if(_WIN32_WINNT >= 0x0400)
  1385. #define WHEEL_PAGESCROLL                (UINT_MAX) /* Scroll one page */
  1386. #endif /* _WIN32_WINNT >= 0x0400 */
  1387.  
  1388. #define WM_PARENTNOTIFY                 0x0210
  1389. #define MENULOOP_WINDOW                 0
  1390. #define MENULOOP_POPUP                  1
  1391. #define WM_ENTERMENULOOP                0x0211
  1392. #define WM_EXITMENULOOP                 0x0212
  1393.  
  1394. #if(WINVER >= 0x0400)
  1395. #define WM_NEXTMENU                     0x0213
  1396. // end_r_winuser
  1397.  
  1398. typedef struct tagMDINEXTMENU
  1399. {
  1400.     HMENU   hmenuIn;
  1401.     HMENU   hmenuNext;
  1402.     HWND    hwndNext;
  1403. } MDINEXTMENU, * PMDINEXTMENU, FAR * LPMDINEXTMENU;
  1404.  
  1405. // begin_r_winuser
  1406. #define WM_SIZING                       0x0214
  1407. #define WM_CAPTURECHANGED               0x0215
  1408. #define WM_MOVING                       0x0216
  1409. #define WM_POWERBROADCAST               0x0218
  1410. #define WM_DEVICECHANGE                 0x0219
  1411.  
  1412. #define WM_IME_SETCONTEXT               0x0281
  1413. #define WM_IME_NOTIFY                   0x0282
  1414. #define WM_IME_CONTROL                  0x0283
  1415. #define WM_IME_COMPOSITIONFULL          0x0284
  1416. #define WM_IME_SELECT                   0x0285
  1417. #define WM_IME_CHAR                     0x0286
  1418. #define WM_IME_KEYDOWN                  0x0290
  1419. #define WM_IME_KEYUP                    0x0291
  1420. #endif /* WINVER >= 0x0400 */
  1421.  
  1422. #define WM_MDICREATE                    0x0220
  1423. #define WM_MDIDESTROY                   0x0221
  1424. #define WM_MDIACTIVATE                  0x0222
  1425. #define WM_MDIRESTORE                   0x0223
  1426. #define WM_MDINEXT                      0x0224
  1427. #define WM_MDIMAXIMIZE                  0x0225
  1428. #define WM_MDITILE                      0x0226
  1429. #define WM_MDICASCADE                   0x0227
  1430. #define WM_MDIICONARRANGE               0x0228
  1431. #define WM_MDIGETACTIVE                 0x0229
  1432.  
  1433.  
  1434.  
  1435. #define WM_MDISETMENU                   0x0230
  1436. #define WM_ENTERSIZEMOVE                0x0231
  1437. #define WM_EXITSIZEMOVE                 0x0232
  1438. #define WM_DROPFILES                    0x0233
  1439. #define WM_MDIREFRESHMENU               0x0234
  1440.  
  1441.  
  1442. #if(_WIN32_WINNT >= 0x0400)
  1443. #define WM_MOUSEHOVER                   0x02A1
  1444. #define WM_MOUSELEAVE                   0x02A3
  1445. #endif /* _WIN32_WINNT >= 0x0400 */
  1446.  
  1447. #define WM_CUT                          0x0300
  1448. #define WM_COPY                         0x0301
  1449. #define WM_PASTE                        0x0302
  1450. #define WM_CLEAR                        0x0303
  1451. #define WM_UNDO                         0x0304
  1452. #define WM_RENDERFORMAT                 0x0305
  1453. #define WM_RENDERALLFORMATS             0x0306
  1454. #define WM_DESTROYCLIPBOARD             0x0307
  1455. #define WM_DRAWCLIPBOARD                0x0308
  1456. #define WM_PAINTCLIPBOARD               0x0309
  1457. #define WM_VSCROLLCLIPBOARD             0x030A
  1458. #define WM_SIZECLIPBOARD                0x030B
  1459. #define WM_ASKCBFORMATNAME              0x030C
  1460. #define WM_CHANGECBCHAIN                0x030D
  1461. #define WM_HSCROLLCLIPBOARD             0x030E
  1462. #define WM_QUERYNEWPALETTE              0x030F
  1463. #define WM_PALETTEISCHANGING            0x0310
  1464. #define WM_PALETTECHANGED               0x0311
  1465. #define WM_HOTKEY                       0x0312
  1466.  
  1467. #if(WINVER >= 0x0400)
  1468. #define WM_PRINT                        0x0317
  1469. #define WM_PRINTCLIENT                  0x0318
  1470.  
  1471. #define WM_HANDHELDFIRST                0x0358
  1472. #define WM_HANDHELDLAST                 0x035F
  1473.  
  1474. #define WM_AFXFIRST                     0x0360
  1475. #define WM_AFXLAST                      0x037F
  1476. #endif /* WINVER >= 0x0400 */
  1477.  
  1478. #define WM_PENWINFIRST                  0x0380
  1479. #define WM_PENWINLAST                   0x038F
  1480.  
  1481.  
  1482.  
  1483.  
  1484. #if(WINVER >= 0x0400)
  1485. #define WM_APP                          0x8000
  1486. #endif /* WINVER >= 0x0400 */
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493. /*
  1494.  * NOTE: All Message Numbers below 0x0400 are RESERVED.
  1495.  *
  1496.  * Private Window Messages Start Here:
  1497.  */
  1498. #define WM_USER                         0x0400
  1499.  
  1500. #if(WINVER >= 0x0400)
  1501.  
  1502. /*  wParam for WM_SIZING message  */
  1503. #define WMSZ_LEFT           1
  1504. #define WMSZ_RIGHT          2
  1505. #define WMSZ_TOP            3
  1506. #define WMSZ_TOPLEFT        4
  1507. #define WMSZ_TOPRIGHT       5
  1508. #define WMSZ_BOTTOM         6
  1509. #define WMSZ_BOTTOMLEFT     7
  1510. #define WMSZ_BOTTOMRIGHT    8
  1511. #endif /* WINVER >= 0x0400 */
  1512.  
  1513. #ifndef NONCMESSAGES
  1514.  
  1515. /*
  1516.  * WM_SYNCTASK Commands
  1517.  */
  1518. #define ST_BEGINSWP         0
  1519. #define ST_ENDSWP           1
  1520.  
  1521. /*
  1522.  * WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  1523.  */
  1524. #define HTERROR             (-2)
  1525. #define HTTRANSPARENT       (-1)
  1526. #define HTNOWHERE           0
  1527. #define HTCLIENT            1
  1528. #define HTCAPTION           2
  1529. #define HTSYSMENU           3
  1530. #define HTGROWBOX           4
  1531. #define HTSIZE              HTGROWBOX
  1532. #define HTMENU              5
  1533. #define HTHSCROLL           6
  1534. #define HTVSCROLL           7
  1535. #define HTMINBUTTON         8
  1536. #define HTMAXBUTTON         9
  1537. #define HTLEFT              10
  1538. #define HTRIGHT             11
  1539. #define HTTOP               12
  1540. #define HTTOPLEFT           13
  1541. #define HTTOPRIGHT          14
  1542. #define HTBOTTOM            15
  1543. #define HTBOTTOMLEFT        16
  1544. #define HTBOTTOMRIGHT       17
  1545. #define HTBORDER            18
  1546. #define HTREDUCE            HTMINBUTTON
  1547. #define HTZOOM              HTMAXBUTTON
  1548. #define HTSIZEFIRST         HTLEFT
  1549. #define HTSIZELAST          HTBOTTOMRIGHT
  1550. #if(WINVER >= 0x0400)
  1551. #define HTOBJECT            19
  1552. #define HTCLOSE             20
  1553. #define HTHELP              21
  1554. #endif /* WINVER >= 0x0400 */
  1555.  
  1556. /*
  1557.  * SendMessageTimeout values
  1558.  */
  1559. #define SMTO_NORMAL         0x0000
  1560. #define SMTO_BLOCK          0x0001
  1561. #define SMTO_ABORTIFHUNG    0x0002
  1562.  
  1563. #endif /* !NONCMESSAGES */
  1564.  
  1565. /*
  1566.  * WM_MOUSEACTIVATE Return Codes
  1567.  */
  1568. #define MA_ACTIVATE         1
  1569. #define MA_ACTIVATEANDEAT   2
  1570. #define MA_NOACTIVATE       3
  1571. #define MA_NOACTIVATEANDEAT 4
  1572.  
  1573. /*
  1574.  * WM_SETICON / WM_GETICON Type Codes
  1575.  */
  1576. #define ICON_SMALL          0
  1577. #define ICON_BIG            1
  1578.  
  1579. // end_r_winuser
  1580.  
  1581. WINUSERAPI
  1582. UINT
  1583. WINAPI
  1584. RegisterWindowMessageA(
  1585.     LPCSTR lpString);
  1586. WINUSERAPI
  1587. UINT
  1588. WINAPI
  1589. RegisterWindowMessageW(
  1590.     LPCWSTR lpString);
  1591. #ifdef UNICODE
  1592. #define RegisterWindowMessage  RegisterWindowMessageW
  1593. #else
  1594. #define RegisterWindowMessage  RegisterWindowMessageA
  1595. #endif // !UNICODE
  1596.  
  1597. // begin_r_winuser
  1598.  
  1599. /*
  1600.  * WM_SIZE message wParam values
  1601.  */
  1602. #define SIZE_RESTORED       0
  1603. #define SIZE_MINIMIZED      1
  1604. #define SIZE_MAXIMIZED      2
  1605. #define SIZE_MAXSHOW        3
  1606. #define SIZE_MAXHIDE        4
  1607.  
  1608. /*
  1609.  * Obsolete constant names
  1610.  */
  1611. #define SIZENORMAL          SIZE_RESTORED
  1612. #define SIZEICONIC          SIZE_MINIMIZED
  1613. #define SIZEFULLSCREEN      SIZE_MAXIMIZED
  1614. #define SIZEZOOMSHOW        SIZE_MAXSHOW
  1615. #define SIZEZOOMHIDE        SIZE_MAXHIDE
  1616.  
  1617. // end_r_winuser
  1618. /*
  1619.  * WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
  1620.  */
  1621. typedef struct tagWINDOWPOS {
  1622.     HWND    hwnd;
  1623.     HWND    hwndInsertAfter;
  1624.     int     x;
  1625.     int     y;
  1626.     int     cx;
  1627.     int     cy;
  1628.     UINT    flags;
  1629. } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
  1630.  
  1631. /*
  1632.  * WM_NCCALCSIZE parameter structure
  1633.  */
  1634. typedef struct tagNCCALCSIZE_PARAMS {
  1635.     RECT       rgrc[3];
  1636.     PWINDOWPOS lppos;
  1637. } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
  1638.  
  1639. // begin_r_winuser
  1640. /*
  1641.  * WM_NCCALCSIZE "window valid rect" return values
  1642.  */
  1643. #define WVR_ALIGNTOP        0x0010
  1644. #define WVR_ALIGNLEFT       0x0020
  1645. #define WVR_ALIGNBOTTOM     0x0040
  1646. #define WVR_ALIGNRIGHT      0x0080
  1647. #define WVR_HREDRAW         0x0100
  1648. #define WVR_VREDRAW         0x0200
  1649. #define WVR_REDRAW         (WVR_HREDRAW | \
  1650.                             WVR_VREDRAW)
  1651. #define WVR_VALIDRECTS      0x0400
  1652.  
  1653.  
  1654. #ifndef NOKEYSTATES
  1655.  
  1656. /*
  1657.  * Key State Masks for Mouse Messages
  1658.  */
  1659. #define MK_LBUTTON          0x0001
  1660. #define MK_RBUTTON          0x0002
  1661. #define MK_SHIFT            0x0004
  1662. #define MK_CONTROL          0x0008
  1663. #define MK_MBUTTON          0x0010
  1664.  
  1665. #endif /* !NOKEYSTATES */
  1666.  
  1667. #if(_WIN32_WINNT >= 0x0400)
  1668. #ifndef NOTRACKMOUSEEVENT
  1669.  
  1670. #define TME_HOVER       0x00000001
  1671. #define TME_LEAVE       0x00000002
  1672. #define TME_QUERY       0x40000000
  1673. #define TME_CANCEL      0x80000000
  1674.  
  1675.  
  1676. #define HOVER_DEFAULT   0xFFFFFFFF
  1677. // end_r_winuser
  1678.  
  1679. typedef struct tagTRACKMOUSEEVENT {
  1680.     DWORD cbSize;
  1681.     DWORD dwFlags;
  1682.     HWND  hwndTrack;
  1683.     DWORD dwHoverTime;
  1684. } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
  1685.  
  1686. WINUSERAPI
  1687. BOOL
  1688. WINAPI
  1689. TrackMouseEvent(
  1690.     LPTRACKMOUSEEVENT lpEventTrack);
  1691.  
  1692. // begin_r_winuser
  1693.  
  1694. #endif /* !NOTRACKMOUSEEVENT */
  1695. #endif /* _WIN32_WINNT >= 0x0400 */
  1696.  
  1697. // end_r_winuser
  1698.  
  1699. #endif /* !NOWINMESSAGES */
  1700.  
  1701. #ifndef NOWINSTYLES
  1702.  
  1703. // begin_r_winuser
  1704.  
  1705. /*
  1706.  * Window Styles
  1707.  */
  1708. #define WS_OVERLAPPED       0x00000000L
  1709. #define WS_POPUP            0x80000000L
  1710. #define WS_CHILD            0x40000000L
  1711. #define WS_MINIMIZE         0x20000000L
  1712. #define WS_VISIBLE          0x10000000L
  1713. #define WS_DISABLED         0x08000000L
  1714. #define WS_CLIPSIBLINGS     0x04000000L
  1715. #define WS_CLIPCHILDREN     0x02000000L
  1716. #define WS_MAXIMIZE         0x01000000L
  1717. #define WS_CAPTION          0x00C00000L     /* WS_BORDER | WS_DLGFRAME  */
  1718. #define WS_BORDER           0x00800000L
  1719. #define WS_DLGFRAME         0x00400000L
  1720. #define WS_VSCROLL          0x00200000L
  1721. #define WS_HSCROLL          0x00100000L
  1722. #define WS_SYSMENU          0x00080000L
  1723. #define WS_THICKFRAME       0x00040000L
  1724. #define WS_GROUP            0x00020000L
  1725. #define WS_TABSTOP          0x00010000L
  1726.  
  1727. #define WS_MINIMIZEBOX      0x00020000L
  1728. #define WS_MAXIMIZEBOX      0x00010000L
  1729.  
  1730. #define WS_TILED            WS_OVERLAPPED
  1731. #define WS_ICONIC           WS_MINIMIZE
  1732. #define WS_SIZEBOX          WS_THICKFRAME
  1733. #define WS_TILEDWINDOW      WS_OVERLAPPEDWINDOW
  1734.  
  1735. /*
  1736.  * Common Window Styles
  1737.  */
  1738. #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED     | \
  1739.                              WS_CAPTION        | \
  1740.                              WS_SYSMENU        | \
  1741.                              WS_THICKFRAME     | \
  1742.                              WS_MINIMIZEBOX    | \
  1743.                              WS_MAXIMIZEBOX)
  1744.  
  1745. #define WS_POPUPWINDOW      (WS_POPUP          | \
  1746.                              WS_BORDER         | \
  1747.                              WS_SYSMENU)
  1748.  
  1749. #define WS_CHILDWINDOW      (WS_CHILD)
  1750.  
  1751. /*
  1752.  * Extended Window Styles
  1753.  */
  1754. #define WS_EX_DLGMODALFRAME     0x00000001L
  1755. #define WS_EX_NOPARENTNOTIFY    0x00000004L
  1756. #define WS_EX_TOPMOST           0x00000008L
  1757. #define WS_EX_ACCEPTFILES       0x00000010L
  1758. #define WS_EX_TRANSPARENT       0x00000020L
  1759. #if(WINVER >= 0x0400)
  1760. #define WS_EX_MDICHILD          0x00000040L
  1761. #define WS_EX_TOOLWINDOW        0x00000080L
  1762. #define WS_EX_WINDOWEDGE        0x00000100L
  1763. #define WS_EX_CLIENTEDGE        0x00000200L
  1764. #define WS_EX_CONTEXTHELP       0x00000400L
  1765.  
  1766. #define WS_EX_RIGHT             0x00001000L
  1767. #define WS_EX_LEFT              0x00000000L
  1768. #define WS_EX_RTLREADING        0x00002000L
  1769. #define WS_EX_LTRREADING        0x00000000L
  1770. #define WS_EX_LEFTSCROLLBAR     0x00004000L
  1771. #define WS_EX_RIGHTSCROLLBAR    0x00000000L
  1772.  
  1773. #define WS_EX_CONTROLPARENT     0x00010000L
  1774. #define WS_EX_STATICEDGE        0x00020000L
  1775. #define WS_EX_APPWINDOW         0x00040000L
  1776.  
  1777.  
  1778. #define WS_EX_OVERLAPPEDWINDOW  (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
  1779. #define WS_EX_PALETTEWINDOW     (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
  1780.  
  1781. #endif /* WINVER >= 0x0400 */
  1782.  
  1783.  
  1784.  
  1785. /*
  1786.  * Class styles
  1787.  */
  1788. #define CS_VREDRAW          0x0001
  1789. #define CS_HREDRAW          0x0002
  1790. #define CS_KEYCVTWINDOW     0x0004
  1791. #define CS_DBLCLKS          0x0008
  1792. #define CS_OWNDC            0x0020
  1793. #define CS_CLASSDC          0x0040
  1794. #define CS_PARENTDC         0x0080
  1795. #define CS_NOKEYCVT         0x0100
  1796. #define CS_NOCLOSE          0x0200
  1797. #define CS_SAVEBITS         0x0800
  1798. #define CS_BYTEALIGNCLIENT  0x1000
  1799. #define CS_BYTEALIGNWINDOW  0x2000
  1800. #define CS_GLOBALCLASS      0x4000
  1801.  
  1802. #if(WINVER >= 0x0400)
  1803. #define CS_IME              0x00010000
  1804. #endif /* WINVER >= 0x0400 */
  1805.  
  1806.  
  1807. // end_r_winuser
  1808.  
  1809. #endif /* !NOWINSTYLES */
  1810. #if(WINVER >= 0x0400)
  1811. /* WM_PRINT flags */
  1812. #define PRF_CHECKVISIBLE    0x00000001L
  1813. #define PRF_NONCLIENT       0x00000002L
  1814. #define PRF_CLIENT          0x00000004L
  1815. #define PRF_ERASEBKGND      0x00000008L
  1816. #define PRF_CHILDREN        0x00000010L
  1817. #define PRF_OWNED           0x00000020L
  1818.  
  1819. /* 3D border styles */
  1820. #define BDR_RAISEDOUTER 0x0001
  1821. #define BDR_SUNKENOUTER 0x0002
  1822. #define BDR_RAISEDINNER 0x0004
  1823. #define BDR_SUNKENINNER 0x0008
  1824.  
  1825. #define BDR_OUTER       0x0003
  1826. #define BDR_INNER       0x000c
  1827. #define BDR_RAISED      0x0005
  1828. #define BDR_SUNKEN      0x000a
  1829.  
  1830.  
  1831. #define EDGE_RAISED     (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  1832. #define EDGE_SUNKEN     (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  1833. #define EDGE_ETCHED     (BDR_SUNKENOUTER | BDR_RAISEDINNER)
  1834. #define EDGE_BUMP       (BDR_RAISEDOUTER | BDR_SUNKENINNER)
  1835.  
  1836. /* Border flags */
  1837. #define BF_LEFT         0x0001
  1838. #define BF_TOP          0x0002
  1839. #define BF_RIGHT        0x0004
  1840. #define BF_BOTTOM       0x0008
  1841.  
  1842. #define BF_TOPLEFT      (BF_TOP | BF_LEFT)
  1843. #define BF_TOPRIGHT     (BF_TOP | BF_RIGHT)
  1844. #define BF_BOTTOMLEFT   (BF_BOTTOM | BF_LEFT)
  1845. #define BF_BOTTOMRIGHT  (BF_BOTTOM | BF_RIGHT)
  1846. #define BF_RECT         (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM)
  1847.  
  1848. #define BF_DIAGONAL     0x0010
  1849.  
  1850. // For diagonal lines, the BF_RECT flags specify the end point of the
  1851. // vector bounded by the rectangle parameter.
  1852. #define BF_DIAGONAL_ENDTOPRIGHT     (BF_DIAGONAL | BF_TOP | BF_RIGHT)
  1853. #define BF_DIAGONAL_ENDTOPLEFT      (BF_DIAGONAL | BF_TOP | BF_LEFT)
  1854. #define BF_DIAGONAL_ENDBOTTOMLEFT   (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
  1855. #define BF_DIAGONAL_ENDBOTTOMRIGHT  (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
  1856.  
  1857.  
  1858. #define BF_MIDDLE       0x0800  /* Fill in the middle */
  1859. #define BF_SOFT         0x1000  /* For softer buttons */
  1860. #define BF_ADJUST       0x2000  /* Calculate the space left over */
  1861. #define BF_FLAT         0x4000  /* For flat rather than 3D borders */
  1862. #define BF_MONO         0x8000  /* For monochrome borders */
  1863.  
  1864.  
  1865. WINUSERAPI BOOL WINAPI DrawEdge(HDC hdc, LPRECT qrc, UINT edge, UINT grfFlags);
  1866.  
  1867. /* flags for DrawFrameControl */
  1868.  
  1869. #define DFC_CAPTION             1
  1870. #define DFC_MENU                2
  1871. #define DFC_SCROLL              3
  1872. #define DFC_BUTTON              4
  1873.  
  1874. #define DFCS_CAPTIONCLOSE       0x0000
  1875. #define DFCS_CAPTIONMIN         0x0001
  1876. #define DFCS_CAPTIONMAX         0x0002
  1877. #define DFCS_CAPTIONRESTORE     0x0003
  1878. #define DFCS_CAPTIONHELP        0x0004
  1879.  
  1880. #define DFCS_MENUARROW          0x0000
  1881. #define DFCS_MENUCHECK          0x0001
  1882. #define DFCS_MENUBULLET         0x0002
  1883. #define DFCS_MENUARROWRIGHT     0x0004
  1884.  
  1885. #define DFCS_SCROLLUP           0x0000
  1886. #define DFCS_SCROLLDOWN         0x0001
  1887. #define DFCS_SCROLLLEFT         0x0002
  1888. #define DFCS_SCROLLRIGHT        0x0003
  1889. #define DFCS_SCROLLCOMBOBOX     0x0005
  1890. #define DFCS_SCROLLSIZEGRIP     0x0008
  1891. #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
  1892.  
  1893. #define DFCS_BUTTONCHECK        0x0000
  1894. #define DFCS_BUTTONRADIOIMAGE   0x0001
  1895. #define DFCS_BUTTONRADIOMASK    0x0002
  1896. #define DFCS_BUTTONRADIO        0x0004
  1897. #define DFCS_BUTTON3STATE       0x0008
  1898. #define DFCS_BUTTONPUSH         0x0010
  1899.  
  1900. #define DFCS_INACTIVE           0x0100
  1901. #define DFCS_PUSHED             0x0200
  1902. #define DFCS_CHECKED            0x0400
  1903. #define DFCS_ADJUSTRECT         0x2000
  1904. #define DFCS_FLAT               0x4000
  1905. #define DFCS_MONO               0x8000
  1906.  
  1907. WINUSERAPI BOOL    WINAPI DrawFrameControl(HDC, LPRECT, UINT, UINT);
  1908.  
  1909.  
  1910. /* flags for DrawCaption */
  1911. #define DC_ACTIVE           0x0001
  1912. #define DC_SMALLCAP         0x0002
  1913. #define DC_ICON             0x0004
  1914. #define DC_TEXT             0x0008
  1915. #define DC_INBUTTON         0x0010
  1916.  
  1917. WINUSERAPI BOOL    WINAPI DrawCaption(HWND, HDC, CONST RECT *, UINT);
  1918.  
  1919. #define IDANI_OPEN          1
  1920. #define IDANI_CLOSE         2
  1921. #define IDANI_CAPTION       3
  1922.  
  1923.  
  1924. WINUSERAPI BOOL    WINAPI DrawAnimatedRects(HWND hwnd, int idAni, CONST RECT * lprcFrom, CONST RECT * lprcTo);
  1925.  
  1926. #endif /* WINVER >= 0x0400 */
  1927.  
  1928. #ifndef NOCLIPBOARD
  1929.  
  1930. // begin_r_winuser
  1931.  
  1932. /*
  1933.  * Predefined Clipboard Formats
  1934.  */
  1935. #define CF_TEXT             1
  1936. #define CF_BITMAP           2
  1937. #define CF_METAFILEPICT     3
  1938. #define CF_SYLK             4
  1939. #define CF_DIF              5
  1940. #define CF_TIFF             6
  1941. #define CF_OEMTEXT          7
  1942. #define CF_DIB              8
  1943. #define CF_PALETTE          9
  1944. #define CF_PENDATA          10
  1945. #define CF_RIFF             11
  1946. #define CF_WAVE             12
  1947. #define CF_UNICODETEXT      13
  1948. #define CF_ENHMETAFILE      14
  1949. #if(WINVER >= 0x0400)
  1950. #define CF_HDROP            15
  1951. #define CF_LOCALE           16
  1952. #define CF_MAX              17
  1953. #endif /* WINVER >= 0x0400 */
  1954.  
  1955. #define CF_OWNERDISPLAY     0x0080
  1956. #define CF_DSPTEXT          0x0081
  1957. #define CF_DSPBITMAP        0x0082
  1958. #define CF_DSPMETAFILEPICT  0x0083
  1959. #define CF_DSPENHMETAFILE   0x008E
  1960.  
  1961. /*
  1962.  * "Private" formats don't get GlobalFree()'d
  1963.  */
  1964. #define CF_PRIVATEFIRST     0x0200
  1965. #define CF_PRIVATELAST      0x02FF
  1966.  
  1967. /*
  1968.  * "GDIOBJ" formats do get DeleteObject()'d
  1969.  */
  1970. #define CF_GDIOBJFIRST      0x0300
  1971. #define CF_GDIOBJLAST       0x03FF
  1972.  
  1973. // end_r_winuser
  1974.  
  1975. #endif /* !NOCLIPBOARD */
  1976.  
  1977. /*
  1978.  * Defines for the fVirt field of the Accelerator table structure.
  1979.  */
  1980. #define FVIRTKEY  TRUE          /* Assumed to be == TRUE */
  1981. #define FNOINVERT 0x02
  1982. #define FSHIFT    0x04
  1983. #define FCONTROL  0x08
  1984. #define FALT      0x10
  1985.  
  1986. typedef struct tagACCEL {
  1987.     BYTE   fVirt;               /* Also called the flags field */
  1988.     WORD   key;
  1989.     WORD   cmd;
  1990. } ACCEL, *LPACCEL;
  1991.  
  1992. typedef struct tagPAINTSTRUCT {
  1993.     HDC         hdc;
  1994.     BOOL        fErase;
  1995.     RECT        rcPaint;
  1996.     BOOL        fRestore;
  1997.     BOOL        fIncUpdate;
  1998.     BYTE        rgbReserved[32];
  1999. } PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, *LPPAINTSTRUCT;
  2000.  
  2001. typedef struct tagCREATESTRUCTA {
  2002.     LPVOID      lpCreateParams;
  2003.     HINSTANCE   hInstance;
  2004.     HMENU       hMenu;
  2005.     HWND        hwndParent;
  2006.     int         cy;
  2007.     int         cx;
  2008.     int         y;
  2009.     int         x;
  2010.     LONG        style;
  2011.     LPCSTR      lpszName;
  2012.     LPCSTR      lpszClass;
  2013.     DWORD       dwExStyle;
  2014. } CREATESTRUCTA, *LPCREATESTRUCTA;
  2015. typedef struct tagCREATESTRUCTW {
  2016.     LPVOID      lpCreateParams;
  2017.     HINSTANCE   hInstance;
  2018.     HMENU       hMenu;
  2019.     HWND        hwndParent;
  2020.     int         cy;
  2021.     int         cx;
  2022.     int         y;
  2023.     int         x;
  2024.     LONG        style;
  2025.     LPCWSTR     lpszName;
  2026.     LPCWSTR     lpszClass;
  2027.     DWORD       dwExStyle;
  2028. } CREATESTRUCTW, *LPCREATESTRUCTW;
  2029. #ifdef UNICODE
  2030. typedef CREATESTRUCTW CREATESTRUCT;
  2031. typedef LPCREATESTRUCTW LPCREATESTRUCT;
  2032. #else
  2033. typedef CREATESTRUCTA CREATESTRUCT;
  2034. typedef LPCREATESTRUCTA LPCREATESTRUCT;
  2035. #endif // UNICODE
  2036.  
  2037. typedef struct tagWINDOWPLACEMENT {
  2038.     UINT  length;
  2039.     UINT  flags;
  2040.     UINT  showCmd;
  2041.     POINT ptMinPosition;
  2042.     POINT ptMaxPosition;
  2043.     RECT  rcNormalPosition;
  2044. } WINDOWPLACEMENT;
  2045. typedef WINDOWPLACEMENT *PWINDOWPLACEMENT, *LPWINDOWPLACEMENT;
  2046.  
  2047. #define WPF_SETMINPOSITION      0x0001
  2048. #define WPF_RESTORETOMAXIMIZED  0x0002
  2049. #if(WINVER >= 0x0400)
  2050. typedef struct tagNMHDR
  2051. {
  2052.     HWND  hwndFrom;
  2053.     UINT  idFrom;
  2054.     UINT  code;         // NM_ code
  2055. }   NMHDR;
  2056. typedef NMHDR FAR * LPNMHDR;
  2057.  
  2058. typedef struct tagSTYLESTRUCT
  2059. {
  2060.     DWORD   styleOld;
  2061.     DWORD   styleNew;
  2062. } STYLESTRUCT, * LPSTYLESTRUCT;
  2063. #endif /* WINVER >= 0x0400 */
  2064.  
  2065.  
  2066. /*
  2067.  * Owner draw control types
  2068.  */
  2069. #define ODT_MENU        1
  2070. #define ODT_LISTBOX     2
  2071. #define ODT_COMBOBOX    3
  2072. #define ODT_BUTTON      4
  2073. #if(WINVER >= 0x0400)
  2074. #define ODT_STATIC      5
  2075. #endif /* WINVER >= 0x0400 */
  2076.  
  2077. /*
  2078.  * Owner draw actions
  2079.  */
  2080. #define ODA_DRAWENTIRE  0x0001
  2081. #define ODA_SELECT      0x0002
  2082. #define ODA_FOCUS       0x0004
  2083.  
  2084. /*
  2085.  * Owner draw state
  2086.  */
  2087. #define ODS_SELECTED    0x0001
  2088. #define ODS_GRAYED      0x0002
  2089. #define ODS_DISABLED    0x0004
  2090. #define ODS_CHECKED     0x0008
  2091. #define ODS_FOCUS       0x0010
  2092. #if(WINVER >= 0x0400)
  2093. #define ODS_DEFAULT         0x0020
  2094. #define ODS_COMBOBOXEDIT    0x1000
  2095. #endif /* WINVER >= 0x0400 */
  2096.  
  2097. /*
  2098.  * MEASUREITEMSTRUCT for ownerdraw
  2099.  */
  2100. typedef struct tagMEASUREITEMSTRUCT {
  2101.     UINT       CtlType;
  2102.     UINT       CtlID;
  2103.     UINT       itemID;
  2104.     UINT       itemWidth;
  2105.     UINT       itemHeight;
  2106.     DWORD      itemData;
  2107. } MEASUREITEMSTRUCT, NEAR *PMEASUREITEMSTRUCT, FAR *LPMEASUREITEMSTRUCT;
  2108.  
  2109.  
  2110.  
  2111. /*
  2112.  * DRAWITEMSTRUCT for ownerdraw
  2113.  */
  2114. typedef struct tagDRAWITEMSTRUCT {
  2115.     UINT        CtlType;
  2116.     UINT        CtlID;
  2117.     UINT        itemID;
  2118.     UINT        itemAction;
  2119.     UINT        itemState;
  2120.     HWND        hwndItem;
  2121.     HDC         hDC;
  2122.     RECT        rcItem;
  2123.     DWORD       itemData;
  2124. } DRAWITEMSTRUCT, NEAR *PDRAWITEMSTRUCT, FAR *LPDRAWITEMSTRUCT;
  2125.  
  2126. /*
  2127.  * DELETEITEMSTRUCT for ownerdraw
  2128.  */
  2129. typedef struct tagDELETEITEMSTRUCT {
  2130.     UINT       CtlType;
  2131.     UINT       CtlID;
  2132.     UINT       itemID;
  2133.     HWND       hwndItem;
  2134.     UINT       itemData;
  2135. } DELETEITEMSTRUCT, NEAR *PDELETEITEMSTRUCT, FAR *LPDELETEITEMSTRUCT;
  2136.  
  2137. /*
  2138.  * COMPAREITEMSTUCT for ownerdraw sorting
  2139.  */
  2140. typedef struct tagCOMPAREITEMSTRUCT {
  2141.     UINT        CtlType;
  2142.     UINT        CtlID;
  2143.     HWND        hwndItem;
  2144.     UINT        itemID1;
  2145.     DWORD       itemData1;
  2146.     UINT        itemID2;
  2147.     DWORD       itemData2;
  2148.     DWORD       dwLocaleId;
  2149. } COMPAREITEMSTRUCT, NEAR *PCOMPAREITEMSTRUCT, FAR *LPCOMPAREITEMSTRUCT;
  2150.  
  2151. #ifndef NOMSG
  2152.  
  2153. /*
  2154.  * Message Function Templates
  2155.  */
  2156.  
  2157. WINUSERAPI
  2158. BOOL
  2159. WINAPI
  2160. GetMessageA(
  2161.     LPMSG lpMsg,
  2162.     HWND hWnd ,
  2163.     UINT wMsgFilterMin,
  2164.     UINT wMsgFilterMax);
  2165. WINUSERAPI
  2166. BOOL
  2167. WINAPI
  2168. GetMessageW(
  2169.     LPMSG lpMsg,
  2170.     HWND hWnd ,
  2171.     UINT wMsgFilterMin,
  2172.     UINT wMsgFilterMax);
  2173. #ifdef UNICODE
  2174. #define GetMessage  GetMessageW
  2175. #else
  2176. #define GetMessage  GetMessageA
  2177. #endif // !UNICODE
  2178.  
  2179. WINUSERAPI
  2180. BOOL
  2181. WINAPI
  2182. TranslateMessage(
  2183.     CONST MSG *lpMsg);
  2184.  
  2185. WINUSERAPI
  2186. LONG
  2187. WINAPI
  2188. DispatchMessageA(
  2189.     CONST MSG *lpMsg);
  2190. WINUSERAPI
  2191. LONG
  2192. WINAPI
  2193. DispatchMessageW(
  2194.     CONST MSG *lpMsg);
  2195. #ifdef UNICODE
  2196. #define DispatchMessage  DispatchMessageW
  2197. #else
  2198. #define DispatchMessage  DispatchMessageA
  2199. #endif // !UNICODE
  2200.  
  2201.  
  2202. WINUSERAPI
  2203. BOOL
  2204. WINAPI
  2205. SetMessageQueue(
  2206.     int cMessagesMax);
  2207.  
  2208. WINUSERAPI
  2209. BOOL
  2210. WINAPI
  2211. PeekMessageA(
  2212.     LPMSG lpMsg,
  2213.     HWND hWnd ,
  2214.     UINT wMsgFilterMin,
  2215.     UINT wMsgFilterMax,
  2216.     UINT wRemoveMsg);
  2217. WINUSERAPI
  2218. BOOL
  2219. WINAPI
  2220. PeekMessageW(
  2221.     LPMSG lpMsg,
  2222.     HWND hWnd ,
  2223.     UINT wMsgFilterMin,
  2224.     UINT wMsgFilterMax,
  2225.     UINT wRemoveMsg);
  2226. #ifdef UNICODE
  2227. #define PeekMessage  PeekMessageW
  2228. #else
  2229. #define PeekMessage  PeekMessageA
  2230. #endif // !UNICODE
  2231.  
  2232. /*
  2233.  * PeekMessage() Options
  2234.  */
  2235. #define PM_NOREMOVE         0x0000
  2236. #define PM_REMOVE           0x0001
  2237. #define PM_NOYIELD          0x0002
  2238.  
  2239. #endif /* !NOMSG */
  2240.  
  2241. WINUSERAPI
  2242. BOOL
  2243. WINAPI
  2244. RegisterHotKey(
  2245.     HWND hWnd ,
  2246.     int id,
  2247.     UINT fsModifiers,
  2248.     UINT vk);
  2249.  
  2250. WINUSERAPI
  2251. BOOL
  2252. WINAPI
  2253. UnregisterHotKey(
  2254.     HWND hWnd,
  2255.     int id);
  2256.  
  2257. #define MOD_ALT         0x0001
  2258. #define MOD_CONTROL     0x0002
  2259. #define MOD_SHIFT       0x0004
  2260. #define MOD_WIN         0x0008
  2261.  
  2262.  
  2263. #define IDHOT_SNAPWINDOW        (-1)    /* SHIFT-PRINTSCRN  */
  2264. #define IDHOT_SNAPDESKTOP       (-2)    /* PRINTSCRN        */
  2265.  
  2266. #ifdef WIN_INTERNAL
  2267.     #ifndef LSTRING
  2268.     #define NOLSTRING
  2269.     #endif /* LSTRING */
  2270.     #ifndef LFILEIO
  2271.     #define NOLFILEIO
  2272.     #endif /* LFILEIO */
  2273. #endif /* WIN_INTERNAL */
  2274.  
  2275. #if(WINVER >= 0x0400)
  2276. #define EW_RESTARTWINDOWS    0x0042L
  2277. #define EW_REBOOTSYSTEM      0x0043L
  2278. #define EW_EXITANDEXECAPP    0x0044L
  2279.  
  2280. #define ENDSESSION_LOGOFF    0x80000000
  2281. #endif /* WINVER >= 0x0400 */
  2282.  
  2283. #define EWX_LOGOFF   0
  2284. #define EWX_SHUTDOWN 1
  2285. #define EWX_REBOOT   2
  2286. #define EWX_FORCE    4
  2287. #define EWX_POWEROFF 8
  2288.  
  2289.  
  2290. #define ExitWindows(dwReserved, Code) ExitWindowsEx(EWX_LOGOFF, 0xFFFFFFFF)
  2291.  
  2292. WINUSERAPI
  2293. BOOL
  2294. WINAPI
  2295. ExitWindowsEx(
  2296.     UINT uFlags,
  2297.     DWORD dwReserved);
  2298.  
  2299. WINUSERAPI
  2300. BOOL
  2301. WINAPI
  2302. SwapMouseButton(
  2303.     BOOL fSwap);
  2304.  
  2305. WINUSERAPI
  2306. DWORD
  2307. WINAPI
  2308. GetMessagePos(
  2309.     VOID);
  2310.  
  2311. WINUSERAPI
  2312. LONG
  2313. WINAPI
  2314. GetMessageTime(
  2315.     VOID);
  2316.  
  2317. WINUSERAPI
  2318. LONG
  2319. WINAPI
  2320. GetMessageExtraInfo(
  2321.     VOID);
  2322.  
  2323. #if(WINVER >= 0x0400)
  2324. WINUSERAPI
  2325. LPARAM
  2326. WINAPI
  2327. SetMessageExtraInfo(
  2328.     LPARAM lParam);
  2329. #endif /* WINVER >= 0x0400 */
  2330.  
  2331. WINUSERAPI
  2332. LRESULT
  2333. WINAPI
  2334. SendMessageA(
  2335.     HWND hWnd,
  2336.     UINT Msg,
  2337.     WPARAM wParam,
  2338.     LPARAM lParam);
  2339. WINUSERAPI
  2340. LRESULT
  2341. WINAPI
  2342. SendMessageW(
  2343.     HWND hWnd,
  2344.     UINT Msg,
  2345.     WPARAM wParam,
  2346.     LPARAM lParam);
  2347. #ifdef UNICODE
  2348. #define SendMessage  SendMessageW
  2349. #else
  2350. #define SendMessage  SendMessageA
  2351. #endif // !UNICODE
  2352.  
  2353. WINUSERAPI
  2354. LRESULT
  2355. WINAPI
  2356. SendMessageTimeoutA(
  2357.     HWND hWnd,
  2358.     UINT Msg,
  2359.     WPARAM wParam,
  2360.     LPARAM lParam,
  2361.     UINT fuFlags,
  2362.     UINT uTimeout,
  2363.     LPDWORD lpdwResult);
  2364. WINUSERAPI
  2365. LRESULT
  2366. WINAPI
  2367. SendMessageTimeoutW(
  2368.     HWND hWnd,
  2369.     UINT Msg,
  2370.     WPARAM wParam,
  2371.     LPARAM lParam,
  2372.     UINT fuFlags,
  2373.     UINT uTimeout,
  2374.     LPDWORD lpdwResult);
  2375. #ifdef UNICODE
  2376. #define SendMessageTimeout  SendMessageTimeoutW
  2377. #else
  2378. #define SendMessageTimeout  SendMessageTimeoutA
  2379. #endif // !UNICODE
  2380.  
  2381. WINUSERAPI
  2382. BOOL
  2383. WINAPI
  2384. SendNotifyMessageA(
  2385.     HWND hWnd,
  2386.     UINT Msg,
  2387.     WPARAM wParam,
  2388.     LPARAM lParam);
  2389. WINUSERAPI
  2390. BOOL
  2391. WINAPI
  2392. SendNotifyMessageW(
  2393.     HWND hWnd,
  2394.     UINT Msg,
  2395.     WPARAM wParam,
  2396.     LPARAM lParam);
  2397. #ifdef UNICODE
  2398. #define SendNotifyMessage  SendNotifyMessageW
  2399. #else
  2400. #define SendNotifyMessage  SendNotifyMessageA
  2401. #endif // !UNICODE
  2402.  
  2403. WINUSERAPI
  2404. BOOL
  2405. WINAPI
  2406. SendMessageCallbackA(
  2407.     HWND hWnd,
  2408.     UINT Msg,
  2409.     WPARAM wParam,
  2410.     LPARAM lParam,
  2411.     SENDASYNCPROC lpResultCallBack,
  2412.     DWORD dwData);
  2413. WINUSERAPI
  2414. BOOL
  2415. WINAPI
  2416. SendMessageCallbackW(
  2417.     HWND hWnd,
  2418.     UINT Msg,
  2419.     WPARAM wParam,
  2420.     LPARAM lParam,
  2421.     SENDASYNCPROC lpResultCallBack,
  2422.     DWORD dwData);
  2423. #ifdef UNICODE
  2424. #define SendMessageCallback  SendMessageCallbackW
  2425. #else
  2426. #define SendMessageCallback  SendMessageCallbackA
  2427. #endif // !UNICODE
  2428.  
  2429. #if(WINVER >= 0x0400)
  2430. WINUSERAPI long  WINAPI  BroadcastSystemMessageA(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
  2431. WINUSERAPI long  WINAPI  BroadcastSystemMessageW(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
  2432. #ifdef UNICODE
  2433. #define BroadcastSystemMessage  BroadcastSystemMessageW
  2434. #else
  2435. #define BroadcastSystemMessage  BroadcastSystemMessageA
  2436. #endif // !UNICODE
  2437. //Broadcast Special Message Recipient list
  2438. #define BSM_ALLCOMPONENTS       0x00000000
  2439. #define BSM_VXDS                0x00000001
  2440. #define BSM_NETDRIVER           0x00000002
  2441. #define BSM_INSTALLABLEDRIVERS  0x00000004
  2442. #define BSM_APPLICATIONS        0x00000008
  2443. #define BSM_ALLDESKTOPS         0x00000010
  2444.  
  2445. //Broadcast Special Message Flags
  2446. #define BSF_QUERY               0x00000001
  2447. #define BSF_IGNORECURRENTTASK   0x00000002
  2448. #define BSF_FLUSHDISK           0x00000004
  2449. #define BSF_NOHANG              0x00000008
  2450. #define BSF_POSTMESSAGE         0x00000010
  2451. #define BSF_FORCEIFHUNG         0x00000020
  2452. #define BSF_NOTIMEOUTIFNOTHUNG  0x00000040
  2453.  
  2454. typedef struct tagBROADCASTSYSMSG
  2455. {
  2456.     UINT    uiMessage;
  2457.     WPARAM  wParam;
  2458.     LPARAM  lParam;
  2459. } BROADCASTSYSMSG;
  2460. typedef BROADCASTSYSMSG  FAR *LPBROADCASTSYSMSG;
  2461.  
  2462. #define BROADCAST_QUERY_DENY         0x424D5144  // Return this value to deny a query.
  2463. #endif /* WINVER >= 0x0400 */
  2464.  
  2465. WINUSERAPI
  2466. BOOL
  2467. WINAPI
  2468. PostMessageA(
  2469.     HWND hWnd,
  2470.     UINT Msg,
  2471.     WPARAM wParam,
  2472.     LPARAM lParam);
  2473. WINUSERAPI
  2474. BOOL
  2475. WINAPI
  2476. PostMessageW(
  2477.     HWND hWnd,
  2478.     UINT Msg,
  2479.     WPARAM wParam,
  2480.     LPARAM lParam);
  2481. #ifdef UNICODE
  2482. #define PostMessage  PostMessageW
  2483. #else
  2484. #define PostMessage  PostMessageA
  2485. #endif // !UNICODE
  2486.  
  2487. WINUSERAPI
  2488. BOOL
  2489. WINAPI
  2490. PostThreadMessageA(
  2491.     DWORD idThread,
  2492.     UINT Msg,
  2493.     WPARAM wParam,
  2494.     LPARAM lParam);
  2495. WINUSERAPI
  2496. BOOL
  2497. WINAPI
  2498. PostThreadMessageW(
  2499.     DWORD idThread,
  2500.     UINT Msg,
  2501.     WPARAM wParam,
  2502.     LPARAM lParam);
  2503. #ifdef UNICODE
  2504. #define PostThreadMessage  PostThreadMessageW
  2505. #else
  2506. #define PostThreadMessage  PostThreadMessageA
  2507. #endif // !UNICODE
  2508.  
  2509. #define PostAppMessageA(idThread, wMsg, wParam, lParam)\
  2510.         PostThreadMessageA((DWORD)idThread, wMsg, wParam, lParam)
  2511. #define PostAppMessageW(idThread, wMsg, wParam, lParam)\
  2512.         PostThreadMessageW((DWORD)idThread, wMsg, wParam, lParam)
  2513. #ifdef UNICODE
  2514. #define PostAppMessage  PostAppMessageW
  2515. #else
  2516. #define PostAppMessage  PostAppMessageA
  2517. #endif // !UNICODE
  2518.  
  2519. /*
  2520.  * Special HWND value for use with PostMessage() and SendMessage()
  2521.  */
  2522. #define HWND_BROADCAST  ((HWND)0xffff)
  2523.  
  2524. WINUSERAPI
  2525. BOOL
  2526. WINAPI
  2527. AttachThreadInput(
  2528.     DWORD idAttach,
  2529.     DWORD idAttachTo,
  2530.     BOOL fAttach);
  2531.  
  2532.  
  2533. WINUSERAPI
  2534. BOOL
  2535. WINAPI
  2536. ReplyMessage(
  2537.     LRESULT lResult);
  2538.  
  2539. WINUSERAPI
  2540. BOOL
  2541. WINAPI
  2542. WaitMessage(
  2543.     VOID);
  2544.  
  2545. WINUSERAPI
  2546. DWORD
  2547. WINAPI
  2548. WaitForInputIdle(
  2549.     HANDLE hProcess,
  2550.     DWORD dwMilliseconds);
  2551.  
  2552. WINUSERAPI
  2553. LRESULT
  2554. WINAPI
  2555. DefWindowProcA(
  2556.     HWND hWnd,
  2557.     UINT Msg,
  2558.     WPARAM wParam,
  2559.     LPARAM lParam);
  2560. WINUSERAPI
  2561. LRESULT
  2562. WINAPI
  2563. DefWindowProcW(
  2564.     HWND hWnd,
  2565.     UINT Msg,
  2566.     WPARAM wParam,
  2567.     LPARAM lParam);
  2568. #ifdef UNICODE
  2569. #define DefWindowProc  DefWindowProcW
  2570. #else
  2571. #define DefWindowProc  DefWindowProcA
  2572. #endif // !UNICODE
  2573.  
  2574. WINUSERAPI
  2575. VOID
  2576. WINAPI
  2577. PostQuitMessage(
  2578.     int nExitCode);
  2579.  
  2580. #ifdef STRICT
  2581.  
  2582. WINUSERAPI
  2583. LRESULT
  2584. WINAPI
  2585. CallWindowProcA(
  2586.     WNDPROC lpPrevWndFunc,
  2587.     HWND hWnd,
  2588.     UINT Msg,
  2589.     WPARAM wParam,
  2590.     LPARAM lParam);
  2591. WINUSERAPI
  2592. LRESULT
  2593. WINAPI
  2594. CallWindowProcW(
  2595.     WNDPROC lpPrevWndFunc,
  2596.     HWND hWnd,
  2597.     UINT Msg,
  2598.     WPARAM wParam,
  2599.     LPARAM lParam);
  2600. #ifdef UNICODE
  2601. #define CallWindowProc  CallWindowProcW
  2602. #else
  2603. #define CallWindowProc  CallWindowProcA
  2604. #endif // !UNICODE
  2605.  
  2606. #else /* !STRICT */
  2607.  
  2608. WINUSERAPI
  2609. LRESULT
  2610. WINAPI
  2611. CallWindowProcA(
  2612.     FARPROC lpPrevWndFunc,
  2613.     HWND hWnd,
  2614.     UINT Msg,
  2615.     WPARAM wParam,
  2616.     LPARAM lParam);
  2617. WINUSERAPI
  2618. LRESULT
  2619. WINAPI
  2620. CallWindowProcW(
  2621.     FARPROC lpPrevWndFunc,
  2622.     HWND hWnd,
  2623.     UINT Msg,
  2624.     WPARAM wParam,
  2625.     LPARAM lParam);
  2626. #ifdef UNICODE
  2627. #define CallWindowProc  CallWindowProcW
  2628. #else
  2629. #define CallWindowProc  CallWindowProcA
  2630. #endif // !UNICODE
  2631.  
  2632. #endif /* !STRICT */
  2633.  
  2634. WINUSERAPI
  2635. BOOL
  2636. WINAPI
  2637. InSendMessage(
  2638.     VOID);
  2639.  
  2640. WINUSERAPI
  2641. UINT
  2642. WINAPI
  2643. GetDoubleClickTime(
  2644.     VOID);
  2645.  
  2646. WINUSERAPI
  2647. BOOL
  2648. WINAPI
  2649. SetDoubleClickTime(
  2650.     UINT);
  2651.  
  2652. WINUSERAPI
  2653. ATOM
  2654. WINAPI
  2655. RegisterClassA(
  2656.     CONST WNDCLASSA *lpWndClass);
  2657. WINUSERAPI
  2658. ATOM
  2659. WINAPI
  2660. RegisterClassW(
  2661.     CONST WNDCLASSW *lpWndClass);
  2662. #ifdef UNICODE
  2663. #define RegisterClass  RegisterClassW
  2664. #else
  2665. #define RegisterClass  RegisterClassA
  2666. #endif // !UNICODE
  2667.  
  2668. WINUSERAPI
  2669. BOOL
  2670. WINAPI
  2671. UnregisterClassA(
  2672.     LPCSTR lpClassName,
  2673.     HINSTANCE hInstance);
  2674. WINUSERAPI
  2675. BOOL
  2676. WINAPI
  2677. UnregisterClassW(
  2678.     LPCWSTR lpClassName,
  2679.     HINSTANCE hInstance);
  2680. #ifdef UNICODE
  2681. #define UnregisterClass  UnregisterClassW
  2682. #else
  2683. #define UnregisterClass  UnregisterClassA
  2684. #endif // !UNICODE
  2685.  
  2686. WINUSERAPI
  2687. BOOL
  2688. WINAPI
  2689. GetClassInfoA(
  2690.     HINSTANCE hInstance ,
  2691.     LPCSTR lpClassName,
  2692.     LPWNDCLASSA lpWndClass);
  2693. WINUSERAPI
  2694. BOOL
  2695. WINAPI
  2696. GetClassInfoW(
  2697.     HINSTANCE hInstance ,
  2698.     LPCWSTR lpClassName,
  2699.     LPWNDCLASSW lpWndClass);
  2700. #ifdef UNICODE
  2701. #define GetClassInfo  GetClassInfoW
  2702. #else
  2703. #define GetClassInfo  GetClassInfoA
  2704. #endif // !UNICODE
  2705.  
  2706. #if(WINVER >= 0x0400)
  2707. WINUSERAPI
  2708. ATOM
  2709. WINAPI
  2710. RegisterClassExA(CONST WNDCLASSEXA *);
  2711. WINUSERAPI
  2712. ATOM
  2713. WINAPI
  2714. RegisterClassExW(CONST WNDCLASSEXW *);
  2715. #ifdef UNICODE
  2716. #define RegisterClassEx  RegisterClassExW
  2717. #else
  2718. #define RegisterClassEx  RegisterClassExA
  2719. #endif // !UNICODE
  2720.  
  2721. WINUSERAPI
  2722. BOOL
  2723. WINAPI
  2724. GetClassInfoExA(HINSTANCE, LPCSTR, LPWNDCLASSEXA);
  2725. WINUSERAPI
  2726. BOOL
  2727. WINAPI
  2728. GetClassInfoExW(HINSTANCE, LPCWSTR, LPWNDCLASSEXW);
  2729. #ifdef UNICODE
  2730. #define GetClassInfoEx  GetClassInfoExW
  2731. #else
  2732. #define GetClassInfoEx  GetClassInfoExA
  2733. #endif // !UNICODE
  2734.  
  2735. #endif /* WINVER >= 0x0400 */
  2736.  
  2737. #define CW_USEDEFAULT       ((int)0x80000000)
  2738.  
  2739. /*
  2740.  * Special value for CreateWindow, et al.
  2741.  */
  2742. #define HWND_DESKTOP        ((HWND)0)
  2743.  
  2744. WINUSERAPI
  2745. HWND
  2746. WINAPI
  2747. CreateWindowExA(
  2748.     DWORD dwExStyle,
  2749.     LPCSTR lpClassName,
  2750.     LPCSTR lpWindowName,
  2751.     DWORD dwStyle,
  2752.     int X,
  2753.     int Y,
  2754.     int nWidth,
  2755.     int nHeight,
  2756.     HWND hWndParent ,
  2757.     HMENU hMenu,
  2758.     HINSTANCE hInstance,
  2759.     LPVOID lpParam);
  2760. WINUSERAPI
  2761. HWND
  2762. WINAPI
  2763. CreateWindowExW(
  2764.     DWORD dwExStyle,
  2765.     LPCWSTR lpClassName,
  2766.     LPCWSTR lpWindowName,
  2767.     DWORD dwStyle,
  2768.     int X,
  2769.     int Y,
  2770.     int nWidth,
  2771.     int nHeight,
  2772.     HWND hWndParent ,
  2773.     HMENU hMenu,
  2774.     HINSTANCE hInstance,
  2775.     LPVOID lpParam);
  2776. #ifdef UNICODE
  2777. #define CreateWindowEx  CreateWindowExW
  2778. #else
  2779. #define CreateWindowEx  CreateWindowExA
  2780. #endif // !UNICODE
  2781.  
  2782. #define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y,\
  2783. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  2784. CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  2785. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  2786. #define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y,\
  2787. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  2788. CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  2789. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  2790. #ifdef UNICODE
  2791. #define CreateWindow  CreateWindowW
  2792. #else
  2793. #define CreateWindow  CreateWindowA
  2794. #endif // !UNICODE
  2795.  
  2796. WINUSERAPI
  2797. BOOL
  2798. WINAPI
  2799. IsWindow(
  2800.     HWND hWnd);
  2801.  
  2802. WINUSERAPI
  2803. BOOL
  2804. WINAPI
  2805. IsMenu(
  2806.     HMENU hMenu);
  2807.  
  2808. WINUSERAPI
  2809. BOOL
  2810. WINAPI
  2811. IsChild(
  2812.     HWND hWndParent,
  2813.     HWND hWnd);
  2814.  
  2815. WINUSERAPI
  2816. BOOL
  2817. WINAPI
  2818. DestroyWindow(
  2819.     HWND hWnd);
  2820.  
  2821. WINUSERAPI
  2822. BOOL
  2823. WINAPI
  2824. ShowWindow(
  2825.     HWND hWnd,
  2826.     int nCmdShow);
  2827.  
  2828. #if(WINVER >= 0x0400)
  2829. WINUSERAPI
  2830. BOOL
  2831. WINAPI
  2832. ShowWindowAsync(
  2833.     HWND hWnd,
  2834.     int nCmdShow);
  2835. #endif /* WINVER >= 0x0400 */
  2836.  
  2837. WINUSERAPI
  2838. BOOL
  2839. WINAPI
  2840. FlashWindow(
  2841.     HWND hWnd,
  2842.     BOOL bInvert);
  2843.  
  2844. WINUSERAPI
  2845. BOOL
  2846. WINAPI
  2847. ShowOwnedPopups(
  2848.     HWND hWnd,
  2849.     BOOL fShow);
  2850.  
  2851. WINUSERAPI
  2852. BOOL
  2853. WINAPI
  2854. OpenIcon(
  2855.     HWND hWnd);
  2856.  
  2857. WINUSERAPI
  2858. BOOL
  2859. WINAPI
  2860. CloseWindow(
  2861.     HWND hWnd);
  2862.  
  2863. WINUSERAPI
  2864. BOOL
  2865. WINAPI
  2866. MoveWindow(
  2867.     HWND hWnd,
  2868.     int X,
  2869.     int Y,
  2870.     int nWidth,
  2871.     int nHeight,
  2872.     BOOL bRepaint);
  2873.  
  2874. WINUSERAPI
  2875. BOOL
  2876. WINAPI
  2877. SetWindowPos(
  2878.     HWND hWnd,
  2879.     HWND hWndInsertAfter ,
  2880.     int X,
  2881.     int Y,
  2882.     int cx,
  2883.     int cy,
  2884.     UINT uFlags);
  2885.  
  2886. WINUSERAPI
  2887. BOOL
  2888. WINAPI
  2889. GetWindowPlacement(
  2890.     HWND hWnd,
  2891.     WINDOWPLACEMENT *lpwndpl);
  2892.  
  2893. WINUSERAPI
  2894. BOOL
  2895. WINAPI
  2896. SetWindowPlacement(
  2897.     HWND hWnd,
  2898.     CONST WINDOWPLACEMENT *lpwndpl);
  2899.  
  2900.  
  2901. #ifndef NODEFERWINDOWPOS
  2902.  
  2903. WINUSERAPI
  2904. HDWP
  2905. WINAPI
  2906. BeginDeferWindowPos(
  2907.     int nNumWindows);
  2908.  
  2909. WINUSERAPI
  2910. HDWP
  2911. WINAPI
  2912. DeferWindowPos(
  2913.     HDWP hWinPosInfo,
  2914.     HWND hWnd,
  2915.     HWND hWndInsertAfter ,
  2916.     int x,
  2917.     int y,
  2918.     int cx,
  2919.     int cy,
  2920.     UINT uFlags);
  2921.  
  2922. WINUSERAPI
  2923. BOOL
  2924. WINAPI
  2925. EndDeferWindowPos(
  2926.     HDWP hWinPosInfo);
  2927.  
  2928. #endif /* !NODEFERWINDOWPOS */
  2929.  
  2930. WINUSERAPI
  2931. BOOL
  2932. WINAPI
  2933. IsWindowVisible(
  2934.     HWND hWnd);
  2935.  
  2936. WINUSERAPI
  2937. BOOL
  2938. WINAPI
  2939. IsIconic(
  2940.     HWND hWnd);
  2941.  
  2942. WINUSERAPI
  2943. BOOL
  2944. WINAPI
  2945. AnyPopup(
  2946.     VOID);
  2947.  
  2948. WINUSERAPI
  2949. BOOL
  2950. WINAPI
  2951. BringWindowToTop(
  2952.     HWND hWnd);
  2953.  
  2954. WINUSERAPI
  2955. BOOL
  2956. WINAPI
  2957. IsZoomed(
  2958.     HWND hWnd);
  2959.  
  2960. /*
  2961.  * SetWindowPos Flags
  2962.  */
  2963. #define SWP_NOSIZE          0x0001
  2964. #define SWP_NOMOVE          0x0002
  2965. #define SWP_NOZORDER        0x0004
  2966. #define SWP_NOREDRAW        0x0008
  2967. #define SWP_NOACTIVATE      0x0010
  2968. #define SWP_FRAMECHANGED    0x0020  /* The frame changed: send WM_NCCALCSIZE */
  2969. #define SWP_SHOWWINDOW      0x0040
  2970. #define SWP_HIDEWINDOW      0x0080
  2971. #define SWP_NOCOPYBITS      0x0100
  2972. #define SWP_NOOWNERZORDER   0x0200  /* Don't do owner Z ordering */
  2973. #define SWP_NOSENDCHANGING  0x0400  /* Don't send WM_WINDOWPOSCHANGING */
  2974.  
  2975. #define SWP_DRAWFRAME       SWP_FRAMECHANGED
  2976. #define SWP_NOREPOSITION    SWP_NOOWNERZORDER
  2977.  
  2978. #if(WINVER >= 0x0400)
  2979. #define SWP_DEFERERASE      0x2000
  2980. #define SWP_ASYNCWINDOWPOS  0x4000
  2981. #endif /* WINVER >= 0x0400 */
  2982.  
  2983.  
  2984. #define HWND_TOP        ((HWND)0)
  2985. #define HWND_BOTTOM     ((HWND)1)
  2986. #define HWND_TOPMOST    ((HWND)-1)
  2987. #define HWND_NOTOPMOST  ((HWND)-2)
  2988.  
  2989.  
  2990. #ifndef NOCTLMGR
  2991.  
  2992. /*
  2993.  * WARNING:
  2994.  * The following structures must NOT be DWORD padded because they are
  2995.  * followed by strings, etc that do not have to be DWORD aligned.
  2996.  */
  2997. #include <pshpack2.h>
  2998.  
  2999. /*
  3000.  * original NT 32 bit dialog template:
  3001.  */
  3002. typedef struct {
  3003.     DWORD style;
  3004.     DWORD dwExtendedStyle;
  3005.     WORD cdit;
  3006.     short x;
  3007.     short y;
  3008.     short cx;
  3009.     short cy;
  3010. } DLGTEMPLATE;
  3011. typedef DLGTEMPLATE *LPDLGTEMPLATEA;
  3012. typedef DLGTEMPLATE *LPDLGTEMPLATEW;
  3013. #ifdef UNICODE
  3014. typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
  3015. #else
  3016. typedef LPDLGTEMPLATEA LPDLGTEMPLATE;
  3017. #endif // UNICODE
  3018. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
  3019. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
  3020. #ifdef UNICODE
  3021. typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
  3022. #else
  3023. typedef LPCDLGTEMPLATEA LPCDLGTEMPLATE;
  3024. #endif // UNICODE
  3025.  
  3026. /*
  3027.  * 32 bit Dialog item template.
  3028.  */
  3029. typedef struct {
  3030.     DWORD style;
  3031.     DWORD dwExtendedStyle;
  3032.     short x;
  3033.     short y;
  3034.     short cx;
  3035.     short cy;
  3036.     WORD id;
  3037. } DLGITEMTEMPLATE;
  3038. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
  3039. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
  3040. #ifdef UNICODE
  3041. typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
  3042. #else
  3043. typedef PDLGITEMTEMPLATEA PDLGITEMTEMPLATE;
  3044. #endif // UNICODE
  3045. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
  3046. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
  3047. #ifdef UNICODE
  3048. typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
  3049. #else
  3050. typedef LPDLGITEMTEMPLATEA LPDLGITEMTEMPLATE;
  3051. #endif // UNICODE
  3052.  
  3053.  
  3054. #include <poppack.h> /* Resume normal packing */
  3055.  
  3056. WINUSERAPI
  3057. HWND
  3058. WINAPI
  3059. CreateDialogParamA(
  3060.     HINSTANCE hInstance,
  3061.     LPCSTR lpTemplateName,
  3062.     HWND hWndParent ,
  3063.     DLGPROC lpDialogFunc,
  3064.     LPARAM dwInitParam);
  3065. WINUSERAPI
  3066. HWND
  3067. WINAPI
  3068. CreateDialogParamW(
  3069.     HINSTANCE hInstance,
  3070.     LPCWSTR lpTemplateName,
  3071.     HWND hWndParent ,
  3072.     DLGPROC lpDialogFunc,
  3073.     LPARAM dwInitParam);
  3074. #ifdef UNICODE
  3075. #define CreateDialogParam  CreateDialogParamW
  3076. #else
  3077. #define CreateDialogParam  CreateDialogParamA
  3078. #endif // !UNICODE
  3079.  
  3080. WINUSERAPI
  3081. HWND
  3082. WINAPI
  3083. CreateDialogIndirectParamA(
  3084.     HINSTANCE hInstance,
  3085.     LPCDLGTEMPLATEA lpTemplate,
  3086.     HWND hWndParent,
  3087.     DLGPROC lpDialogFunc,
  3088.     LPARAM dwInitParam);
  3089. WINUSERAPI
  3090. HWND
  3091. WINAPI
  3092. CreateDialogIndirectParamW(
  3093.     HINSTANCE hInstance,
  3094.     LPCDLGTEMPLATEW lpTemplate,
  3095.     HWND hWndParent,
  3096.     DLGPROC lpDialogFunc,
  3097.     LPARAM dwInitParam);
  3098. #ifdef UNICODE
  3099. #define CreateDialogIndirectParam  CreateDialogIndirectParamW
  3100. #else
  3101. #define CreateDialogIndirectParam  CreateDialogIndirectParamA
  3102. #endif // !UNICODE
  3103.  
  3104. #define CreateDialogA(hInstance, lpName, hWndParent, lpDialogFunc) \
  3105. CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3106. #define CreateDialogW(hInstance, lpName, hWndParent, lpDialogFunc) \
  3107. CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3108. #ifdef UNICODE
  3109. #define CreateDialog  CreateDialogW
  3110. #else
  3111. #define CreateDialog  CreateDialogA
  3112. #endif // !UNICODE
  3113.  
  3114. #define CreateDialogIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3115. CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3116. #define CreateDialogIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3117. CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3118. #ifdef UNICODE
  3119. #define CreateDialogIndirect  CreateDialogIndirectW
  3120. #else
  3121. #define CreateDialogIndirect  CreateDialogIndirectA
  3122. #endif // !UNICODE
  3123.  
  3124. WINUSERAPI
  3125. int
  3126. WINAPI
  3127. DialogBoxParamA(
  3128.     HINSTANCE hInstance,
  3129.     LPCSTR lpTemplateName,
  3130.     HWND hWndParent ,
  3131.     DLGPROC lpDialogFunc,
  3132.     LPARAM dwInitParam);
  3133. WINUSERAPI
  3134. int
  3135. WINAPI
  3136. DialogBoxParamW(
  3137.     HINSTANCE hInstance,
  3138.     LPCWSTR lpTemplateName,
  3139.     HWND hWndParent ,
  3140.     DLGPROC lpDialogFunc,
  3141.     LPARAM dwInitParam);
  3142. #ifdef UNICODE
  3143. #define DialogBoxParam  DialogBoxParamW
  3144. #else
  3145. #define DialogBoxParam  DialogBoxParamA
  3146. #endif // !UNICODE
  3147.  
  3148. WINUSERAPI
  3149. int
  3150. WINAPI
  3151. DialogBoxIndirectParamA(
  3152.     HINSTANCE hInstance,
  3153.     LPCDLGTEMPLATEA hDialogTemplate,
  3154.     HWND hWndParent ,
  3155.     DLGPROC lpDialogFunc,
  3156.     LPARAM dwInitParam);
  3157. WINUSERAPI
  3158. int
  3159. WINAPI
  3160. DialogBoxIndirectParamW(
  3161.     HINSTANCE hInstance,
  3162.     LPCDLGTEMPLATEW hDialogTemplate,
  3163.     HWND hWndParent ,
  3164.     DLGPROC lpDialogFunc,
  3165.     LPARAM dwInitParam);
  3166. #ifdef UNICODE
  3167. #define DialogBoxIndirectParam  DialogBoxIndirectParamW
  3168. #else
  3169. #define DialogBoxIndirectParam  DialogBoxIndirectParamA
  3170. #endif // !UNICODE
  3171.  
  3172. #define DialogBoxA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3173. DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3174. #define DialogBoxW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3175. DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3176. #ifdef UNICODE
  3177. #define DialogBox  DialogBoxW
  3178. #else
  3179. #define DialogBox  DialogBoxA
  3180. #endif // !UNICODE
  3181.  
  3182. #define DialogBoxIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3183. DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3184. #define DialogBoxIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3185. DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3186. #ifdef UNICODE
  3187. #define DialogBoxIndirect  DialogBoxIndirectW
  3188. #else
  3189. #define DialogBoxIndirect  DialogBoxIndirectA
  3190. #endif // !UNICODE
  3191.  
  3192. WINUSERAPI
  3193. BOOL
  3194. WINAPI
  3195. EndDialog(
  3196.     HWND hDlg,
  3197.     int nResult);
  3198.  
  3199. WINUSERAPI
  3200. HWND
  3201. WINAPI
  3202. GetDlgItem(
  3203.     HWND hDlg,
  3204.     int nIDDlgItem);
  3205.  
  3206. WINUSERAPI
  3207. BOOL
  3208. WINAPI
  3209. SetDlgItemInt(
  3210.     HWND hDlg,
  3211.     int nIDDlgItem,
  3212.     UINT uValue,
  3213.     BOOL bSigned);
  3214.  
  3215. WINUSERAPI
  3216. UINT
  3217. WINAPI
  3218. GetDlgItemInt(
  3219.     HWND hDlg,
  3220.     int nIDDlgItem,
  3221.     BOOL *lpTranslated,
  3222.     BOOL bSigned);
  3223.  
  3224. WINUSERAPI
  3225. BOOL
  3226. WINAPI
  3227. SetDlgItemTextA(
  3228.     HWND hDlg,
  3229.     int nIDDlgItem,
  3230.     LPCSTR lpString);
  3231. WINUSERAPI
  3232. BOOL
  3233. WINAPI
  3234. SetDlgItemTextW(
  3235.     HWND hDlg,
  3236.     int nIDDlgItem,
  3237.     LPCWSTR lpString);
  3238. #ifdef UNICODE
  3239. #define SetDlgItemText  SetDlgItemTextW
  3240. #else
  3241. #define SetDlgItemText  SetDlgItemTextA
  3242. #endif // !UNICODE
  3243.  
  3244. WINUSERAPI
  3245. UINT
  3246. WINAPI
  3247. GetDlgItemTextA(
  3248.     HWND hDlg,
  3249.     int nIDDlgItem,
  3250.     LPSTR lpString,
  3251.     int nMaxCount);
  3252. WINUSERAPI
  3253. UINT
  3254. WINAPI
  3255. GetDlgItemTextW(
  3256.     HWND hDlg,
  3257.     int nIDDlgItem,
  3258.     LPWSTR lpString,
  3259.     int nMaxCount);
  3260. #ifdef UNICODE
  3261. #define GetDlgItemText  GetDlgItemTextW
  3262. #else
  3263. #define GetDlgItemText  GetDlgItemTextA
  3264. #endif // !UNICODE
  3265.  
  3266. WINUSERAPI
  3267. BOOL
  3268. WINAPI
  3269. CheckDlgButton(
  3270.     HWND hDlg,
  3271.     int nIDButton,
  3272.     UINT uCheck);
  3273.  
  3274. WINUSERAPI
  3275. BOOL
  3276. WINAPI
  3277. CheckRadioButton(
  3278.     HWND hDlg,
  3279.     int nIDFirstButton,
  3280.     int nIDLastButton,
  3281.     int nIDCheckButton);
  3282.  
  3283. WINUSERAPI
  3284. UINT
  3285. WINAPI
  3286. IsDlgButtonChecked(
  3287.     HWND hDlg,
  3288.     int nIDButton);
  3289.  
  3290. WINUSERAPI
  3291. LONG
  3292. WINAPI
  3293. SendDlgItemMessageA(
  3294.     HWND hDlg,
  3295.     int nIDDlgItem,
  3296.     UINT Msg,
  3297.     WPARAM wParam,
  3298.     LPARAM lParam);
  3299. WINUSERAPI
  3300. LONG
  3301. WINAPI
  3302. SendDlgItemMessageW(
  3303.     HWND hDlg,
  3304.     int nIDDlgItem,
  3305.     UINT Msg,
  3306.     WPARAM wParam,
  3307.     LPARAM lParam);
  3308. #ifdef UNICODE
  3309. #define SendDlgItemMessage  SendDlgItemMessageW
  3310. #else
  3311. #define SendDlgItemMessage  SendDlgItemMessageA
  3312. #endif // !UNICODE
  3313.  
  3314. WINUSERAPI
  3315. HWND
  3316. WINAPI
  3317. GetNextDlgGroupItem(
  3318.     HWND hDlg,
  3319.     HWND hCtl,
  3320.     BOOL bPrevious);
  3321.  
  3322. WINUSERAPI
  3323. HWND
  3324. WINAPI
  3325. GetNextDlgTabItem(
  3326.     HWND hDlg,
  3327.     HWND hCtl,
  3328.     BOOL bPrevious);
  3329.  
  3330. WINUSERAPI
  3331. int
  3332. WINAPI
  3333. GetDlgCtrlID(
  3334.     HWND hWnd);
  3335.  
  3336. WINUSERAPI
  3337. long
  3338. WINAPI
  3339. GetDialogBaseUnits(VOID);
  3340.  
  3341. WINUSERAPI
  3342. LRESULT
  3343. WINAPI
  3344. DefDlgProcA(
  3345.     HWND hDlg,
  3346.     UINT Msg,
  3347.     WPARAM wParam,
  3348.     LPARAM lParam);
  3349. WINUSERAPI
  3350. LRESULT
  3351. WINAPI
  3352. DefDlgProcW(
  3353.     HWND hDlg,
  3354.     UINT Msg,
  3355.     WPARAM wParam,
  3356.     LPARAM lParam);
  3357. #ifdef UNICODE
  3358. #define DefDlgProc  DefDlgProcW
  3359. #else
  3360. #define DefDlgProc  DefDlgProcA
  3361. #endif // !UNICODE
  3362.  
  3363. /*
  3364.  * Window extra byted needed for private dialog classes.
  3365.  */
  3366. #define DLGWINDOWEXTRA 30
  3367.  
  3368. #endif /* !NOCTLMGR */
  3369.  
  3370. #ifndef NOMSG
  3371.  
  3372. WINUSERAPI
  3373. BOOL
  3374. WINAPI
  3375. CallMsgFilterA(
  3376.     LPMSG lpMsg,
  3377.     int nCode);
  3378. WINUSERAPI
  3379. BOOL
  3380. WINAPI
  3381. CallMsgFilterW(
  3382.     LPMSG lpMsg,
  3383.     int nCode);
  3384. #ifdef UNICODE
  3385. #define CallMsgFilter  CallMsgFilterW
  3386. #else
  3387. #define CallMsgFilter  CallMsgFilterA
  3388. #endif // !UNICODE
  3389.  
  3390. #endif /* !NOMSG */
  3391.  
  3392. #ifndef NOCLIPBOARD
  3393.  
  3394. /*
  3395.  * Clipboard Manager Functions
  3396.  */
  3397.  
  3398. WINUSERAPI
  3399. BOOL
  3400. WINAPI
  3401. OpenClipboard(
  3402.     HWND hWndNewOwner);
  3403.  
  3404. WINUSERAPI
  3405. BOOL
  3406. WINAPI
  3407. CloseClipboard(
  3408.     VOID);
  3409.  
  3410. WINUSERAPI
  3411. HWND
  3412. WINAPI
  3413. GetClipboardOwner(
  3414.     VOID);
  3415.  
  3416. WINUSERAPI
  3417. HWND
  3418. WINAPI
  3419. SetClipboardViewer(
  3420.     HWND hWndNewViewer);
  3421.  
  3422. WINUSERAPI
  3423. HWND
  3424. WINAPI
  3425. GetClipboardViewer(
  3426.     VOID);
  3427.  
  3428. WINUSERAPI
  3429. BOOL
  3430. WINAPI
  3431. ChangeClipboardChain(
  3432.     HWND hWndRemove,
  3433.     HWND hWndNewNext);
  3434.  
  3435. WINUSERAPI
  3436. HANDLE
  3437. WINAPI
  3438. SetClipboardData(
  3439.     UINT uFormat,
  3440.     HANDLE hMem);
  3441.  
  3442. WINUSERAPI
  3443. HANDLE
  3444. WINAPI
  3445.     GetClipboardData(
  3446.     UINT uFormat);
  3447.  
  3448. WINUSERAPI
  3449. UINT
  3450. WINAPI
  3451. RegisterClipboardFormatA(
  3452.     LPCSTR lpszFormat);
  3453. WINUSERAPI
  3454. UINT
  3455. WINAPI
  3456. RegisterClipboardFormatW(
  3457.     LPCWSTR lpszFormat);
  3458. #ifdef UNICODE
  3459. #define RegisterClipboardFormat  RegisterClipboardFormatW
  3460. #else
  3461. #define RegisterClipboardFormat  RegisterClipboardFormatA
  3462. #endif // !UNICODE
  3463.  
  3464. WINUSERAPI
  3465. int
  3466. WINAPI
  3467. CountClipboardFormats(
  3468.     VOID);
  3469.  
  3470. WINUSERAPI
  3471. UINT
  3472. WINAPI
  3473. EnumClipboardFormats(
  3474.     UINT format);
  3475.  
  3476. WINUSERAPI
  3477. int
  3478. WINAPI
  3479. GetClipboardFormatNameA(
  3480.     UINT format,
  3481.     LPSTR lpszFormatName,
  3482.     int cchMaxCount);
  3483. WINUSERAPI
  3484. int
  3485. WINAPI
  3486. GetClipboardFormatNameW(
  3487.     UINT format,
  3488.     LPWSTR lpszFormatName,
  3489.     int cchMaxCount);
  3490. #ifdef UNICODE
  3491. #define GetClipboardFormatName  GetClipboardFormatNameW
  3492. #else
  3493. #define GetClipboardFormatName  GetClipboardFormatNameA
  3494. #endif // !UNICODE
  3495.  
  3496. WINUSERAPI
  3497. BOOL
  3498. WINAPI
  3499. EmptyClipboard(
  3500.     VOID);
  3501.  
  3502. WINUSERAPI
  3503. BOOL
  3504. WINAPI
  3505. IsClipboardFormatAvailable(
  3506.     UINT format);
  3507.  
  3508. WINUSERAPI
  3509. int
  3510. WINAPI
  3511. GetPriorityClipboardFormat(
  3512.     UINT *paFormatPriorityList,
  3513.     int cFormats);
  3514.  
  3515. WINUSERAPI
  3516. HWND
  3517. WINAPI
  3518. GetOpenClipboardWindow(
  3519.     VOID);
  3520.  
  3521. #endif /* !NOCLIPBOARD */
  3522.  
  3523. /*
  3524.  * Character Translation Routines
  3525.  */
  3526.  
  3527. WINUSERAPI
  3528. BOOL
  3529. WINAPI
  3530. CharToOemA(
  3531.     LPCSTR lpszSrc,
  3532.     LPSTR lpszDst);
  3533. WINUSERAPI
  3534. BOOL
  3535. WINAPI
  3536. CharToOemW(
  3537.     LPCWSTR lpszSrc,
  3538.     LPSTR lpszDst);
  3539. #ifdef UNICODE
  3540. #define CharToOem  CharToOemW
  3541. #else
  3542. #define CharToOem  CharToOemA
  3543. #endif // !UNICODE
  3544.  
  3545. WINUSERAPI
  3546. BOOL
  3547. WINAPI
  3548. OemToCharA(
  3549.     LPCSTR lpszSrc,
  3550.     LPSTR lpszDst);
  3551. WINUSERAPI
  3552. BOOL
  3553. WINAPI
  3554. OemToCharW(
  3555.     LPCSTR lpszSrc,
  3556.     LPWSTR lpszDst);
  3557. #ifdef UNICODE
  3558. #define OemToChar  OemToCharW
  3559. #else
  3560. #define OemToChar  OemToCharA
  3561. #endif // !UNICODE
  3562.  
  3563. WINUSERAPI
  3564. BOOL
  3565. WINAPI
  3566. CharToOemBuffA(
  3567.     LPCSTR lpszSrc,
  3568.     LPSTR lpszDst,
  3569.     DWORD cchDstLength);
  3570. WINUSERAPI
  3571. BOOL
  3572. WINAPI
  3573. CharToOemBuffW(
  3574.     LPCWSTR lpszSrc,
  3575.     LPSTR lpszDst,
  3576.     DWORD cchDstLength);
  3577. #ifdef UNICODE
  3578. #define CharToOemBuff  CharToOemBuffW
  3579. #else
  3580. #define CharToOemBuff  CharToOemBuffA
  3581. #endif // !UNICODE
  3582.  
  3583. WINUSERAPI
  3584. BOOL
  3585. WINAPI
  3586. OemToCharBuffA(
  3587.     LPCSTR lpszSrc,
  3588.     LPSTR lpszDst,
  3589.     DWORD cchDstLength);
  3590. WINUSERAPI
  3591. BOOL
  3592. WINAPI
  3593. OemToCharBuffW(
  3594.     LPCSTR lpszSrc,
  3595.     LPWSTR lpszDst,
  3596.     DWORD cchDstLength);
  3597. #ifdef UNICODE
  3598. #define OemToCharBuff  OemToCharBuffW
  3599. #else
  3600. #define OemToCharBuff  OemToCharBuffA
  3601. #endif // !UNICODE
  3602.  
  3603. WINUSERAPI
  3604. LPSTR
  3605. WINAPI
  3606. CharUpperA(
  3607.     LPSTR lpsz);
  3608. WINUSERAPI
  3609. LPWSTR
  3610. WINAPI
  3611. CharUpperW(
  3612.     LPWSTR lpsz);
  3613. #ifdef UNICODE
  3614. #define CharUpper  CharUpperW
  3615. #else
  3616. #define CharUpper  CharUpperA
  3617. #endif // !UNICODE
  3618.  
  3619. WINUSERAPI
  3620. DWORD
  3621. WINAPI
  3622. CharUpperBuffA(
  3623.     LPSTR lpsz,
  3624.     DWORD cchLength);
  3625. WINUSERAPI
  3626. DWORD
  3627. WINAPI
  3628. CharUpperBuffW(
  3629.     LPWSTR lpsz,
  3630.     DWORD cchLength);
  3631. #ifdef UNICODE
  3632. #define CharUpperBuff  CharUpperBuffW
  3633. #else
  3634. #define CharUpperBuff  CharUpperBuffA
  3635. #endif // !UNICODE
  3636.  
  3637. WINUSERAPI
  3638. LPSTR
  3639. WINAPI
  3640. CharLowerA(
  3641.     LPSTR lpsz);
  3642. WINUSERAPI
  3643. LPWSTR
  3644. WINAPI
  3645. CharLowerW(
  3646.     LPWSTR lpsz);
  3647. #ifdef UNICODE
  3648. #define CharLower  CharLowerW
  3649. #else
  3650. #define CharLower  CharLowerA
  3651. #endif // !UNICODE
  3652.  
  3653. WINUSERAPI
  3654. DWORD
  3655. WINAPI
  3656. CharLowerBuffA(
  3657.     LPSTR lpsz,
  3658.     DWORD cchLength);
  3659. WINUSERAPI
  3660. DWORD
  3661. WINAPI
  3662. CharLowerBuffW(
  3663.     LPWSTR lpsz,
  3664.     DWORD cchLength);
  3665. #ifdef UNICODE
  3666. #define CharLowerBuff  CharLowerBuffW
  3667. #else
  3668. #define CharLowerBuff  CharLowerBuffA
  3669. #endif // !UNICODE
  3670.  
  3671. WINUSERAPI
  3672. LPSTR
  3673. WINAPI
  3674. CharNextA(
  3675.     LPCSTR lpsz);
  3676. WINUSERAPI
  3677. LPWSTR
  3678. WINAPI
  3679. CharNextW(
  3680.     LPCWSTR lpsz);
  3681. #ifdef UNICODE
  3682. #define CharNext  CharNextW
  3683. #else
  3684. #define CharNext  CharNextA
  3685. #endif // !UNICODE
  3686.  
  3687. WINUSERAPI
  3688. LPSTR
  3689. WINAPI
  3690. CharPrevA(
  3691.     LPCSTR lpszStart,
  3692.     LPCSTR lpszCurrent);
  3693. WINUSERAPI
  3694. LPWSTR
  3695. WINAPI
  3696. CharPrevW(
  3697.     LPCWSTR lpszStart,
  3698.     LPCWSTR lpszCurrent);
  3699. #ifdef UNICODE
  3700. #define CharPrev  CharPrevW
  3701. #else
  3702. #define CharPrev  CharPrevA
  3703. #endif // !UNICODE
  3704.  
  3705. #if(WINVER >= 0x0400)
  3706. WINUSERAPI
  3707. LPSTR
  3708. WINAPI
  3709. CharNextExA(
  3710.      WORD CodePage,
  3711.      LPCSTR lpCurrentChar,
  3712.      DWORD dwFlags);
  3713.  
  3714. WINUSERAPI
  3715. LPSTR
  3716. WINAPI
  3717. CharPrevExA(
  3718.      WORD CodePage,
  3719.      LPCSTR lpStart,
  3720.      LPCSTR lpCurrentChar,
  3721.      DWORD dwFlags);
  3722. #endif /* WINVER >= 0x0400 */
  3723.  
  3724. /*
  3725.  * Compatibility defines for character translation routines
  3726.  */
  3727. #define AnsiToOem CharToOemA
  3728. #define OemToAnsi OemToCharA
  3729. #define AnsiToOemBuff CharToOemBuffA
  3730. #define OemToAnsiBuff OemToCharBuffA
  3731. #define AnsiUpper CharUpperA
  3732. #define AnsiUpperBuff CharUpperBuffA
  3733. #define AnsiLower CharLowerA
  3734. #define AnsiLowerBuff CharLowerBuffA
  3735. #define AnsiNext CharNextA
  3736. #define AnsiPrev CharPrevA
  3737.  
  3738. #ifndef  NOLANGUAGE
  3739. /*
  3740.  * Language dependent Routines
  3741.  */
  3742.  
  3743. WINUSERAPI
  3744. BOOL
  3745. WINAPI
  3746. IsCharAlphaA(
  3747.     CHAR ch);
  3748. WINUSERAPI
  3749. BOOL
  3750. WINAPI
  3751. IsCharAlphaW(
  3752.     WCHAR ch);
  3753. #ifdef UNICODE
  3754. #define IsCharAlpha  IsCharAlphaW
  3755. #else
  3756. #define IsCharAlpha  IsCharAlphaA
  3757. #endif // !UNICODE
  3758.  
  3759. WINUSERAPI
  3760. BOOL
  3761. WINAPI
  3762. IsCharAlphaNumericA(
  3763.     CHAR ch);
  3764. WINUSERAPI
  3765. BOOL
  3766. WINAPI
  3767. IsCharAlphaNumericW(
  3768.     WCHAR ch);
  3769. #ifdef UNICODE
  3770. #define IsCharAlphaNumeric  IsCharAlphaNumericW
  3771. #else
  3772. #define IsCharAlphaNumeric  IsCharAlphaNumericA
  3773. #endif // !UNICODE
  3774.  
  3775. WINUSERAPI
  3776. BOOL
  3777. WINAPI
  3778. IsCharUpperA(
  3779.     CHAR ch);
  3780. WINUSERAPI
  3781. BOOL
  3782. WINAPI
  3783. IsCharUpperW(
  3784.     WCHAR ch);
  3785. #ifdef UNICODE
  3786. #define IsCharUpper  IsCharUpperW
  3787. #else
  3788. #define IsCharUpper  IsCharUpperA
  3789. #endif // !UNICODE
  3790.  
  3791. WINUSERAPI
  3792. BOOL
  3793. WINAPI
  3794. IsCharLowerA(
  3795.     CHAR ch);
  3796. WINUSERAPI
  3797. BOOL
  3798. WINAPI
  3799. IsCharLowerW(
  3800.     WCHAR ch);
  3801. #ifdef UNICODE
  3802. #define IsCharLower  IsCharLowerW
  3803. #else
  3804. #define IsCharLower  IsCharLowerA
  3805. #endif // !UNICODE
  3806.  
  3807. #endif  /* !NOLANGUAGE */
  3808.  
  3809. WINUSERAPI
  3810. HWND
  3811. WINAPI
  3812. SetFocus(
  3813.     HWND hWnd);
  3814.  
  3815. WINUSERAPI
  3816. HWND
  3817. WINAPI
  3818. GetActiveWindow(
  3819.     VOID);
  3820.  
  3821. WINUSERAPI
  3822. HWND
  3823. WINAPI
  3824. GetFocus(
  3825.     VOID);
  3826.  
  3827. WINUSERAPI
  3828. UINT
  3829. WINAPI
  3830. GetKBCodePage(
  3831.     VOID);
  3832.  
  3833. WINUSERAPI
  3834. SHORT
  3835. WINAPI
  3836. GetKeyState(
  3837.     int nVirtKey);
  3838.  
  3839. WINUSERAPI
  3840. SHORT
  3841. WINAPI
  3842. GetAsyncKeyState(
  3843.     int vKey);
  3844.  
  3845. WINUSERAPI
  3846. BOOL
  3847. WINAPI
  3848. GetKeyboardState(
  3849.     PBYTE lpKeyState);
  3850.  
  3851. WINUSERAPI
  3852. BOOL
  3853. WINAPI
  3854. SetKeyboardState(
  3855.     LPBYTE lpKeyState);
  3856.  
  3857. WINUSERAPI
  3858. int
  3859. WINAPI
  3860. GetKeyNameTextA(
  3861.     LONG lParam,
  3862.     LPSTR lpString,
  3863.     int nSize
  3864.     );
  3865. WINUSERAPI
  3866. int
  3867. WINAPI
  3868. GetKeyNameTextW(
  3869.     LONG lParam,
  3870.     LPWSTR lpString,
  3871.     int nSize
  3872.     );
  3873. #ifdef UNICODE
  3874. #define GetKeyNameText  GetKeyNameTextW
  3875. #else
  3876. #define GetKeyNameText  GetKeyNameTextA
  3877. #endif // !UNICODE
  3878.  
  3879. WINUSERAPI
  3880. int
  3881. WINAPI
  3882. GetKeyboardType(
  3883.     int nTypeFlag);
  3884.  
  3885. WINUSERAPI
  3886. int
  3887. WINAPI
  3888. ToAscii(
  3889.     UINT uVirtKey,
  3890.     UINT uScanCode,
  3891.     PBYTE lpKeyState,
  3892.     LPWORD lpChar,
  3893.     UINT uFlags);
  3894.  
  3895. #if(WINVER >= 0x0400)
  3896. WINUSERAPI
  3897. int
  3898. WINAPI
  3899. ToAsciiEx(
  3900.     UINT uVirtKey,
  3901.     UINT uScanCode,
  3902.     PBYTE lpKeyState,
  3903.     LPWORD lpChar,
  3904.     UINT uFlags,
  3905.     HKL dwhkl);
  3906. #endif /* WINVER >= 0x0400 */
  3907.  
  3908. WINUSERAPI
  3909. int
  3910. WINAPI
  3911. ToUnicode(
  3912.     UINT wVirtKey,
  3913.     UINT wScanCode,
  3914.     PBYTE lpKeyState,
  3915.     LPWSTR pwszBuff,
  3916.     int cchBuff,
  3917.     UINT wFlags);
  3918.  
  3919. WINUSERAPI
  3920. DWORD
  3921. WINAPI
  3922. OemKeyScan(
  3923.     WORD wOemChar);
  3924.  
  3925. WINUSERAPI
  3926. SHORT
  3927. WINAPI
  3928. VkKeyScanA(
  3929.     CHAR ch);
  3930. WINUSERAPI
  3931. SHORT
  3932. WINAPI
  3933. VkKeyScanW(
  3934.     WCHAR ch);
  3935. #ifdef UNICODE
  3936. #define VkKeyScan  VkKeyScanW
  3937. #else
  3938. #define VkKeyScan  VkKeyScanA
  3939. #endif // !UNICODE
  3940.  
  3941. #if(WINVER >= 0x0400)
  3942. WINUSERAPI
  3943. SHORT
  3944. WINAPI VkKeyScanExA(
  3945.     CHAR  ch,
  3946.     HKL   dwhkl);
  3947. WINUSERAPI
  3948. SHORT
  3949. WINAPI VkKeyScanExW(
  3950.     WCHAR  ch,
  3951.     HKL   dwhkl);
  3952. #ifdef UNICODE
  3953. #define VkKeyScanEx  VkKeyScanExW
  3954. #else
  3955. #define VkKeyScanEx  VkKeyScanExA
  3956. #endif // !UNICODE
  3957. #endif /* WINVER >= 0x0400 */
  3958. #define KEYEVENTF_EXTENDEDKEY 0x0001
  3959. #define KEYEVENTF_KEYUP       0x0002
  3960.  
  3961. WINUSERAPI
  3962. VOID
  3963. WINAPI
  3964. keybd_event(
  3965.     BYTE bVk,
  3966.     BYTE bScan,
  3967.     DWORD dwFlags,
  3968.     DWORD dwExtraInfo);
  3969.  
  3970. #define MOUSEEVENTF_MOVE        0x0001 /* mouse move */
  3971. #define MOUSEEVENTF_LEFTDOWN    0x0002 /* left button down */
  3972. #define MOUSEEVENTF_LEFTUP      0x0004 /* left button up */
  3973. #define MOUSEEVENTF_RIGHTDOWN   0x0008 /* right button down */
  3974. #define MOUSEEVENTF_RIGHTUP     0x0010 /* right button up */
  3975. #define MOUSEEVENTF_MIDDLEDOWN  0x0020 /* middle button down */
  3976. #define MOUSEEVENTF_MIDDLEUP    0x0040 /* middle button up */
  3977. #define MOUSEEVENTF_WHEEL       0x0800 /* wheel button rolled */
  3978. #define MOUSEEVENTF_ABSOLUTE    0x8000 /* absolute move */
  3979.  
  3980. WINUSERAPI
  3981. VOID
  3982. WINAPI
  3983. mouse_event(
  3984.     DWORD dwFlags,
  3985.     DWORD dx,
  3986.     DWORD dy,
  3987.     DWORD dwData,
  3988.     DWORD dwExtraInfo);
  3989.  
  3990. WINUSERAPI
  3991. UINT
  3992. WINAPI
  3993. MapVirtualKeyA(
  3994.     UINT uCode,
  3995.     UINT uMapType);
  3996. WINUSERAPI
  3997. UINT
  3998. WINAPI
  3999. MapVirtualKeyW(
  4000.     UINT uCode,
  4001.     UINT uMapType);
  4002. #ifdef UNICODE
  4003. #define MapVirtualKey  MapVirtualKeyW
  4004. #else
  4005. #define MapVirtualKey  MapVirtualKeyA
  4006. #endif // !UNICODE
  4007.  
  4008. #if(WINVER >= 0x0400)
  4009. WINUSERAPI
  4010. UINT
  4011. WINAPI
  4012. MapVirtualKeyExA(
  4013.     UINT uCode,
  4014.     UINT uMapType,
  4015.     HKL dwhkl);
  4016. WINUSERAPI
  4017. UINT
  4018. WINAPI
  4019. MapVirtualKeyExW(
  4020.     UINT uCode,
  4021.     UINT uMapType,
  4022.     HKL dwhkl);
  4023. #ifdef UNICODE
  4024. #define MapVirtualKeyEx  MapVirtualKeyExW
  4025. #else
  4026. #define MapVirtualKeyEx  MapVirtualKeyExA
  4027. #endif // !UNICODE
  4028. #endif /* WINVER >= 0x0400 */
  4029.  
  4030. WINUSERAPI
  4031. BOOL
  4032. WINAPI
  4033. GetInputState(
  4034.     VOID);
  4035.  
  4036. WINUSERAPI
  4037. DWORD
  4038. WINAPI
  4039. GetQueueStatus(
  4040.     UINT flags);
  4041.  
  4042. WINUSERAPI
  4043. HWND
  4044. WINAPI
  4045. GetCapture(
  4046.     VOID);
  4047.  
  4048. WINUSERAPI
  4049. HWND
  4050. WINAPI
  4051. SetCapture(
  4052.     HWND hWnd);
  4053.  
  4054. WINUSERAPI
  4055. BOOL
  4056. WINAPI
  4057. ReleaseCapture(
  4058.     VOID);
  4059.  
  4060. WINUSERAPI
  4061. DWORD
  4062. WINAPI
  4063. MsgWaitForMultipleObjects(
  4064.     DWORD nCount,
  4065.     LPHANDLE pHandles,
  4066.     BOOL fWaitAll,
  4067.     DWORD dwMilliseconds,
  4068.     DWORD dwWakeMask);
  4069.  
  4070. WINUSERAPI
  4071. DWORD
  4072. WINAPI
  4073. MsgWaitForMultipleObjectsEx(
  4074.     DWORD nCount,
  4075.     LPHANDLE pHandles,
  4076.     DWORD dwMilliseconds,
  4077.     DWORD dwWakeMask,
  4078.     DWORD dwFlags);
  4079.  
  4080. #define MWMO_WAITALL      0x0001
  4081. #define MWMO_ALERTABLE    0x0002
  4082.  
  4083. /*
  4084.  * Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
  4085.  */
  4086. #define QS_KEY              0x0001
  4087. #define QS_MOUSEMOVE        0x0002
  4088. #define QS_MOUSEBUTTON      0x0004
  4089. #define QS_POSTMESSAGE      0x0008
  4090. #define QS_TIMER            0x0010
  4091. #define QS_PAINT            0x0020
  4092. #define QS_SENDMESSAGE      0x0040
  4093. #define QS_HOTKEY           0x0080
  4094. #define QS_ALLPOSTMESSAGE   0x0100
  4095.  
  4096.  
  4097.  
  4098. #define QS_MOUSE           (QS_MOUSEMOVE     | \
  4099.                             QS_MOUSEBUTTON)
  4100.  
  4101. #define QS_INPUT           (QS_MOUSE         | \
  4102.                             QS_KEY)
  4103.  
  4104. #define QS_ALLEVENTS       (QS_INPUT         | \
  4105.                             QS_POSTMESSAGE   | \
  4106.                             QS_TIMER         | \
  4107.                             QS_PAINT         | \
  4108.                             QS_HOTKEY)
  4109.  
  4110. #define QS_ALLINPUT        (QS_INPUT         | \
  4111.                             QS_POSTMESSAGE   | \
  4112.                             QS_TIMER         | \
  4113.                             QS_PAINT         | \
  4114.                             QS_HOTKEY        | \
  4115.                             QS_SENDMESSAGE)
  4116.  
  4117.  
  4118. /*
  4119.  * Windows Functions
  4120.  */
  4121.  
  4122. WINUSERAPI
  4123. UINT
  4124. WINAPI
  4125. SetTimer(
  4126.     HWND hWnd ,
  4127.     UINT nIDEvent,
  4128.     UINT uElapse,
  4129.     TIMERPROC lpTimerFunc);
  4130.  
  4131. WINUSERAPI
  4132. BOOL
  4133. WINAPI
  4134. KillTimer(
  4135.     HWND hWnd,
  4136.     UINT uIDEvent);
  4137.  
  4138. WINUSERAPI
  4139. BOOL
  4140. WINAPI
  4141. IsWindowUnicode(
  4142.     HWND hWnd);
  4143.  
  4144. WINUSERAPI
  4145. BOOL
  4146. WINAPI
  4147. EnableWindow(
  4148.     HWND hWnd,
  4149.     BOOL bEnable);
  4150.  
  4151. WINUSERAPI
  4152. BOOL
  4153. WINAPI
  4154. IsWindowEnabled(
  4155.     HWND hWnd);
  4156.  
  4157. WINUSERAPI
  4158. HACCEL
  4159. WINAPI
  4160. LoadAcceleratorsA(
  4161.     HINSTANCE hInstance,
  4162.     LPCSTR lpTableName);
  4163. WINUSERAPI
  4164. HACCEL
  4165. WINAPI
  4166. LoadAcceleratorsW(
  4167.     HINSTANCE hInstance,
  4168.     LPCWSTR lpTableName);
  4169. #ifdef UNICODE
  4170. #define LoadAccelerators  LoadAcceleratorsW
  4171. #else
  4172. #define LoadAccelerators  LoadAcceleratorsA
  4173. #endif // !UNICODE
  4174.  
  4175. WINUSERAPI
  4176. HACCEL
  4177. WINAPI
  4178. CreateAcceleratorTableA(
  4179.     LPACCEL, int);
  4180. WINUSERAPI
  4181. HACCEL
  4182. WINAPI
  4183. CreateAcceleratorTableW(
  4184.     LPACCEL, int);
  4185. #ifdef UNICODE
  4186. #define CreateAcceleratorTable  CreateAcceleratorTableW
  4187. #else
  4188. #define CreateAcceleratorTable  CreateAcceleratorTableA
  4189. #endif // !UNICODE
  4190.  
  4191. WINUSERAPI
  4192. BOOL
  4193. WINAPI
  4194. DestroyAcceleratorTable(
  4195.     HACCEL hAccel);
  4196.  
  4197. WINUSERAPI
  4198. int
  4199. WINAPI
  4200. CopyAcceleratorTableA(
  4201.     HACCEL hAccelSrc,
  4202.     LPACCEL lpAccelDst,
  4203.     int cAccelEntries);
  4204. WINUSERAPI
  4205. int
  4206. WINAPI
  4207. CopyAcceleratorTableW(
  4208.     HACCEL hAccelSrc,
  4209.     LPACCEL lpAccelDst,
  4210.     int cAccelEntries);
  4211. #ifdef UNICODE
  4212. #define CopyAcceleratorTable  CopyAcceleratorTableW
  4213. #else
  4214. #define CopyAcceleratorTable  CopyAcceleratorTableA
  4215. #endif // !UNICODE
  4216.  
  4217. #ifndef NOMSG
  4218.  
  4219. WINUSERAPI
  4220. int
  4221. WINAPI
  4222. TranslateAcceleratorA(
  4223.     HWND hWnd,
  4224.     HACCEL hAccTable,
  4225.     LPMSG lpMsg);
  4226. WINUSERAPI
  4227. int
  4228. WINAPI
  4229. TranslateAcceleratorW(
  4230.     HWND hWnd,
  4231.     HACCEL hAccTable,
  4232.     LPMSG lpMsg);
  4233. #ifdef UNICODE
  4234. #define TranslateAccelerator  TranslateAcceleratorW
  4235. #else
  4236. #define TranslateAccelerator  TranslateAcceleratorA
  4237. #endif // !UNICODE
  4238.  
  4239. #endif /* !NOMSG */
  4240.  
  4241. #ifndef NOSYSMETRICS
  4242.  
  4243. /*
  4244.  * GetSystemMetrics() codes
  4245.  */
  4246. #define SM_CXSCREEN             0
  4247. #define SM_CYSCREEN             1
  4248. #define SM_CXVSCROLL            2
  4249. #define SM_CYHSCROLL            3
  4250. #define SM_CYCAPTION            4
  4251. #define SM_CXBORDER             5
  4252. #define SM_CYBORDER             6
  4253. #define SM_CXDLGFRAME           7
  4254. #define SM_CYDLGFRAME           8
  4255. #define SM_CYVTHUMB             9
  4256. #define SM_CXHTHUMB             10
  4257. #define SM_CXICON               11
  4258. #define SM_CYICON               12
  4259. #define SM_CXCURSOR             13
  4260. #define SM_CYCURSOR             14
  4261. #define SM_CYMENU               15
  4262. #define SM_CXFULLSCREEN         16
  4263. #define SM_CYFULLSCREEN         17
  4264. #define SM_CYKANJIWINDOW        18
  4265. #define SM_MOUSEPRESENT         19
  4266. #define SM_CYVSCROLL            20
  4267. #define SM_CXHSCROLL            21
  4268. #define SM_DEBUG                22
  4269. #define SM_SWAPBUTTON           23
  4270. #define SM_RESERVED1            24
  4271. #define SM_RESERVED2            25
  4272. #define SM_RESERVED3            26
  4273. #define SM_RESERVED4            27
  4274. #define SM_CXMIN                28
  4275. #define SM_CYMIN                29
  4276. #define SM_CXSIZE               30
  4277. #define SM_CYSIZE               31
  4278. #define SM_CXFRAME              32
  4279. #define SM_CYFRAME              33
  4280. #define SM_CXMINTRACK           34
  4281. #define SM_CYMINTRACK           35
  4282. #define SM_CXDOUBLECLK          36
  4283. #define SM_CYDOUBLECLK          37
  4284. #define SM_CXICONSPACING        38
  4285. #define SM_CYICONSPACING        39
  4286. #define SM_MENUDROPALIGNMENT    40
  4287. #define SM_PENWINDOWS           41
  4288. #define SM_DBCSENABLED          42
  4289. #define SM_CMOUSEBUTTONS        43
  4290.  
  4291. #if(WINVER >= 0x0400)
  4292. #define SM_CXFIXEDFRAME           SM_CXDLGFRAME  /* ;win40 name change */
  4293. #define SM_CYFIXEDFRAME           SM_CYDLGFRAME  /* ;win40 name change */
  4294. #define SM_CXSIZEFRAME            SM_CXFRAME     /* ;win40 name change */
  4295. #define SM_CYSIZEFRAME            SM_CYFRAME     /* ;win40 name change */
  4296.  
  4297. #define SM_SECURE               44
  4298. #define SM_CXEDGE               45
  4299. #define SM_CYEDGE               46
  4300. #define SM_CXMINSPACING         47
  4301. #define SM_CYMINSPACING         48
  4302. #define SM_CXSMICON             49
  4303. #define SM_CYSMICON             50
  4304. #define SM_CYSMCAPTION          51
  4305. #define SM_CXSMSIZE             52
  4306. #define SM_CYSMSIZE             53
  4307. #define SM_CXMENUSIZE           54
  4308. #define SM_CYMENUSIZE           55
  4309. #define SM_ARRANGE              56
  4310. #define SM_CXMINIMIZED          57
  4311. #define SM_CYMINIMIZED          58
  4312. #define SM_CXMAXTRACK           59
  4313. #define SM_CYMAXTRACK           60
  4314. #define SM_CXMAXIMIZED          61
  4315. #define SM_CYMAXIMIZED          62
  4316. #define SM_NETWORK              63
  4317. #define SM_CLEANBOOT            67
  4318. #define SM_CXDRAG               68
  4319. #define SM_CYDRAG               69
  4320. #endif /* WINVER >= 0x0400 */
  4321. #define SM_SHOWSOUNDS           70
  4322. #if(WINVER >= 0x0400)
  4323. #define SM_CXMENUCHECK          71   /* Use instead of GetMenuCheckMarkDimensions()! */
  4324. #define SM_CYMENUCHECK          72
  4325. #define SM_SLOWMACHINE          73
  4326. #define SM_MIDEASTENABLED       74
  4327. #endif /* WINVER >= 0x0400 */
  4328. #if(_WIN32_WINNT >= 0x0400)
  4329. #define SM_MOUSEWHEELPRESENT    75
  4330. #endif /* _WIN32_WINNT >= 0x0400 */
  4331. #if (_WIN32_WINNT < 0x0400)
  4332. #define SM_CMETRICS             75
  4333. #else
  4334. #define SM_CMETRICS             76
  4335. #endif
  4336.  
  4337.  
  4338.  
  4339. WINUSERAPI
  4340. int
  4341. WINAPI
  4342. GetSystemMetrics(
  4343.     int nIndex);
  4344.  
  4345. #endif /* !NOSYSMETRICS */
  4346.  
  4347. #ifndef NOMENUS
  4348.  
  4349. WINUSERAPI
  4350. HMENU
  4351. WINAPI
  4352. LoadMenuA(
  4353.     HINSTANCE hInstance,
  4354.     LPCSTR lpMenuName);
  4355. WINUSERAPI
  4356. HMENU
  4357. WINAPI
  4358. LoadMenuW(
  4359.     HINSTANCE hInstance,
  4360.     LPCWSTR lpMenuName);
  4361. #ifdef UNICODE
  4362. #define LoadMenu  LoadMenuW
  4363. #else
  4364. #define LoadMenu  LoadMenuA
  4365. #endif // !UNICODE
  4366.  
  4367. WINUSERAPI
  4368. HMENU
  4369. WINAPI
  4370. LoadMenuIndirectA(
  4371.     CONST MENUTEMPLATEA *lpMenuTemplate);
  4372. WINUSERAPI
  4373. HMENU
  4374. WINAPI
  4375. LoadMenuIndirectW(
  4376.     CONST MENUTEMPLATEW *lpMenuTemplate);
  4377. #ifdef UNICODE
  4378. #define LoadMenuIndirect  LoadMenuIndirectW
  4379. #else
  4380. #define LoadMenuIndirect  LoadMenuIndirectA
  4381. #endif // !UNICODE
  4382.  
  4383. WINUSERAPI
  4384. HMENU
  4385. WINAPI
  4386. GetMenu(
  4387.     HWND hWnd);
  4388.  
  4389. WINUSERAPI
  4390. BOOL
  4391. WINAPI
  4392. SetMenu(
  4393.     HWND hWnd,
  4394.     HMENU hMenu);
  4395.  
  4396. WINUSERAPI
  4397. BOOL
  4398. WINAPI
  4399. ChangeMenuA(
  4400.     HMENU hMenu,
  4401.     UINT cmd,
  4402.     LPCSTR lpszNewItem,
  4403.     UINT cmdInsert,
  4404.     UINT flags);
  4405. WINUSERAPI
  4406. BOOL
  4407. WINAPI
  4408. ChangeMenuW(
  4409.     HMENU hMenu,
  4410.     UINT cmd,
  4411.     LPCWSTR lpszNewItem,
  4412.     UINT cmdInsert,
  4413.     UINT flags);
  4414. #ifdef UNICODE
  4415. #define ChangeMenu  ChangeMenuW
  4416. #else
  4417. #define ChangeMenu  ChangeMenuA
  4418. #endif // !UNICODE
  4419.  
  4420. WINUSERAPI
  4421. BOOL
  4422. WINAPI
  4423. HiliteMenuItem(
  4424.     HWND hWnd,
  4425.     HMENU hMenu,
  4426.     UINT uIDHiliteItem,
  4427.     UINT uHilite);
  4428.  
  4429. WINUSERAPI
  4430. int
  4431. WINAPI
  4432. GetMenuStringA(
  4433.     HMENU hMenu,
  4434.     UINT uIDItem,
  4435.     LPSTR lpString,
  4436.     int nMaxCount,
  4437.     UINT uFlag);
  4438. WINUSERAPI
  4439. int
  4440. WINAPI
  4441. GetMenuStringW(
  4442.     HMENU hMenu,
  4443.     UINT uIDItem,
  4444.     LPWSTR lpString,
  4445.     int nMaxCount,
  4446.     UINT uFlag);
  4447. #ifdef UNICODE
  4448. #define GetMenuString  GetMenuStringW
  4449. #else
  4450. #define GetMenuString  GetMenuStringA
  4451. #endif // !UNICODE
  4452.  
  4453. WINUSERAPI
  4454. UINT
  4455. WINAPI
  4456. GetMenuState(
  4457.     HMENU hMenu,
  4458.     UINT uId,
  4459.     UINT uFlags);
  4460.  
  4461. WINUSERAPI
  4462. BOOL
  4463. WINAPI
  4464. DrawMenuBar(
  4465.     HWND hWnd);
  4466.  
  4467.  
  4468. WINUSERAPI
  4469. HMENU
  4470. WINAPI
  4471. GetSystemMenu(
  4472.     HWND hWnd,
  4473.     BOOL bRevert);
  4474.  
  4475.  
  4476.  
  4477. WINUSERAPI
  4478. HMENU
  4479. WINAPI
  4480. CreateMenu(
  4481.     VOID);
  4482.  
  4483. WINUSERAPI
  4484. HMENU
  4485. WINAPI
  4486. CreatePopupMenu(
  4487.     VOID);
  4488.  
  4489. WINUSERAPI
  4490. BOOL
  4491. WINAPI
  4492. DestroyMenu(
  4493.     HMENU hMenu);
  4494.  
  4495. WINUSERAPI
  4496. DWORD
  4497. WINAPI
  4498. CheckMenuItem(
  4499.     HMENU hMenu,
  4500.     UINT uIDCheckItem,
  4501.     UINT uCheck);
  4502.  
  4503. WINUSERAPI
  4504. BOOL
  4505. WINAPI
  4506. EnableMenuItem(
  4507.     HMENU hMenu,
  4508.     UINT uIDEnableItem,
  4509.     UINT uEnable);
  4510.  
  4511. WINUSERAPI
  4512. HMENU
  4513. WINAPI
  4514. GetSubMenu(
  4515.     HMENU hMenu,
  4516.     int nPos);
  4517.  
  4518. WINUSERAPI
  4519. UINT
  4520. WINAPI
  4521. GetMenuItemID(
  4522.     HMENU hMenu,
  4523.     int nPos);
  4524.  
  4525. WINUSERAPI
  4526. int
  4527. WINAPI
  4528. GetMenuItemCount(
  4529.     HMENU hMenu);
  4530.  
  4531. WINUSERAPI
  4532. BOOL
  4533. WINAPI
  4534. InsertMenuA(
  4535.     HMENU hMenu,
  4536.     UINT uPosition,
  4537.     UINT uFlags,
  4538.     UINT uIDNewItem,
  4539.     LPCSTR lpNewItem
  4540.     );
  4541. WINUSERAPI
  4542. BOOL
  4543. WINAPI
  4544. InsertMenuW(
  4545.     HMENU hMenu,
  4546.     UINT uPosition,
  4547.     UINT uFlags,
  4548.     UINT uIDNewItem,
  4549.     LPCWSTR lpNewItem
  4550.     );
  4551. #ifdef UNICODE
  4552. #define InsertMenu  InsertMenuW
  4553. #else
  4554. #define InsertMenu  InsertMenuA
  4555. #endif // !UNICODE
  4556.  
  4557. WINUSERAPI
  4558. BOOL
  4559. WINAPI
  4560. AppendMenuA(
  4561.     HMENU hMenu,
  4562.     UINT uFlags,
  4563.     UINT uIDNewItem,
  4564.     LPCSTR lpNewItem
  4565.     );
  4566. WINUSERAPI
  4567. BOOL
  4568. WINAPI
  4569. AppendMenuW(
  4570.     HMENU hMenu,
  4571.     UINT uFlags,
  4572.     UINT uIDNewItem,
  4573.     LPCWSTR lpNewItem
  4574.     );
  4575. #ifdef UNICODE
  4576. #define AppendMenu  AppendMenuW
  4577. #else
  4578. #define AppendMenu  AppendMenuA
  4579. #endif // !UNICODE
  4580.  
  4581. WINUSERAPI
  4582. BOOL
  4583. WINAPI
  4584. ModifyMenuA(
  4585.     HMENU hMnu,
  4586.     UINT uPosition,
  4587.     UINT uFlags,
  4588.     UINT uIDNewItem,
  4589.     LPCSTR lpNewItem
  4590.     );
  4591. WINUSERAPI
  4592. BOOL
  4593. WINAPI
  4594. ModifyMenuW(
  4595.     HMENU hMnu,
  4596.     UINT uPosition,
  4597.     UINT uFlags,
  4598.     UINT uIDNewItem,
  4599.     LPCWSTR lpNewItem
  4600.     );
  4601. #ifdef UNICODE
  4602. #define ModifyMenu  ModifyMenuW
  4603. #else
  4604. #define ModifyMenu  ModifyMenuA
  4605. #endif // !UNICODE
  4606.  
  4607. WINUSERAPI
  4608. BOOL
  4609. WINAPI RemoveMenu(
  4610.     HMENU hMenu,
  4611.     UINT uPosition,
  4612.     UINT uFlags);
  4613.  
  4614. WINUSERAPI
  4615. BOOL
  4616. WINAPI
  4617. DeleteMenu(
  4618.     HMENU hMenu,
  4619.     UINT uPosition,
  4620.     UINT uFlags);
  4621.  
  4622. WINUSERAPI
  4623. BOOL
  4624. WINAPI
  4625. SetMenuItemBitmaps(
  4626.     HMENU hMenu,
  4627.     UINT uPosition,
  4628.     UINT uFlags,
  4629.     HBITMAP hBitmapUnchecked,
  4630.     HBITMAP hBitmapChecked);
  4631.  
  4632. WINUSERAPI
  4633. LONG
  4634. WINAPI
  4635. GetMenuCheckMarkDimensions(
  4636.     VOID);
  4637.  
  4638. WINUSERAPI
  4639. BOOL
  4640. WINAPI
  4641. TrackPopupMenu(
  4642.     HMENU hMenu,
  4643.     UINT uFlags,
  4644.     int x,
  4645.     int y,
  4646.     int nReserved,
  4647.     HWND hWnd,
  4648.     CONST RECT *prcRect);
  4649.  
  4650. #if(WINVER >= 0x0400)
  4651. /* return codes for WM_MENUCHAR */
  4652. #define MNC_IGNORE  0
  4653. #define MNC_CLOSE   1
  4654. #define MNC_EXECUTE 2
  4655. #define MNC_SELECT  3
  4656.  
  4657. typedef struct tagTPMPARAMS
  4658. {
  4659.     UINT    cbSize;     /* Size of structure */
  4660.     RECT    rcExclude;  /* Screen coordinates of rectangle to exclude when positioning */
  4661. }   TPMPARAMS;
  4662. typedef TPMPARAMS FAR *LPTPMPARAMS;
  4663.  
  4664. WINUSERAPI BOOL    WINAPI TrackPopupMenuEx(HMENU, UINT, int, int, HWND, LPTPMPARAMS);
  4665. #endif /* WINVER >= 0x0400 */
  4666.  
  4667.  
  4668. #if(WINVER >= 0x0400)
  4669. #define MIIM_STATE       0x00000001
  4670. #define MIIM_ID          0x00000002
  4671. #define MIIM_SUBMENU     0x00000004
  4672. #define MIIM_CHECKMARKS  0x00000008
  4673. #define MIIM_TYPE        0x00000010
  4674. #define MIIM_DATA        0x00000020
  4675. #endif /* WINVER >= 0x0400 */
  4676.  
  4677.  
  4678. #if(WINVER >= 0x0400)
  4679. typedef struct tagMENUITEMINFOA
  4680. {
  4681.     UINT    cbSize;
  4682.     UINT    fMask;
  4683.     UINT    fType;          // used if MIIM_TYPE
  4684.     UINT    fState;         // used if MIIM_STATE
  4685.     UINT    wID;            // used if MIIM_ID
  4686.     HMENU   hSubMenu;       // used if MIIM_SUBMENU
  4687.     HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
  4688.     HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
  4689.     DWORD   dwItemData;     // used if MIIM_DATA
  4690.     LPSTR   dwTypeData;     // used if MIIM_TYPE
  4691.     UINT    cch;            // used if MIIM_TYPE
  4692. }   MENUITEMINFOA, FAR *LPMENUITEMINFOA;
  4693. typedef struct tagMENUITEMINFOW
  4694. {
  4695.     UINT    cbSize;
  4696.     UINT    fMask;
  4697.     UINT    fType;          // used if MIIM_TYPE
  4698.     UINT    fState;         // used if MIIM_STATE
  4699.     UINT    wID;            // used if MIIM_ID
  4700.     HMENU   hSubMenu;       // used if MIIM_SUBMENU
  4701.     HBITMAP hbmpChecked;    // used if MIIM_CHECKMARKS
  4702.     HBITMAP hbmpUnchecked;  // used if MIIM_CHECKMARKS
  4703.     DWORD   dwItemData;     // used if MIIM_DATA
  4704.     LPWSTR  dwTypeData;     // used if MIIM_TYPE
  4705.     UINT    cch;            // used if MIIM_TYPE
  4706. }   MENUITEMINFOW, FAR *LPMENUITEMINFOW;
  4707. #ifdef UNICODE
  4708. typedef MENUITEMINFOW MENUITEMINFO;
  4709. typedef LPMENUITEMINFOW LPMENUITEMINFO;
  4710. #else
  4711. typedef MENUITEMINFOA MENUITEMINFO;
  4712. typedef LPMENUITEMINFOA LPMENUITEMINFO;
  4713. #endif // UNICODE
  4714. typedef MENUITEMINFOA CONST FAR *LPCMENUITEMINFOA;
  4715. typedef MENUITEMINFOW CONST FAR *LPCMENUITEMINFOW;
  4716. #ifdef UNICODE
  4717. typedef LPCMENUITEMINFOW LPCMENUITEMINFO;
  4718. #else
  4719. typedef LPCMENUITEMINFOA LPCMENUITEMINFO;
  4720. #endif // UNICODE
  4721.  
  4722. WINUSERAPI
  4723. BOOL
  4724. WINAPI
  4725. InsertMenuItemA(
  4726.     HMENU,
  4727.     UINT,
  4728.     BOOL,
  4729.     LPCMENUITEMINFOA
  4730.     );
  4731. WINUSERAPI
  4732. BOOL
  4733. WINAPI
  4734. InsertMenuItemW(
  4735.     HMENU,
  4736.     UINT,
  4737.     BOOL,
  4738.     LPCMENUITEMINFOW
  4739.     );
  4740. #ifdef UNICODE
  4741. #define InsertMenuItem  InsertMenuItemW
  4742. #else
  4743. #define InsertMenuItem  InsertMenuItemA
  4744. #endif // !UNICODE
  4745.  
  4746. WINUSERAPI
  4747. BOOL
  4748. WINAPI
  4749. GetMenuItemInfoA(
  4750.     HMENU,
  4751.     UINT,
  4752.     BOOL,
  4753.     LPMENUITEMINFOA
  4754.     );
  4755. WINUSERAPI
  4756. BOOL
  4757. WINAPI
  4758. GetMenuItemInfoW(
  4759.     HMENU,
  4760.     UINT,
  4761.     BOOL,
  4762.     LPMENUITEMINFOW
  4763.     );
  4764. #ifdef UNICODE
  4765. #define GetMenuItemInfo  GetMenuItemInfoW
  4766. #else
  4767. #define GetMenuItemInfo  GetMenuItemInfoA
  4768. #endif // !UNICODE
  4769.  
  4770. WINUSERAPI
  4771. BOOL
  4772. WINAPI
  4773. SetMenuItemInfoA(
  4774.     HMENU,
  4775.     UINT,
  4776.     BOOL,
  4777.     LPCMENUITEMINFOA
  4778.     );
  4779. WINUSERAPI
  4780. BOOL
  4781. WINAPI
  4782. SetMenuItemInfoW(
  4783.     HMENU,
  4784.     UINT,
  4785.     BOOL,
  4786.     LPCMENUITEMINFOW
  4787.     );
  4788. #ifdef UNICODE
  4789. #define SetMenuItemInfo  SetMenuItemInfoW
  4790. #else
  4791. #define SetMenuItemInfo  SetMenuItemInfoA
  4792. #endif // !UNICODE
  4793.  
  4794.  
  4795. #define GMDI_USEDISABLED    0x0001L
  4796. #define GMDI_GOINTOPOPUPS   0x0002L
  4797.  
  4798. WINUSERAPI UINT    WINAPI GetMenuDefaultItem(HMENU hMenu, UINT fByPos, UINT gmdiFlags);
  4799. WINUSERAPI BOOL    WINAPI SetMenuDefaultItem(HMENU hMenu, UINT uItem, UINT fByPos);
  4800.  
  4801. WINUSERAPI BOOL    WINAPI GetMenuItemRect(HWND hWnd, HMENU hMenu, UINT uItem, LPRECT lprcItem);
  4802. WINUSERAPI int     WINAPI MenuItemFromPoint(HWND hWnd, HMENU hMenu, POINT ptScreen);
  4803. #endif /* WINVER >= 0x0400 */
  4804.  
  4805. /*
  4806.  * Flags for TrackPopupMenu
  4807.  */
  4808. #define TPM_LEFTBUTTON  0x0000L
  4809. #define TPM_RIGHTBUTTON 0x0002L
  4810. #define TPM_LEFTALIGN   0x0000L
  4811. #define TPM_CENTERALIGN 0x0004L
  4812. #define TPM_RIGHTALIGN  0x0008L
  4813. #if(WINVER >= 0x0400)
  4814. #define TPM_TOPALIGN        0x0000L
  4815. #define TPM_VCENTERALIGN    0x0010L
  4816. #define TPM_BOTTOMALIGN     0x0020L
  4817.  
  4818. #define TPM_HORIZONTAL      0x0000L     /* Horz alignment matters more */
  4819. #define TPM_VERTICAL        0x0040L     /* Vert alignment matters more */
  4820. #define TPM_NONOTIFY        0x0080L     /* Don't send any notification msgs */
  4821. #define TPM_RETURNCMD       0x0100L
  4822. #endif /* WINVER >= 0x0400 */
  4823.  
  4824.  
  4825. #endif /* !NOMENUS */
  4826.  
  4827.  
  4828. #if(WINVER >= 0x0400)
  4829. //
  4830. // Drag-and-drop support
  4831. //
  4832.  
  4833. typedef struct tagDROPSTRUCT
  4834. {
  4835.     HWND    hwndSource;
  4836.     HWND    hwndSink;
  4837.     DWORD   wFmt;
  4838.     DWORD   dwData;
  4839.     POINT   ptDrop;
  4840.     DWORD   dwControlData;
  4841. } DROPSTRUCT, *PDROPSTRUCT, *LPDROPSTRUCT;
  4842.  
  4843. #define DOF_EXECUTABLE      0x8001
  4844. #define DOF_DOCUMENT        0x8002
  4845. #define DOF_DIRECTORY       0x8003
  4846. #define DOF_MULTIPLE        0x8004
  4847. #define DOF_PROGMAN         0x0001
  4848. #define DOF_SHELLDATA       0x0002
  4849.  
  4850. #define DO_DROPFILE         0x454C4946L
  4851. #define DO_PRINTFILE        0x544E5250L
  4852.  
  4853. WINUSERAPI
  4854. DWORD
  4855. WINAPI
  4856. DragObject(HWND, HWND, UINT, DWORD, HCURSOR);
  4857.  
  4858. WINUSERAPI
  4859. BOOL
  4860. WINAPI
  4861. DragDetect(HWND, POINT);
  4862. #endif /* WINVER >= 0x0400 */
  4863.  
  4864. WINUSERAPI
  4865. BOOL
  4866. WINAPI
  4867. DrawIcon(
  4868.     HDC hDC,
  4869.     int X,
  4870.     int Y,
  4871.     HICON hIcon);
  4872.  
  4873. #ifndef NODRAWTEXT
  4874.  
  4875. /*
  4876.  * DrawText() Format Flags
  4877.  */
  4878. #define DT_TOP              0x00000000
  4879. #define DT_LEFT             0x00000000
  4880. #define DT_CENTER           0x00000001
  4881. #define DT_RIGHT            0x00000002
  4882. #define DT_VCENTER          0x00000004
  4883. #define DT_BOTTOM           0x00000008
  4884. #define DT_WORDBREAK        0x00000010
  4885. #define DT_SINGLELINE       0x00000020
  4886. #define DT_EXPANDTABS       0x00000040
  4887. #define DT_TABSTOP          0x00000080
  4888. #define DT_NOCLIP           0x00000100
  4889. #define DT_EXTERNALLEADING  0x00000200
  4890. #define DT_CALCRECT         0x00000400
  4891. #define DT_NOPREFIX         0x00000800
  4892. #define DT_INTERNAL         0x00001000
  4893.  
  4894. #if(WINVER >= 0x0400)
  4895. #define DT_EDITCONTROL      0x00002000
  4896. #define DT_PATH_ELLIPSIS    0x00004000
  4897. #define DT_END_ELLIPSIS     0x00008000
  4898. #define DT_MODIFYSTRING     0x00010000
  4899. #define DT_RTLREADING       0x00020000
  4900. #define DT_WORD_ELLIPSIS    0x00040000
  4901.  
  4902.  
  4903.  
  4904. typedef struct tagDRAWTEXTPARAMS
  4905. {
  4906.     UINT    cbSize;
  4907.     int     iTabLength;
  4908.     int     iLeftMargin;
  4909.     int     iRightMargin;
  4910.     UINT    uiLengthDrawn;
  4911. } DRAWTEXTPARAMS, FAR *LPDRAWTEXTPARAMS;
  4912. #endif /* WINVER >= 0x0400 */
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918. WINUSERAPI
  4919. int
  4920. WINAPI
  4921. DrawTextA(
  4922.     HDC hDC,
  4923.     LPCSTR lpString,
  4924.     int nCount,
  4925.     LPRECT lpRect,
  4926.     UINT uFormat);
  4927. WINUSERAPI
  4928. int
  4929. WINAPI
  4930. DrawTextW(
  4931.     HDC hDC,
  4932.     LPCWSTR lpString,
  4933.     int nCount,
  4934.     LPRECT lpRect,
  4935.     UINT uFormat);
  4936. #ifdef UNICODE
  4937. #define DrawText  DrawTextW
  4938. #else
  4939. #define DrawText  DrawTextA
  4940. #endif // !UNICODE
  4941.  
  4942.  
  4943. #if(WINVER >= 0x0400)
  4944. WINUSERAPI
  4945. int
  4946. WINAPI
  4947. DrawTextExA(HDC, LPSTR, int, LPRECT, UINT, LPDRAWTEXTPARAMS);
  4948. WINUSERAPI
  4949. int
  4950. WINAPI
  4951. DrawTextExW(HDC, LPWSTR, int, LPRECT, UINT, LPDRAWTEXTPARAMS);
  4952. #ifdef UNICODE
  4953. #define DrawTextEx  DrawTextExW
  4954. #else
  4955. #define DrawTextEx  DrawTextExA
  4956. #endif // !UNICODE
  4957. #endif /* WINVER >= 0x0400 */
  4958.  
  4959. #endif /* !NODRAWTEXT */
  4960.  
  4961. WINUSERAPI
  4962. BOOL
  4963. WINAPI
  4964. GrayStringA(
  4965.     HDC hDC,
  4966.     HBRUSH hBrush,
  4967.     GRAYSTRINGPROC lpOutputFunc,
  4968.     LPARAM lpData,
  4969.     int nCount,
  4970.     int X,
  4971.     int Y,
  4972.     int nWidth,
  4973.     int nHeight);
  4974. WINUSERAPI
  4975. BOOL
  4976. WINAPI
  4977. GrayStringW(
  4978.     HDC hDC,
  4979.     HBRUSH hBrush,
  4980.     GRAYSTRINGPROC lpOutputFunc,
  4981.     LPARAM lpData,
  4982.     int nCount,
  4983.     int X,
  4984.     int Y,
  4985.     int nWidth,
  4986.     int nHeight);
  4987. #ifdef UNICODE
  4988. #define GrayString  GrayStringW
  4989. #else
  4990. #define GrayString  GrayStringA
  4991. #endif // !UNICODE
  4992.  
  4993. #if(WINVER >= 0x0400)
  4994. /* Monolithic state-drawing routine */
  4995. /* Image type */
  4996. #define DST_COMPLEX     0x0000
  4997. #define DST_TEXT        0x0001
  4998. #define DST_PREFIXTEXT  0x0002
  4999. #define DST_ICON        0x0003
  5000. #define DST_BITMAP      0x0004
  5001.  
  5002. /* State type */
  5003. #define DSS_NORMAL      0x0000
  5004. #define DSS_UNION       0x0010  /* Gray string appearance */
  5005. #define DSS_DISABLED    0x0020
  5006. #define DSS_MONO        0x0080
  5007. #define DSS_RIGHT       0x8000
  5008.  
  5009. WINUSERAPI BOOL WINAPI DrawStateA(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT);
  5010. WINUSERAPI BOOL WINAPI DrawStateW(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT);
  5011. #ifdef UNICODE
  5012. #define DrawState  DrawStateW
  5013. #else
  5014. #define DrawState  DrawStateA
  5015. #endif // !UNICODE
  5016. #endif /* WINVER >= 0x0400 */
  5017.  
  5018.  
  5019. WINUSERAPI
  5020. LONG
  5021. WINAPI
  5022. TabbedTextOutA(
  5023.     HDC hDC,
  5024.     int X,
  5025.     int Y,
  5026.     LPCSTR lpString,
  5027.     int nCount,
  5028.     int nTabPositions,
  5029.     LPINT lpnTabStopPositions,
  5030.     int nTabOrigin);
  5031. WINUSERAPI
  5032. LONG
  5033. WINAPI
  5034. TabbedTextOutW(
  5035.     HDC hDC,
  5036.     int X,
  5037.     int Y,
  5038.     LPCWSTR lpString,
  5039.     int nCount,
  5040.     int nTabPositions,
  5041.     LPINT lpnTabStopPositions,
  5042.     int nTabOrigin);
  5043. #ifdef UNICODE
  5044. #define TabbedTextOut  TabbedTextOutW
  5045. #else
  5046. #define TabbedTextOut  TabbedTextOutA
  5047. #endif // !UNICODE
  5048.  
  5049. WINUSERAPI
  5050. DWORD
  5051. WINAPI
  5052. GetTabbedTextExtentA(
  5053.     HDC hDC,
  5054.     LPCSTR lpString,
  5055.     int nCount,
  5056.     int nTabPositions,
  5057.     LPINT lpnTabStopPositions);
  5058. WINUSERAPI
  5059. DWORD
  5060. WINAPI
  5061. GetTabbedTextExtentW(
  5062.     HDC hDC,
  5063.     LPCWSTR lpString,
  5064.     int nCount,
  5065.     int nTabPositions,
  5066.     LPINT lpnTabStopPositions);
  5067. #ifdef UNICODE
  5068. #define GetTabbedTextExtent  GetTabbedTextExtentW
  5069. #else
  5070. #define GetTabbedTextExtent  GetTabbedTextExtentA
  5071. #endif // !UNICODE
  5072.  
  5073. WINUSERAPI
  5074. BOOL
  5075. WINAPI
  5076. UpdateWindow(
  5077.     HWND hWnd);
  5078.  
  5079. WINUSERAPI
  5080. HWND
  5081. WINAPI
  5082. SetActiveWindow(
  5083.     HWND hWnd);
  5084.  
  5085. WINUSERAPI
  5086. HWND
  5087. WINAPI
  5088. GetForegroundWindow(
  5089.     VOID);
  5090.  
  5091. #if(WINVER >= 0x0400)
  5092. WINUSERAPI BOOL WINAPI PaintDesktop(HDC hdc);
  5093.  
  5094. #endif /* WINVER >= 0x0400 */
  5095.  
  5096. WINUSERAPI
  5097. BOOL
  5098. WINAPI
  5099. SetForegroundWindow(
  5100.     HWND hWnd);
  5101.  
  5102. WINUSERAPI
  5103. HWND
  5104. WINAPI
  5105. WindowFromDC(
  5106.     HDC hDC);
  5107.  
  5108. WINUSERAPI
  5109. HDC
  5110. WINAPI
  5111. GetDC(
  5112.     HWND hWnd);
  5113.  
  5114. WINUSERAPI
  5115. HDC
  5116. WINAPI
  5117. GetDCEx(
  5118.     HWND hWnd ,
  5119.     HRGN hrgnClip,
  5120.     DWORD flags);
  5121.  
  5122. /*
  5123.  * GetDCEx() flags
  5124.  */
  5125. #define DCX_WINDOW           0x00000001L
  5126. #define DCX_CACHE            0x00000002L
  5127. #define DCX_NORESETATTRS     0x00000004L
  5128. #define DCX_CLIPCHILDREN     0x00000008L
  5129. #define DCX_CLIPSIBLINGS     0x00000010L
  5130. #define DCX_PARENTCLIP       0x00000020L
  5131.  
  5132. #define DCX_EXCLUDERGN       0x00000040L
  5133. #define DCX_INTERSECTRGN     0x00000080L
  5134.  
  5135. #define DCX_EXCLUDEUPDATE    0x00000100L
  5136. #define DCX_INTERSECTUPDATE  0x00000200L
  5137.  
  5138. #define DCX_LOCKWINDOWUPDATE 0x00000400L
  5139.  
  5140. #define DCX_VALIDATE         0x00200000L
  5141.  
  5142.  
  5143.  
  5144.  
  5145. WINUSERAPI
  5146. HDC
  5147. WINAPI
  5148. GetWindowDC(
  5149.     HWND hWnd);
  5150.  
  5151. WINUSERAPI
  5152. int
  5153. WINAPI
  5154. ReleaseDC(
  5155.     HWND hWnd,
  5156.     HDC hDC);
  5157.  
  5158. WINUSERAPI
  5159. HDC
  5160. WINAPI
  5161. BeginPaint(
  5162.     HWND hWnd,
  5163.     LPPAINTSTRUCT lpPaint);
  5164.  
  5165. WINUSERAPI
  5166. BOOL
  5167. WINAPI
  5168. EndPaint(
  5169.     HWND hWnd,
  5170.     CONST PAINTSTRUCT *lpPaint);
  5171.  
  5172. WINUSERAPI
  5173. BOOL
  5174. WINAPI
  5175. GetUpdateRect(
  5176.     HWND hWnd,
  5177.     LPRECT lpRect,
  5178.     BOOL bErase);
  5179.  
  5180. WINUSERAPI
  5181. int
  5182. WINAPI
  5183. GetUpdateRgn(
  5184.     HWND hWnd,
  5185.     HRGN hRgn,
  5186.     BOOL bErase);
  5187.  
  5188. WINUSERAPI
  5189. int
  5190. WINAPI
  5191. SetWindowRgn(
  5192.     HWND hWnd,
  5193.     HRGN hRgn,
  5194.     BOOL bRedraw);
  5195.  
  5196. WINUSERAPI
  5197. int
  5198. WINAPI
  5199. GetWindowRgn(
  5200.     HWND hWnd,
  5201.     HRGN hRgn);
  5202.  
  5203. WINUSERAPI
  5204. int
  5205. WINAPI
  5206. ExcludeUpdateRgn(
  5207.     HDC hDC,
  5208.     HWND hWnd);
  5209.  
  5210. WINUSERAPI
  5211. BOOL
  5212. WINAPI
  5213. InvalidateRect(
  5214.     HWND hWnd ,
  5215.     CONST RECT *lpRect,
  5216.     BOOL bErase);
  5217.  
  5218. WINUSERAPI
  5219. BOOL
  5220. WINAPI
  5221. ValidateRect(
  5222.     HWND hWnd ,
  5223.     CONST RECT *lpRect);
  5224.  
  5225. WINUSERAPI
  5226. BOOL
  5227. WINAPI
  5228. InvalidateRgn(
  5229.     HWND hWnd,
  5230.     HRGN hRgn,
  5231.     BOOL bErase);
  5232.  
  5233. WINUSERAPI
  5234. BOOL
  5235. WINAPI
  5236. ValidateRgn(
  5237.     HWND hWnd,
  5238.     HRGN hRgn);
  5239.  
  5240.  
  5241. WINUSERAPI
  5242. BOOL
  5243. WINAPI
  5244. RedrawWindow(
  5245.     HWND hWnd,
  5246.     CONST RECT *lprcUpdate,
  5247.     HRGN hrgnUpdate,
  5248.     UINT flags);
  5249.  
  5250. /*
  5251.  * RedrawWindow() flags
  5252.  */
  5253. #define RDW_INVALIDATE          0x0001
  5254. #define RDW_INTERNALPAINT       0x0002
  5255. #define RDW_ERASE               0x0004
  5256.  
  5257. #define RDW_VALIDATE            0x0008
  5258. #define RDW_NOINTERNALPAINT     0x0010
  5259. #define RDW_NOERASE             0x0020
  5260.  
  5261. #define RDW_NOCHILDREN          0x0040
  5262. #define RDW_ALLCHILDREN         0x0080
  5263.  
  5264. #define RDW_UPDATENOW           0x0100
  5265. #define RDW_ERASENOW            0x0200
  5266.  
  5267. #define RDW_FRAME               0x0400
  5268. #define RDW_NOFRAME             0x0800
  5269.  
  5270.  
  5271.  
  5272. /*
  5273.  * LockWindowUpdate API
  5274.  */
  5275.  
  5276. WINUSERAPI
  5277. BOOL
  5278. WINAPI
  5279. LockWindowUpdate(
  5280.     HWND hWndLock);
  5281.  
  5282. WINUSERAPI
  5283. BOOL
  5284. WINAPI
  5285. ScrollWindow(
  5286.     HWND hWnd,
  5287.     int XAmount,
  5288.     int YAmount,
  5289.     CONST RECT *lpRect,
  5290.     CONST RECT *lpClipRect);
  5291.  
  5292. WINUSERAPI
  5293. BOOL
  5294. WINAPI
  5295. ScrollDC(
  5296.     HDC hDC,
  5297.     int dx,
  5298.     int dy,
  5299.     CONST RECT *lprcScroll,
  5300.     CONST RECT *lprcClip ,
  5301.     HRGN hrgnUpdate,
  5302.     LPRECT lprcUpdate);
  5303.  
  5304. WINUSERAPI
  5305. int
  5306. WINAPI
  5307. ScrollWindowEx(
  5308.     HWND hWnd,
  5309.     int dx,
  5310.     int dy,
  5311.     CONST RECT *prcScroll,
  5312.     CONST RECT *prcClip ,
  5313.     HRGN hrgnUpdate,
  5314.     LPRECT prcUpdate,
  5315.     UINT flags);
  5316.  
  5317. #define SW_SCROLLCHILDREN   0x0001  /* Scroll children within *lprcScroll. */
  5318. #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
  5319. #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  5320.  
  5321.  
  5322.  
  5323. #ifndef NOSCROLL
  5324.  
  5325. WINUSERAPI
  5326. int
  5327. WINAPI
  5328. SetScrollPos(
  5329.     HWND hWnd,
  5330.     int nBar,
  5331.     int nPos,
  5332.     BOOL bRedraw);
  5333.  
  5334. WINUSERAPI
  5335. int
  5336. WINAPI
  5337. GetScrollPos(
  5338.     HWND hWnd,
  5339.     int nBar);
  5340.  
  5341. WINUSERAPI
  5342. BOOL
  5343. WINAPI
  5344. SetScrollRange(
  5345.     HWND hWnd,
  5346.     int nBar,
  5347.     int nMinPos,
  5348.     int nMaxPos,
  5349.     BOOL bRedraw);
  5350.  
  5351. WINUSERAPI
  5352. BOOL
  5353. WINAPI
  5354. GetScrollRange(
  5355.     HWND hWnd,
  5356.     int nBar,
  5357.     LPINT lpMinPos,
  5358.     LPINT lpMaxPos);
  5359.  
  5360. WINUSERAPI
  5361. BOOL
  5362. WINAPI
  5363. ShowScrollBar(
  5364.     HWND hWnd,
  5365.     int wBar,
  5366.     BOOL bShow);
  5367.  
  5368. WINUSERAPI
  5369. BOOL
  5370. WINAPI
  5371. EnableScrollBar(
  5372.     HWND hWnd,
  5373.     UINT wSBflags,
  5374.     UINT wArrows);
  5375.  
  5376.  
  5377. /*
  5378.  * EnableScrollBar() flags
  5379.  */
  5380. #define ESB_ENABLE_BOTH     0x0000
  5381. #define ESB_DISABLE_BOTH    0x0003
  5382.  
  5383. #define ESB_DISABLE_LEFT    0x0001
  5384. #define ESB_DISABLE_RIGHT   0x0002
  5385.  
  5386. #define ESB_DISABLE_UP      0x0001
  5387. #define ESB_DISABLE_DOWN    0x0002
  5388.  
  5389. #define ESB_DISABLE_LTUP    ESB_DISABLE_LEFT
  5390. #define ESB_DISABLE_RTDN    ESB_DISABLE_RIGHT
  5391.  
  5392.  
  5393. #endif  /* !NOSCROLL */
  5394.  
  5395. WINUSERAPI
  5396. BOOL
  5397. WINAPI
  5398. SetPropA(
  5399.     HWND hWnd,
  5400.     LPCSTR lpString,
  5401.     HANDLE hData);
  5402. WINUSERAPI
  5403. BOOL
  5404. WINAPI
  5405. SetPropW(
  5406.     HWND hWnd,
  5407.     LPCWSTR lpString,
  5408.     HANDLE hData);
  5409. #ifdef UNICODE
  5410. #define SetProp  SetPropW
  5411. #else
  5412. #define SetProp  SetPropA
  5413. #endif // !UNICODE
  5414.  
  5415. WINUSERAPI
  5416. HANDLE
  5417. WINAPI
  5418. GetPropA(
  5419.     HWND hWnd,
  5420.     LPCSTR lpString);
  5421. WINUSERAPI
  5422. HANDLE
  5423. WINAPI
  5424. GetPropW(
  5425.     HWND hWnd,
  5426.     LPCWSTR lpString);
  5427. #ifdef UNICODE
  5428. #define GetProp  GetPropW
  5429. #else
  5430. #define GetProp  GetPropA
  5431. #endif // !UNICODE
  5432.  
  5433. WINUSERAPI
  5434. HANDLE
  5435. WINAPI
  5436. RemovePropA(
  5437.     HWND hWnd,
  5438.     LPCSTR lpString);
  5439. WINUSERAPI
  5440. HANDLE
  5441. WINAPI
  5442. RemovePropW(
  5443.     HWND hWnd,
  5444.     LPCWSTR lpString);
  5445. #ifdef UNICODE
  5446. #define RemoveProp  RemovePropW
  5447. #else
  5448. #define RemoveProp  RemovePropA
  5449. #endif // !UNICODE
  5450.  
  5451. WINUSERAPI
  5452. int
  5453. WINAPI
  5454. EnumPropsExA(
  5455.     HWND hWnd,
  5456.     PROPENUMPROCEXA lpEnumFunc,
  5457.     LPARAM lParam);
  5458. WINUSERAPI
  5459. int
  5460. WINAPI
  5461. EnumPropsExW(
  5462.     HWND hWnd,
  5463.     PROPENUMPROCEXW lpEnumFunc,
  5464.     LPARAM lParam);
  5465. #ifdef UNICODE
  5466. #define EnumPropsEx  EnumPropsExW
  5467. #else
  5468. #define EnumPropsEx  EnumPropsExA
  5469. #endif // !UNICODE
  5470.  
  5471. WINUSERAPI
  5472. int
  5473. WINAPI
  5474. EnumPropsA(
  5475.     HWND hWnd,
  5476.     PROPENUMPROCA lpEnumFunc);
  5477. WINUSERAPI
  5478. int
  5479. WINAPI
  5480. EnumPropsW(
  5481.     HWND hWnd,
  5482.     PROPENUMPROCW lpEnumFunc);
  5483. #ifdef UNICODE
  5484. #define EnumProps  EnumPropsW
  5485. #else
  5486. #define EnumProps  EnumPropsA
  5487. #endif // !UNICODE
  5488.  
  5489. WINUSERAPI
  5490. BOOL
  5491. WINAPI
  5492. SetWindowTextA(
  5493.     HWND hWnd,
  5494.     LPCSTR lpString);
  5495. WINUSERAPI
  5496. BOOL
  5497. WINAPI
  5498. SetWindowTextW(
  5499.     HWND hWnd,
  5500.     LPCWSTR lpString);
  5501. #ifdef UNICODE
  5502. #define SetWindowText  SetWindowTextW
  5503. #else
  5504. #define SetWindowText  SetWindowTextA
  5505. #endif // !UNICODE
  5506.  
  5507. WINUSERAPI
  5508. int
  5509. WINAPI
  5510. GetWindowTextA(
  5511.     HWND hWnd,
  5512.     LPSTR lpString,
  5513.     int nMaxCount);
  5514. WINUSERAPI
  5515. int
  5516. WINAPI
  5517. GetWindowTextW(
  5518.     HWND hWnd,
  5519.     LPWSTR lpString,
  5520.     int nMaxCount);
  5521. #ifdef UNICODE
  5522. #define GetWindowText  GetWindowTextW
  5523. #else
  5524. #define GetWindowText  GetWindowTextA
  5525. #endif // !UNICODE
  5526.  
  5527. WINUSERAPI
  5528. int
  5529. WINAPI
  5530. GetWindowTextLengthA(
  5531.     HWND hWnd);
  5532. WINUSERAPI
  5533. int
  5534. WINAPI
  5535. GetWindowTextLengthW(
  5536.     HWND hWnd);
  5537. #ifdef UNICODE
  5538. #define GetWindowTextLength  GetWindowTextLengthW
  5539. #else
  5540. #define GetWindowTextLength  GetWindowTextLengthA
  5541. #endif // !UNICODE
  5542.  
  5543. WINUSERAPI
  5544. BOOL
  5545. WINAPI
  5546. GetClientRect(
  5547.     HWND hWnd,
  5548.     LPRECT lpRect);
  5549.  
  5550. WINUSERAPI
  5551. BOOL
  5552. WINAPI
  5553. GetWindowRect(
  5554.     HWND hWnd,
  5555.     LPRECT lpRect);
  5556.  
  5557. WINUSERAPI
  5558. BOOL
  5559. WINAPI
  5560. AdjustWindowRect(
  5561.     LPRECT lpRect,
  5562.     DWORD dwStyle,
  5563.     BOOL bMenu);
  5564.  
  5565. WINUSERAPI
  5566. BOOL
  5567. WINAPI
  5568. AdjustWindowRectEx(
  5569.     LPRECT lpRect,
  5570.     DWORD dwStyle,
  5571.     BOOL bMenu,
  5572.     DWORD dwExStyle);
  5573.  
  5574. #if(WINVER >= 0x0400)
  5575. #define HELPINFO_WINDOW    0x0001
  5576. #define HELPINFO_MENUITEM  0x0002
  5577. typedef struct tagHELPINFO      /* Structure pointed to by lParam of WM_HELP */
  5578. {
  5579.     UINT    cbSize;             /* Size in bytes of this struct  */
  5580.     int     iContextType;       /* Either HELPINFO_WINDOW or HELPINFO_MENUITEM */
  5581.     int     iCtrlId;            /* Control Id or a Menu item Id. */
  5582.     HANDLE  hItemHandle;        /* hWnd of control or hMenu.     */
  5583.     DWORD   dwContextId;        /* Context Id associated with this item */
  5584.     POINT   MousePos;           /* Mouse Position in screen co-ordinates */
  5585. }  HELPINFO, FAR *LPHELPINFO;
  5586.  
  5587. WINUSERAPI BOOL  WINAPI  SetWindowContextHelpId(HWND, DWORD);
  5588. WINUSERAPI DWORD WINAPI  GetWindowContextHelpId(HWND);
  5589. WINUSERAPI BOOL  WINAPI  SetMenuContextHelpId(HMENU, DWORD);
  5590. WINUSERAPI DWORD WINAPI  GetMenuContextHelpId(HMENU);
  5591.  
  5592. #endif /* WINVER >= 0x0400 */
  5593.  
  5594.  
  5595.  
  5596. #ifndef NOMB
  5597.  
  5598. /*
  5599.  * MessageBox() Flags
  5600.  */
  5601. #define MB_OK                       0x00000000L
  5602. #define MB_OKCANCEL                 0x00000001L
  5603. #define MB_ABORTRETRYIGNORE         0x00000002L
  5604. #define MB_YESNOCANCEL              0x00000003L
  5605. #define MB_YESNO                    0x00000004L
  5606. #define MB_RETRYCANCEL              0x00000005L
  5607.  
  5608.  
  5609. #define MB_ICONHAND                 0x00000010L
  5610. #define MB_ICONQUESTION             0x00000020L
  5611. #define MB_ICONEXCLAMATION          0x00000030L
  5612. #define MB_ICONASTERISK             0x00000040L
  5613.  
  5614. #if(WINVER >= 0x0400)
  5615. #define MB_USERICON                 0x00000080L
  5616. #define MB_ICONWARNING              MB_ICONEXCLAMATION
  5617. #define MB_ICONERROR                MB_ICONHAND
  5618. #endif /* WINVER >= 0x0400 */
  5619.  
  5620. #define MB_ICONINFORMATION          MB_ICONASTERISK
  5621. #define MB_ICONSTOP                 MB_ICONHAND
  5622.  
  5623. #define MB_DEFBUTTON1               0x00000000L
  5624. #define MB_DEFBUTTON2               0x00000100L
  5625. #define MB_DEFBUTTON3               0x00000200L
  5626. #if(WINVER >= 0x0400)
  5627. #define MB_DEFBUTTON4               0x00000300L
  5628. #endif /* WINVER >= 0x0400 */
  5629.  
  5630. #define MB_APPLMODAL                0x00000000L
  5631. #define MB_SYSTEMMODAL              0x00001000L
  5632. #define MB_TASKMODAL                0x00002000L
  5633. #if(WINVER >= 0x0400)
  5634. #define MB_HELP                     0x00004000L // Help Button
  5635. #endif /* WINVER >= 0x0400 */
  5636.  
  5637. #define MB_NOFOCUS                  0x00008000L
  5638. #define MB_SETFOREGROUND            0x00010000L
  5639. #define MB_DEFAULT_DESKTOP_ONLY     0x00020000L
  5640.  
  5641. #if(WINVER >= 0x0400)
  5642. #define MB_TOPMOST                  0x00040000L
  5643. #define MB_RIGHT                    0x00080000L
  5644. #define MB_RTLREADING               0x00100000L
  5645.  
  5646.  
  5647. #endif /* WINVER >= 0x0400 */
  5648.  
  5649.  
  5650. #ifdef _WIN32_WINNT
  5651. #if (_WIN32_WINNT >= 0x0400)
  5652. #define MB_SERVICE_NOTIFICATION          0x00200000L
  5653. #else
  5654. #define MB_SERVICE_NOTIFICATION          0x00040000L
  5655. #endif
  5656. #define MB_SERVICE_NOTIFICATION_NT3X     0x00040000L
  5657. #endif
  5658.  
  5659. #define MB_TYPEMASK                 0x0000000FL
  5660. #define MB_ICONMASK                 0x000000F0L
  5661. #define MB_DEFMASK                  0x00000F00L
  5662. #define MB_MODEMASK                 0x00003000L
  5663. #define MB_MISCMASK                 0x0000C000L
  5664.  
  5665. WINUSERAPI
  5666. int
  5667. WINAPI
  5668. MessageBoxA(
  5669.     HWND hWnd ,
  5670.     LPCSTR lpText,
  5671.     LPCSTR lpCaption,
  5672.     UINT uType);
  5673. WINUSERAPI
  5674. int
  5675. WINAPI
  5676. MessageBoxW(
  5677.     HWND hWnd ,
  5678.     LPCWSTR lpText,
  5679.     LPCWSTR lpCaption,
  5680.     UINT uType);
  5681. #ifdef UNICODE
  5682. #define MessageBox  MessageBoxW
  5683. #else
  5684. #define MessageBox  MessageBoxA
  5685. #endif // !UNICODE
  5686.  
  5687. WINUSERAPI
  5688. int
  5689. WINAPI
  5690. MessageBoxExA(
  5691.     HWND hWnd ,
  5692.     LPCSTR lpText,
  5693.     LPCSTR lpCaption,
  5694.     UINT uType,
  5695.     WORD wLanguageId);
  5696. WINUSERAPI
  5697. int
  5698. WINAPI
  5699. MessageBoxExW(
  5700.     HWND hWnd ,
  5701.     LPCWSTR lpText,
  5702.     LPCWSTR lpCaption,
  5703.     UINT uType,
  5704.     WORD wLanguageId);
  5705. #ifdef UNICODE
  5706. #define MessageBoxEx  MessageBoxExW
  5707. #else
  5708. #define MessageBoxEx  MessageBoxExA
  5709. #endif // !UNICODE
  5710.  
  5711. #if(WINVER >= 0x0400)
  5712.  
  5713. typedef void (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo);
  5714.  
  5715. typedef struct tagMSGBOXPARAMSA
  5716. {
  5717.     UINT        cbSize;
  5718.     HWND        hwndOwner;
  5719.     HINSTANCE   hInstance;
  5720.     LPCSTR      lpszText;
  5721.     LPCSTR      lpszCaption;
  5722.     DWORD       dwStyle;
  5723.     LPCSTR      lpszIcon;
  5724.     DWORD       dwContextHelpId;
  5725.     MSGBOXCALLBACK      lpfnMsgBoxCallback;
  5726.     DWORD   dwLanguageId;
  5727. } MSGBOXPARAMSA, *PMSGBOXPARAMSA, *LPMSGBOXPARAMSA;
  5728. typedef struct tagMSGBOXPARAMSW
  5729. {
  5730.     UINT        cbSize;
  5731.     HWND        hwndOwner;
  5732.     HINSTANCE   hInstance;
  5733.     LPCWSTR     lpszText;
  5734.     LPCWSTR     lpszCaption;
  5735.     DWORD       dwStyle;
  5736.     LPCWSTR     lpszIcon;
  5737.     DWORD       dwContextHelpId;
  5738.     MSGBOXCALLBACK      lpfnMsgBoxCallback;
  5739.     DWORD   dwLanguageId;
  5740. } MSGBOXPARAMSW, *PMSGBOXPARAMSW, *LPMSGBOXPARAMSW;
  5741. #ifdef UNICODE
  5742. typedef MSGBOXPARAMSW MSGBOXPARAMS;
  5743. typedef PMSGBOXPARAMSW PMSGBOXPARAMS;
  5744. typedef LPMSGBOXPARAMSW LPMSGBOXPARAMS;
  5745. #else
  5746. typedef MSGBOXPARAMSA MSGBOXPARAMS;
  5747. typedef PMSGBOXPARAMSA PMSGBOXPARAMS;
  5748. typedef LPMSGBOXPARAMSA LPMSGBOXPARAMS;
  5749. #endif // UNICODE
  5750.  
  5751.  
  5752. WINUSERAPI int     WINAPI MessageBoxIndirectA(LPMSGBOXPARAMSA);
  5753. WINUSERAPI int     WINAPI MessageBoxIndirectW(LPMSGBOXPARAMSW);
  5754. #ifdef UNICODE
  5755. #define MessageBoxIndirect  MessageBoxIndirectW
  5756. #else
  5757. #define MessageBoxIndirect  MessageBoxIndirectA
  5758. #endif // !UNICODE
  5759. #endif /* WINVER >= 0x0400 */
  5760.  
  5761.  
  5762.  
  5763. WINUSERAPI
  5764. BOOL
  5765. WINAPI
  5766. MessageBeep(
  5767.     UINT uType);
  5768.  
  5769. #endif /* !NOMB */
  5770.  
  5771. WINUSERAPI
  5772. int
  5773. WINAPI
  5774. ShowCursor(
  5775.     BOOL bShow);
  5776.  
  5777. WINUSERAPI
  5778. BOOL
  5779. WINAPI
  5780. SetCursorPos(
  5781.     int X,
  5782.     int Y);
  5783.  
  5784. WINUSERAPI
  5785. HCURSOR
  5786. WINAPI
  5787. SetCursor(
  5788.     HCURSOR hCursor);
  5789.  
  5790. WINUSERAPI
  5791. BOOL
  5792. WINAPI
  5793. GetCursorPos(
  5794.     LPPOINT lpPoint);
  5795.  
  5796. WINUSERAPI
  5797. BOOL
  5798. WINAPI
  5799. ClipCursor(
  5800.     CONST RECT *lpRect);
  5801.  
  5802. WINUSERAPI
  5803. BOOL
  5804. WINAPI
  5805. GetClipCursor(
  5806.     LPRECT lpRect);
  5807.  
  5808. WINUSERAPI
  5809. HCURSOR
  5810. WINAPI
  5811. GetCursor(
  5812.     VOID);
  5813.  
  5814. WINUSERAPI
  5815. BOOL
  5816. WINAPI
  5817. CreateCaret(
  5818.     HWND hWnd,
  5819.     HBITMAP hBitmap ,
  5820.     int nWidth,
  5821.     int nHeight);
  5822.  
  5823. WINUSERAPI
  5824. UINT
  5825. WINAPI
  5826. GetCaretBlinkTime(
  5827.     VOID);
  5828.  
  5829. WINUSERAPI
  5830. BOOL
  5831. WINAPI
  5832. SetCaretBlinkTime(
  5833.     UINT uMSeconds);
  5834.  
  5835. WINUSERAPI
  5836. BOOL
  5837. WINAPI
  5838. DestroyCaret(
  5839.     VOID);
  5840.  
  5841. WINUSERAPI
  5842. BOOL
  5843. WINAPI
  5844. HideCaret(
  5845.     HWND hWnd);
  5846.  
  5847. WINUSERAPI
  5848. BOOL
  5849. WINAPI
  5850. ShowCaret(
  5851.     HWND hWnd);
  5852.  
  5853. WINUSERAPI
  5854. BOOL
  5855. WINAPI
  5856. SetCaretPos(
  5857.     int X,
  5858.     int Y);
  5859.  
  5860. WINUSERAPI
  5861. BOOL
  5862. WINAPI
  5863. GetCaretPos(
  5864.     LPPOINT lpPoint);
  5865.  
  5866. WINUSERAPI
  5867. BOOL
  5868. WINAPI
  5869. ClientToScreen(
  5870.     HWND hWnd,
  5871.     LPPOINT lpPoint);
  5872.  
  5873. WINUSERAPI
  5874. BOOL
  5875. WINAPI
  5876. ScreenToClient(
  5877.     HWND hWnd,
  5878.     LPPOINT lpPoint);
  5879.  
  5880. WINUSERAPI
  5881. int
  5882. WINAPI
  5883. MapWindowPoints(
  5884.     HWND hWndFrom,
  5885.     HWND hWndTo,
  5886.     LPPOINT lpPoints,
  5887.     UINT cPoints);
  5888.  
  5889. WINUSERAPI
  5890. HWND
  5891. WINAPI
  5892. WindowFromPoint(
  5893.     POINT Point);
  5894.  
  5895. WINUSERAPI
  5896. HWND
  5897. WINAPI
  5898. ChildWindowFromPoint(
  5899.     HWND hWndParent,
  5900.     POINT Point);
  5901.  
  5902. #if(WINVER >= 0x0400)
  5903. #define CWP_ALL             0x0000
  5904. #define CWP_SKIPINVISIBLE   0x0001
  5905. #define CWP_SKIPDISABLED    0x0002
  5906. #define CWP_SKIPTRANSPARENT 0x0004
  5907.  
  5908. WINUSERAPI HWND    WINAPI ChildWindowFromPointEx(HWND, POINT, UINT);
  5909. #endif /* WINVER >= 0x0400 */
  5910.  
  5911. #ifndef NOCOLOR
  5912.  
  5913. /*
  5914.  * Color Types
  5915.  */
  5916. #define CTLCOLOR_MSGBOX         0
  5917. #define CTLCOLOR_EDIT           1
  5918. #define CTLCOLOR_LISTBOX        2
  5919. #define CTLCOLOR_BTN            3
  5920. #define CTLCOLOR_DLG            4
  5921. #define CTLCOLOR_SCROLLBAR      5
  5922. #define CTLCOLOR_STATIC         6
  5923. #define CTLCOLOR_MAX            7
  5924.  
  5925. #define COLOR_SCROLLBAR         0
  5926. #define COLOR_BACKGROUND        1
  5927. #define COLOR_ACTIVECAPTION     2
  5928. #define COLOR_INACTIVECAPTION   3
  5929. #define COLOR_MENU              4
  5930. #define COLOR_WINDOW            5
  5931. #define COLOR_WINDOWFRAME       6
  5932. #define COLOR_MENUTEXT          7
  5933. #define COLOR_WINDOWTEXT        8
  5934. #define COLOR_CAPTIONTEXT       9
  5935. #define COLOR_ACTIVEBORDER      10
  5936. #define COLOR_INACTIVEBORDER    11
  5937. #define COLOR_APPWORKSPACE      12
  5938. #define COLOR_HIGHLIGHT         13
  5939. #define COLOR_HIGHLIGHTTEXT     14
  5940. #define COLOR_BTNFACE           15
  5941. #define COLOR_BTNSHADOW         16
  5942. #define COLOR_GRAYTEXT          17
  5943. #define COLOR_BTNTEXT           18
  5944. #define COLOR_INACTIVECAPTIONTEXT 19
  5945. #define COLOR_BTNHIGHLIGHT      20
  5946.  
  5947. #if(WINVER >= 0x0400)
  5948. #define COLOR_3DDKSHADOW        21
  5949. #define COLOR_3DLIGHT           22
  5950. #define COLOR_INFOTEXT          23
  5951. #define COLOR_INFOBK            24
  5952.  
  5953. #define COLOR_DESKTOP           COLOR_BACKGROUND
  5954. #define COLOR_3DFACE            COLOR_BTNFACE
  5955. #define COLOR_3DSHADOW          COLOR_BTNSHADOW
  5956. #define COLOR_3DHIGHLIGHT       COLOR_BTNHIGHLIGHT
  5957. #define COLOR_3DHILIGHT         COLOR_BTNHIGHLIGHT
  5958. #define COLOR_BTNHILIGHT        COLOR_BTNHIGHLIGHT
  5959. #endif /* WINVER >= 0x0400 */
  5960.  
  5961.  
  5962. WINUSERAPI
  5963. DWORD
  5964. WINAPI
  5965. GetSysColor(
  5966.     int nIndex);
  5967.  
  5968. #if(WINVER >= 0x0400)
  5969. WINUSERAPI
  5970. HBRUSH
  5971. WINAPI
  5972. GetSysColorBrush(
  5973.     int nIndex);
  5974.  
  5975.  
  5976. #endif /* WINVER >= 0x0400 */
  5977.  
  5978. WINUSERAPI
  5979. BOOL
  5980. WINAPI
  5981. SetSysColors(
  5982.     int cElements,
  5983.     CONST INT * lpaElements,
  5984.     CONST COLORREF * lpaRgbValues);
  5985.  
  5986. #endif /* !NOCOLOR */
  5987.  
  5988. WINUSERAPI
  5989. BOOL
  5990. WINAPI
  5991. DrawFocusRect(
  5992.     HDC hDC,
  5993.     CONST RECT * lprc);
  5994.  
  5995. WINUSERAPI
  5996. int
  5997. WINAPI
  5998. FillRect(
  5999.     HDC hDC,
  6000.     CONST RECT *lprc,
  6001.     HBRUSH hbr);
  6002.  
  6003. WINUSERAPI
  6004. int
  6005. WINAPI
  6006. FrameRect(
  6007.     HDC hDC,
  6008.     CONST RECT *lprc,
  6009.     HBRUSH hbr);
  6010.  
  6011. WINUSERAPI
  6012. BOOL
  6013. WINAPI
  6014. InvertRect(
  6015.     HDC hDC,
  6016.     CONST RECT *lprc);
  6017.  
  6018. WINUSERAPI
  6019. BOOL
  6020. WINAPI
  6021. SetRect(
  6022.     LPRECT lprc,
  6023.     int xLeft,
  6024.     int yTop,
  6025.     int xRight,
  6026.     int yBottom);
  6027.  
  6028. WINUSERAPI
  6029. BOOL
  6030. WINAPI
  6031.     SetRectEmpty(
  6032.     LPRECT lprc);
  6033.  
  6034. WINUSERAPI
  6035. BOOL
  6036. WINAPI
  6037. CopyRect(
  6038.     LPRECT lprcDst,
  6039.     CONST RECT *lprcSrc);
  6040.  
  6041. WINUSERAPI
  6042. BOOL
  6043. WINAPI
  6044. InflateRect(
  6045.     LPRECT lprc,
  6046.     int dx,
  6047.     int dy);
  6048.  
  6049. WINUSERAPI
  6050. BOOL
  6051. WINAPI
  6052. IntersectRect(
  6053.     LPRECT lprcDst,
  6054.     CONST RECT *lprcSrc1,
  6055.     CONST RECT *lprcSrc2);
  6056.  
  6057. WINUSERAPI
  6058. BOOL
  6059. WINAPI
  6060. UnionRect(
  6061.     LPRECT lprcDst,
  6062.     CONST RECT *lprcSrc1,
  6063.     CONST RECT *lprcSrc2);
  6064.  
  6065. WINUSERAPI
  6066. BOOL
  6067. WINAPI
  6068. SubtractRect(
  6069.     LPRECT lprcDst,
  6070.     CONST RECT *lprcSrc1,
  6071.     CONST RECT *lprcSrc2);
  6072.  
  6073. WINUSERAPI
  6074. BOOL
  6075. WINAPI
  6076. OffsetRect(
  6077.     LPRECT lprc,
  6078.     int dx,
  6079.     int dy);
  6080.  
  6081. WINUSERAPI
  6082. BOOL
  6083. WINAPI
  6084. IsRectEmpty(
  6085.     CONST RECT *lprc);
  6086.  
  6087. WINUSERAPI
  6088. BOOL
  6089. WINAPI
  6090. EqualRect(
  6091.     CONST RECT *lprc1,
  6092.     CONST RECT *lprc2);
  6093.  
  6094. WINUSERAPI
  6095. BOOL
  6096. WINAPI
  6097. PtInRect(
  6098.     CONST RECT *lprc,
  6099.     POINT pt);
  6100.  
  6101. #ifndef NOWINOFFSETS
  6102.  
  6103. WINUSERAPI
  6104. WORD
  6105. WINAPI
  6106. GetWindowWord(
  6107.     HWND hWnd,
  6108.     int nIndex);
  6109.  
  6110. WINUSERAPI
  6111. WORD
  6112. WINAPI
  6113. SetWindowWord(
  6114.     HWND hWnd,
  6115.     int nIndex,
  6116.     WORD wNewWord);
  6117.  
  6118. WINUSERAPI
  6119. LONG
  6120. WINAPI
  6121. GetWindowLongA(
  6122.     HWND hWnd,
  6123.     int nIndex);
  6124. WINUSERAPI
  6125. LONG
  6126. WINAPI
  6127. GetWindowLongW(
  6128.     HWND hWnd,
  6129.     int nIndex);
  6130. #ifdef UNICODE
  6131. #define GetWindowLong  GetWindowLongW
  6132. #else
  6133. #define GetWindowLong  GetWindowLongA
  6134. #endif // !UNICODE
  6135.  
  6136. WINUSERAPI
  6137. LONG
  6138. WINAPI
  6139. SetWindowLongA(
  6140.     HWND hWnd,
  6141.     int nIndex,
  6142.     LONG dwNewLong);
  6143. WINUSERAPI
  6144. LONG
  6145. WINAPI
  6146. SetWindowLongW(
  6147.     HWND hWnd,
  6148.     int nIndex,
  6149.     LONG dwNewLong);
  6150. #ifdef UNICODE
  6151. #define SetWindowLong  SetWindowLongW
  6152. #else
  6153. #define SetWindowLong  SetWindowLongA
  6154. #endif // !UNICODE
  6155.  
  6156. WINUSERAPI
  6157. WORD
  6158. WINAPI
  6159. GetClassWord(
  6160.     HWND hWnd,
  6161.     int nIndex);
  6162.  
  6163. WINUSERAPI
  6164. WORD
  6165. WINAPI
  6166. SetClassWord(
  6167.     HWND hWnd,
  6168.     int nIndex,
  6169.     WORD wNewWord);
  6170.  
  6171. WINUSERAPI
  6172. DWORD
  6173. WINAPI
  6174. GetClassLongA(
  6175.     HWND hWnd,
  6176.     int nIndex);
  6177. WINUSERAPI
  6178. DWORD
  6179. WINAPI
  6180. GetClassLongW(
  6181.     HWND hWnd,
  6182.     int nIndex);
  6183. #ifdef UNICODE
  6184. #define GetClassLong  GetClassLongW
  6185. #else
  6186. #define GetClassLong  GetClassLongA
  6187. #endif // !UNICODE
  6188.  
  6189. WINUSERAPI
  6190. DWORD
  6191. WINAPI
  6192. SetClassLongA(
  6193.     HWND hWnd,
  6194.     int nIndex,
  6195.     LONG dwNewLong);
  6196. WINUSERAPI
  6197. DWORD
  6198. WINAPI
  6199. SetClassLongW(
  6200.     HWND hWnd,
  6201.     int nIndex,
  6202.     LONG dwNewLong);
  6203. #ifdef UNICODE
  6204. #define SetClassLong  SetClassLongW
  6205. #else
  6206. #define SetClassLong  SetClassLongA
  6207. #endif // !UNICODE
  6208.  
  6209. #endif /* !NOWINOFFSETS */
  6210.  
  6211. WINUSERAPI
  6212. HWND
  6213. WINAPI
  6214. GetDesktopWindow(
  6215.     VOID);
  6216.  
  6217.  
  6218. WINUSERAPI
  6219. HWND
  6220. WINAPI
  6221. GetParent(
  6222.     HWND hWnd);
  6223.  
  6224. WINUSERAPI
  6225. HWND
  6226. WINAPI
  6227. SetParent(
  6228.     HWND hWndChild,
  6229.     HWND hWndNewParent);
  6230.  
  6231. WINUSERAPI
  6232. BOOL
  6233. WINAPI
  6234. EnumChildWindows(
  6235.     HWND hWndParent,
  6236.     WNDENUMPROC lpEnumFunc,
  6237.     LPARAM lParam);
  6238.  
  6239. WINUSERAPI
  6240. HWND
  6241. WINAPI
  6242. FindWindowA(
  6243.     LPCSTR lpClassName ,
  6244.     LPCSTR lpWindowName);
  6245. WINUSERAPI
  6246. HWND
  6247. WINAPI
  6248. FindWindowW(
  6249.     LPCWSTR lpClassName ,
  6250.     LPCWSTR lpWindowName);
  6251. #ifdef UNICODE
  6252. #define FindWindow  FindWindowW
  6253. #else
  6254. #define FindWindow  FindWindowA
  6255. #endif // !UNICODE
  6256.  
  6257. #if(WINVER >= 0x0400)
  6258. WINUSERAPI HWND    WINAPI FindWindowExA(HWND, HWND, LPCSTR, LPCSTR);
  6259. WINUSERAPI HWND    WINAPI FindWindowExW(HWND, HWND, LPCWSTR, LPCWSTR);
  6260. #ifdef UNICODE
  6261. #define FindWindowEx  FindWindowExW
  6262. #else
  6263. #define FindWindowEx  FindWindowExA
  6264. #endif // !UNICODE
  6265.  
  6266. #endif /* WINVER >= 0x0400 */
  6267.  
  6268.  
  6269. WINUSERAPI
  6270. BOOL
  6271. WINAPI
  6272. EnumWindows(
  6273.     WNDENUMPROC lpEnumFunc,
  6274.     LPARAM lParam);
  6275.  
  6276. WINUSERAPI
  6277. BOOL
  6278. WINAPI
  6279. EnumThreadWindows(
  6280.     DWORD dwThreadId,
  6281.     WNDENUMPROC lpfn,
  6282.     LPARAM lParam);
  6283.  
  6284. #define EnumTaskWindows(hTask, lpfn, lParam) EnumThreadWindows((DWORD)hTask, lpfn, lParam)
  6285.  
  6286. WINUSERAPI
  6287. int
  6288. WINAPI
  6289. GetClassNameA(
  6290.     HWND hWnd,
  6291.     LPSTR lpClassName,
  6292.     int nMaxCount);
  6293. WINUSERAPI
  6294. int
  6295. WINAPI
  6296. GetClassNameW(
  6297.     HWND hWnd,
  6298.     LPWSTR lpClassName,
  6299.     int nMaxCount);
  6300. #ifdef UNICODE
  6301. #define GetClassName  GetClassNameW
  6302. #else
  6303. #define GetClassName  GetClassNameA
  6304. #endif // !UNICODE
  6305.  
  6306. WINUSERAPI
  6307. HWND
  6308. WINAPI
  6309. GetTopWindow(
  6310.     HWND hWnd);
  6311.  
  6312. #define GetNextWindow(hWnd, wCmd) GetWindow(hWnd, wCmd)
  6313. #define GetSysModalWindow() (NULL)
  6314. #define SetSysModalWindow(hWnd) (NULL)
  6315.  
  6316. WINUSERAPI
  6317. DWORD
  6318. WINAPI
  6319. GetWindowThreadProcessId(
  6320.     HWND hWnd,
  6321.     LPDWORD lpdwProcessId);
  6322.  
  6323. #define GetWindowTask(hWnd) \
  6324.         ((HANDLE)GetWindowThreadProcessId(hWnd, NULL))
  6325.  
  6326. WINUSERAPI
  6327. HWND
  6328. WINAPI
  6329. GetLastActivePopup(
  6330.     HWND hWnd);
  6331.  
  6332. /*
  6333.  * GetWindow() Constants
  6334.  */
  6335. #define GW_HWNDFIRST        0
  6336. #define GW_HWNDLAST         1
  6337. #define GW_HWNDNEXT         2
  6338. #define GW_HWNDPREV         3
  6339. #define GW_OWNER            4
  6340. #define GW_CHILD            5
  6341. #define GW_MAX              5
  6342.  
  6343. WINUSERAPI
  6344. HWND
  6345. WINAPI
  6346. GetWindow(
  6347.     HWND hWnd,
  6348.     UINT uCmd);
  6349.  
  6350.  
  6351.  
  6352. #ifndef NOWH
  6353.  
  6354. #ifdef STRICT
  6355.  
  6356. WINUSERAPI
  6357. HHOOK
  6358. WINAPI
  6359. SetWindowsHookA(
  6360.     int nFilterType,
  6361.     HOOKPROC pfnFilterProc);
  6362. WINUSERAPI
  6363. HHOOK
  6364. WINAPI
  6365. SetWindowsHookW(
  6366.     int nFilterType,
  6367.     HOOKPROC pfnFilterProc);
  6368. #ifdef UNICODE
  6369. #define SetWindowsHook  SetWindowsHookW
  6370. #else
  6371. #define SetWindowsHook  SetWindowsHookA
  6372. #endif // !UNICODE
  6373.  
  6374. #else /* !STRICT */
  6375.  
  6376. WINUSERAPI
  6377. HOOKPROC
  6378. WINAPI
  6379. SetWindowsHookA(
  6380.     int nFilterType,
  6381.     HOOKPROC pfnFilterProc);
  6382. WINUSERAPI
  6383. HOOKPROC
  6384. WINAPI
  6385. SetWindowsHookW(
  6386.     int nFilterType,
  6387.     HOOKPROC pfnFilterProc);
  6388. #ifdef UNICODE
  6389. #define SetWindowsHook  SetWindowsHookW
  6390. #else
  6391. #define SetWindowsHook  SetWindowsHookA
  6392. #endif // !UNICODE
  6393.  
  6394. #endif /* !STRICT */
  6395.  
  6396. WINUSERAPI
  6397. BOOL
  6398. WINAPI
  6399. UnhookWindowsHook(
  6400.     int nCode,
  6401.     HOOKPROC pfnFilterProc);
  6402.  
  6403. WINUSERAPI
  6404. HHOOK
  6405. WINAPI
  6406. SetWindowsHookExA(
  6407.     int idHook,
  6408.     HOOKPROC lpfn,
  6409.     HINSTANCE hmod,
  6410.     DWORD dwThreadId);
  6411. WINUSERAPI
  6412. HHOOK
  6413. WINAPI
  6414. SetWindowsHookExW(
  6415.     int idHook,
  6416.     HOOKPROC lpfn,
  6417.     HINSTANCE hmod,
  6418.     DWORD dwThreadId);
  6419. #ifdef UNICODE
  6420. #define SetWindowsHookEx  SetWindowsHookExW
  6421. #else
  6422. #define SetWindowsHookEx  SetWindowsHookExA
  6423. #endif // !UNICODE
  6424.  
  6425. WINUSERAPI
  6426. BOOL
  6427. WINAPI
  6428. UnhookWindowsHookEx(
  6429.     HHOOK hhk);
  6430.  
  6431. WINUSERAPI
  6432. LRESULT
  6433. WINAPI
  6434. CallNextHookEx(
  6435.     HHOOK hhk,
  6436.     int nCode,
  6437.     WPARAM wParam,
  6438.     LPARAM lParam);
  6439.  
  6440. /*
  6441.  * Macros for source-level compatibility with old functions.
  6442.  */
  6443. #ifdef STRICT
  6444. #define DefHookProc(nCode, wParam, lParam, phhk)\
  6445.         CallNextHookEx(*phhk, nCode, wParam, lParam)
  6446. #else
  6447. #define DefHookProc(nCode, wParam, lParam, phhk)\
  6448.         CallNextHookEx((HHOOK)*phhk, nCode, wParam, lParam)
  6449. #endif /* STRICT */
  6450.  
  6451. #endif /* !NOWH */
  6452.  
  6453. #ifndef NOMENUS
  6454.  
  6455. // begin_r_winuser
  6456.  
  6457. /* ;win40  -- A lot of MF_* flags have been renamed as MFT_* and MFS_* flags */
  6458. /*
  6459.  * Menu flags for Add/Check/EnableMenuItem()
  6460.  */
  6461. #define MF_INSERT           0x00000000L
  6462. #define MF_CHANGE           0x00000080L
  6463. #define MF_APPEND           0x00000100L
  6464. #define MF_DELETE           0x00000200L
  6465. #define MF_REMOVE           0x00001000L
  6466.  
  6467. #define MF_BYCOMMAND        0x00000000L
  6468. #define MF_BYPOSITION       0x00000400L
  6469.  
  6470. #define MF_SEPARATOR        0x00000800L
  6471.  
  6472. #define MF_ENABLED          0x00000000L
  6473. #define MF_GRAYED           0x00000001L
  6474. #define MF_DISABLED         0x00000002L
  6475.  
  6476. #define MF_UNCHECKED        0x00000000L
  6477. #define MF_CHECKED          0x00000008L
  6478. #define MF_USECHECKBITMAPS  0x00000200L
  6479.  
  6480. #define MF_STRING           0x00000000L
  6481. #define MF_BITMAP           0x00000004L
  6482. #define MF_OWNERDRAW        0x00000100L
  6483.  
  6484. #define MF_POPUP            0x00000010L
  6485. #define MF_MENUBARBREAK     0x00000020L
  6486. #define MF_MENUBREAK        0x00000040L
  6487.  
  6488. #define MF_UNHILITE         0x00000000L
  6489. #define MF_HILITE           0x00000080L
  6490.  
  6491. #if(WINVER >= 0x0400)
  6492. #define MF_DEFAULT          0x00001000L
  6493. #endif /* WINVER >= 0x0400 */
  6494. #define MF_SYSMENU          0x00002000L
  6495. #define MF_HELP             0x00004000L
  6496. #if(WINVER >= 0x0400)
  6497. #define MF_RIGHTJUSTIFY     0x00004000L
  6498. #endif /* WINVER >= 0x0400 */
  6499.  
  6500. #define MF_MOUSESELECT      0x00008000L
  6501. #if(WINVER >= 0x0400)
  6502. #define MF_END              0x00000080L  /* Obsolete -- only used by old RES files */
  6503. #endif /* WINVER >= 0x0400 */
  6504.  
  6505.  
  6506. #if(WINVER >= 0x0400)
  6507. #define MFT_STRING          MF_STRING
  6508. #define MFT_BITMAP          MF_BITMAP
  6509. #define MFT_MENUBARBREAK    MF_MENUBARBREAK
  6510. #define MFT_MENUBREAK       MF_MENUBREAK
  6511. #define MFT_OWNERDRAW       MF_OWNERDRAW
  6512. #define MFT_RADIOCHECK      0x00000200L
  6513. #define MFT_SEPARATOR       MF_SEPARATOR
  6514. #define MFT_RIGHTORDER      0x00002000L
  6515. #define MFT_RIGHTJUSTIFY    MF_RIGHTJUSTIFY
  6516.  
  6517. /* Menu flags for Add/Check/EnableMenuItem() */
  6518. #define MFS_GRAYED          0x00000003L
  6519. #define MFS_DISABLED        MFS_GRAYED
  6520. #define MFS_CHECKED         MF_CHECKED
  6521. #define MFS_HILITE          MF_HILITE
  6522. #define MFS_ENABLED         MF_ENABLED
  6523. #define MFS_UNCHECKED       MF_UNCHECKED
  6524. #define MFS_UNHILITE        MF_UNHILITE
  6525. #define MFS_DEFAULT         MF_DEFAULT
  6526.  
  6527.  
  6528.  
  6529. #endif /* WINVER >= 0x0400 */
  6530.  
  6531. // end_r_winuser
  6532.  
  6533. #if(WINVER >= 0x0400)
  6534.  
  6535. WINUSERAPI
  6536. BOOL
  6537. WINAPI
  6538. CheckMenuRadioItem(HMENU, UINT, UINT, UINT, UINT);
  6539. #endif /* WINVER >= 0x0400 */
  6540.  
  6541.  
  6542.  
  6543. /*
  6544.  * Menu item resource format
  6545.  */
  6546. typedef struct {
  6547.     WORD versionNumber;
  6548.     WORD offset;
  6549. } MENUITEMTEMPLATEHEADER, *PMENUITEMTEMPLATEHEADER;
  6550.  
  6551. typedef struct {        // version 0
  6552.     WORD mtOption;
  6553.     WORD mtID;
  6554.     WCHAR mtString[1];
  6555. } MENUITEMTEMPLATE, *PMENUITEMTEMPLATE;
  6556. #define MF_END             0x00000080L          // r_winuser
  6557.  
  6558. #endif /* !NOMENUS */
  6559.  
  6560. #ifndef NOSYSCOMMANDS
  6561.  
  6562. // begin_r_winuser
  6563. /*
  6564.  * System Menu Command Values
  6565.  */
  6566. #define SC_SIZE         0xF000
  6567. #define SC_MOVE         0xF010
  6568. #define SC_MINIMIZE     0xF020
  6569. #define SC_MAXIMIZE     0xF030
  6570. #define SC_NEXTWINDOW   0xF040
  6571. #define SC_PREVWINDOW   0xF050
  6572. #define SC_CLOSE        0xF060
  6573. #define SC_VSCROLL      0xF070
  6574. #define SC_HSCROLL      0xF080
  6575. #define SC_MOUSEMENU    0xF090
  6576. #define SC_KEYMENU      0xF100
  6577. #define SC_ARRANGE      0xF110
  6578. #define SC_RESTORE      0xF120
  6579. #define SC_TASKLIST     0xF130
  6580. #define SC_SCREENSAVE   0xF140
  6581. #define SC_HOTKEY       0xF150
  6582. #if(WINVER >= 0x0400)
  6583. #define SC_DEFAULT      0xF160
  6584. #define SC_MONITORPOWER 0xF170
  6585. #define SC_CONTEXTHELP  0xF180
  6586. #define SC_SEPARATOR    0xF00F
  6587. #endif /* WINVER >= 0x0400 */
  6588. /*
  6589.  * Obsolete names
  6590.  */
  6591. #define SC_ICON         SC_MINIMIZE
  6592. #define SC_ZOOM         SC_MAXIMIZE
  6593.  
  6594. // end_r_winuser
  6595. #endif /* !NOSYSCOMMANDS */
  6596.  
  6597. /*
  6598.  * Resource Loading Routines
  6599.  */
  6600.  
  6601. WINUSERAPI
  6602. HBITMAP
  6603. WINAPI
  6604. LoadBitmapA(
  6605.     HINSTANCE hInstance,
  6606.     LPCSTR lpBitmapName);
  6607. WINUSERAPI
  6608. HBITMAP
  6609. WINAPI
  6610. LoadBitmapW(
  6611.     HINSTANCE hInstance,
  6612.     LPCWSTR lpBitmapName);
  6613. #ifdef UNICODE
  6614. #define LoadBitmap  LoadBitmapW
  6615. #else
  6616. #define LoadBitmap  LoadBitmapA
  6617. #endif // !UNICODE
  6618.  
  6619. WINUSERAPI
  6620. HCURSOR
  6621. WINAPI
  6622. LoadCursorA(
  6623.     HINSTANCE hInstance,
  6624.     LPCSTR lpCursorName);
  6625. WINUSERAPI
  6626. HCURSOR
  6627. WINAPI
  6628. LoadCursorW(
  6629.     HINSTANCE hInstance,
  6630.     LPCWSTR lpCursorName);
  6631. #ifdef UNICODE
  6632. #define LoadCursor  LoadCursorW
  6633. #else
  6634. #define LoadCursor  LoadCursorA
  6635. #endif // !UNICODE
  6636.  
  6637. WINUSERAPI
  6638. HCURSOR
  6639. WINAPI
  6640. LoadCursorFromFileA(
  6641.     LPCSTR    lpFileName);
  6642. WINUSERAPI
  6643. HCURSOR
  6644. WINAPI
  6645. LoadCursorFromFileW(
  6646.     LPCWSTR    lpFileName);
  6647. #ifdef UNICODE
  6648. #define LoadCursorFromFile  LoadCursorFromFileW
  6649. #else
  6650. #define LoadCursorFromFile  LoadCursorFromFileA
  6651. #endif // !UNICODE
  6652.  
  6653. WINUSERAPI
  6654. HCURSOR
  6655. WINAPI
  6656. CreateCursor(
  6657.     HINSTANCE hInst,
  6658.     int xHotSpot,
  6659.     int yHotSpot,
  6660.     int nWidth,
  6661.     int nHeight,
  6662.     CONST VOID *pvANDPlane,
  6663.     CONST VOID *pvXORPlane);
  6664.  
  6665. WINUSERAPI
  6666. BOOL
  6667. WINAPI
  6668. DestroyCursor(
  6669.     HCURSOR hCursor);
  6670.  
  6671. #define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
  6672.  
  6673. /*
  6674.  * Standard Cursor IDs
  6675.  */
  6676. #define IDC_ARROW           MAKEINTRESOURCE(32512)
  6677. #define IDC_IBEAM           MAKEINTRESOURCE(32513)
  6678. #define IDC_WAIT            MAKEINTRESOURCE(32514)
  6679. #define IDC_CROSS           MAKEINTRESOURCE(32515)
  6680. #define IDC_UPARROW         MAKEINTRESOURCE(32516)
  6681. #define IDC_SIZE            MAKEINTRESOURCE(32640)  /* OBSOLETE: use IDC_SIZEALL */
  6682. #define IDC_ICON            MAKEINTRESOURCE(32641)  /* OBSOLETE: use IDC_ARROW */
  6683. #define IDC_SIZENWSE        MAKEINTRESOURCE(32642)
  6684. #define IDC_SIZENESW        MAKEINTRESOURCE(32643)
  6685. #define IDC_SIZEWE          MAKEINTRESOURCE(32644)
  6686. #define IDC_SIZENS          MAKEINTRESOURCE(32645)
  6687. #define IDC_SIZEALL         MAKEINTRESOURCE(32646)
  6688. #define IDC_NO              MAKEINTRESOURCE(32648) /*not in win3.1 */
  6689. #define IDC_APPSTARTING     MAKEINTRESOURCE(32650) /*not in win3.1 */
  6690. #if(WINVER >= 0x0400)
  6691. #define IDC_HELP            MAKEINTRESOURCE(32651)
  6692. #endif /* WINVER >= 0x0400 */
  6693.  
  6694. WINUSERAPI
  6695. BOOL
  6696. WINAPI
  6697. SetSystemCursor(
  6698.     HCURSOR hcur,
  6699.     DWORD   id);
  6700.  
  6701. typedef struct _ICONINFO {
  6702.     BOOL    fIcon;
  6703.     DWORD   xHotspot;
  6704.     DWORD   yHotspot;
  6705.     HBITMAP hbmMask;
  6706.     HBITMAP hbmColor;
  6707. } ICONINFO;
  6708. typedef ICONINFO *PICONINFO;
  6709.  
  6710. WINUSERAPI
  6711. HICON
  6712. WINAPI
  6713. LoadIconA(
  6714.     HINSTANCE hInstance,
  6715.     LPCSTR lpIconName);
  6716. WINUSERAPI
  6717. HICON
  6718. WINAPI
  6719. LoadIconW(
  6720.     HINSTANCE hInstance,
  6721.     LPCWSTR lpIconName);
  6722. #ifdef UNICODE
  6723. #define LoadIcon  LoadIconW
  6724. #else
  6725. #define LoadIcon  LoadIconA
  6726. #endif // !UNICODE
  6727.  
  6728.  
  6729. WINUSERAPI
  6730. HICON
  6731. WINAPI
  6732. CreateIcon(
  6733.     HINSTANCE hInstance,
  6734.     int nWidth,
  6735.     int nHeight,
  6736.     BYTE cPlanes,
  6737.     BYTE cBitsPixel,
  6738.     CONST BYTE *lpbANDbits,
  6739.     CONST BYTE *lpbXORbits);
  6740.  
  6741. WINUSERAPI
  6742. BOOL
  6743. WINAPI
  6744. DestroyIcon(
  6745.     HICON hIcon);
  6746.  
  6747. WINUSERAPI
  6748. int
  6749. WINAPI
  6750. LookupIconIdFromDirectory(
  6751.     PBYTE presbits,
  6752.     BOOL fIcon);
  6753.  
  6754. #if(WINVER >= 0x0400)
  6755. WINUSERAPI
  6756. int
  6757. WINAPI
  6758. LookupIconIdFromDirectoryEx(
  6759.     PBYTE presbits,
  6760.     BOOL  fIcon,
  6761.     int   cxDesired,
  6762.     int   cyDesired,
  6763.     UINT  Flags);
  6764. #endif /* WINVER >= 0x0400 */
  6765.  
  6766. WINUSERAPI
  6767. HICON
  6768. WINAPI
  6769. CreateIconFromResource(
  6770.     PBYTE presbits,
  6771.     DWORD dwResSize,
  6772.     BOOL fIcon,
  6773.     DWORD dwVer);
  6774.  
  6775. #if(WINVER >= 0x0400)
  6776. WINUSERAPI
  6777. HICON
  6778. WINAPI
  6779. CreateIconFromResourceEx(
  6780.     PBYTE presbits,
  6781.     DWORD dwResSize,
  6782.     BOOL  fIcon,
  6783.     DWORD dwVer,
  6784.     int   cxDesired,
  6785.     int   cyDesired,
  6786.     UINT  Flags);
  6787.  
  6788. /* Icon/Cursor header */
  6789. typedef struct tagCURSORSHAPE
  6790. {
  6791.     int     xHotSpot;
  6792.     int     yHotSpot;
  6793.     int     cx;
  6794.     int     cy;
  6795.     int     cbWidth;
  6796.     BYTE    Planes;
  6797.     BYTE    BitsPixel;
  6798. } CURSORSHAPE, FAR *LPCURSORSHAPE;
  6799. #endif /* WINVER >= 0x0400 */
  6800.  
  6801. #define IMAGE_BITMAP        0
  6802. #define IMAGE_ICON          1
  6803. #define IMAGE_CURSOR        2
  6804. #if(WINVER >= 0x0400)
  6805. #define IMAGE_ENHMETAFILE   3
  6806.  
  6807. #define LR_DEFAULTCOLOR     0x0000
  6808. #define LR_MONOCHROME       0x0001
  6809. #define LR_COLOR            0x0002
  6810. #define LR_COPYRETURNORG    0x0004
  6811. #define LR_COPYDELETEORG    0x0008
  6812. #define LR_LOADFROMFILE     0x0010
  6813. #define LR_LOADTRANSPARENT  0x0020
  6814. #define LR_DEFAULTSIZE      0x0040
  6815. #define LR_VGACOLOR         0x0080
  6816. #define LR_LOADMAP3DCOLORS  0x1000
  6817. #define LR_CREATEDIBSECTION 0x2000
  6818. #define LR_COPYFROMRESOURCE 0x4000
  6819. #define LR_SHARED           0x8000
  6820.  
  6821. WINUSERAPI
  6822. HANDLE
  6823. WINAPI
  6824. LoadImageA(
  6825.     HINSTANCE,
  6826.     LPCSTR,
  6827.     UINT,
  6828.     int,
  6829.     int,
  6830.     UINT);
  6831. WINUSERAPI
  6832. HANDLE
  6833. WINAPI
  6834. LoadImageW(
  6835.     HINSTANCE,
  6836.     LPCWSTR,
  6837.     UINT,
  6838.     int,
  6839.     int,
  6840.     UINT);
  6841. #ifdef UNICODE
  6842. #define LoadImage  LoadImageW
  6843. #else
  6844. #define LoadImage  LoadImageA
  6845. #endif // !UNICODE
  6846.  
  6847. WINUSERAPI
  6848. HANDLE
  6849. WINAPI
  6850. CopyImage(
  6851.     HANDLE,
  6852.     UINT,
  6853.     int,
  6854.     int,
  6855.     UINT);
  6856.  
  6857. #define DI_MASK         0x0001
  6858. #define DI_IMAGE        0x0002
  6859. #define DI_NORMAL       0x0003
  6860. #define DI_COMPAT       0x0004
  6861. #define DI_DEFAULTSIZE  0x0008
  6862.  
  6863.  
  6864. WINUSERAPI BOOL WINAPI DrawIconEx(HDC hdc, int xLeft, int yTop,
  6865.               HICON hIcon, int cxWidth, int cyWidth,
  6866.               UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags);
  6867. #endif /* WINVER >= 0x0400 */
  6868.  
  6869. WINUSERAPI
  6870. HICON
  6871. WINAPI
  6872. CreateIconIndirect(
  6873.     PICONINFO piconinfo);
  6874.  
  6875. WINUSERAPI
  6876. HICON
  6877. WINAPI
  6878. CopyIcon(
  6879.     HICON hIcon);
  6880.  
  6881. WINUSERAPI
  6882. BOOL
  6883. WINAPI
  6884. GetIconInfo(
  6885.     HICON hIcon,
  6886.     PICONINFO piconinfo);
  6887.  
  6888. #if(WINVER >= 0x0400)
  6889. #define RES_ICON    1
  6890. #define RES_CURSOR  2
  6891. #endif /* WINVER >= 0x0400 */
  6892.  
  6893. #ifdef OEMRESOURCE
  6894.  
  6895. // begin_r_winuser
  6896.  
  6897. /*
  6898.  * OEM Resource Ordinal Numbers
  6899.  */
  6900. #define OBM_CLOSE           32754
  6901. #define OBM_UPARROW         32753
  6902. #define OBM_DNARROW         32752
  6903. #define OBM_RGARROW         32751
  6904. #define OBM_LFARROW         32750
  6905. #define OBM_REDUCE          32749
  6906. #define OBM_ZOOM            32748
  6907. #define OBM_RESTORE         32747
  6908. #define OBM_REDUCED         32746
  6909. #define OBM_ZOOMD           32745
  6910. #define OBM_RESTORED        32744
  6911. #define OBM_UPARROWD        32743
  6912. #define OBM_DNARROWD        32742
  6913. #define OBM_RGARROWD        32741
  6914. #define OBM_LFARROWD        32740
  6915. #define OBM_MNARROW         32739
  6916. #define OBM_COMBO           32738
  6917. #define OBM_UPARROWI        32737
  6918. #define OBM_DNARROWI        32736
  6919. #define OBM_RGARROWI        32735
  6920. #define OBM_LFARROWI        32734
  6921.  
  6922. #define OBM_OLD_CLOSE       32767
  6923. #define OBM_SIZE            32766
  6924. #define OBM_OLD_UPARROW     32765
  6925. #define OBM_OLD_DNARROW     32764
  6926. #define OBM_OLD_RGARROW     32763
  6927. #define OBM_OLD_LFARROW     32762
  6928. #define OBM_BTSIZE          32761
  6929. #define OBM_CHECK           32760
  6930. #define OBM_CHECKBOXES      32759
  6931. #define OBM_BTNCORNERS      32758
  6932. #define OBM_OLD_REDUCE      32757
  6933. #define OBM_OLD_ZOOM        32756
  6934. #define OBM_OLD_RESTORE     32755
  6935.  
  6936. #define OCR_NORMAL          32512
  6937. #define OCR_IBEAM           32513
  6938. #define OCR_WAIT            32514
  6939. #define OCR_CROSS           32515
  6940. #define OCR_UP              32516
  6941. #define OCR_SIZE            32640   /* OBSOLETE: use OCR_SIZEALL */
  6942. #define OCR_ICON            32641   /* OBSOLETE: use OCR_NORMAL */
  6943. #define OCR_SIZENWSE        32642
  6944. #define OCR_SIZENESW        32643
  6945. #define OCR_SIZEWE          32644
  6946. #define OCR_SIZENS          32645
  6947. #define OCR_SIZEALL         32646
  6948. #define OCR_ICOCUR          32647   /* OBSOLETE: use OIC_WINLOGO */
  6949. #define OCR_NO              32648
  6950. #if(WINVER >= 0x0400)
  6951. #define OCR_APPSTARTING     32650
  6952. #endif /* WINVER >= 0x0400 */
  6953.  
  6954.  
  6955.  
  6956. #define OIC_SAMPLE          32512
  6957. #define OIC_HAND            32513
  6958. #define OIC_QUES            32514
  6959. #define OIC_BANG            32515
  6960. #define OIC_NOTE            32516
  6961. #if(WINVER >= 0x0400)
  6962. #define OIC_WINLOGO         32517
  6963. #define OIC_WARNING         OIC_BANG
  6964. #define OIC_ERROR           OIC_HAND
  6965. #define OIC_INFORMATION     OIC_NOTE
  6966. #endif /* WINVER >= 0x0400 */
  6967.  
  6968.  
  6969. // end_r_winuser
  6970.  
  6971. #endif /* OEMRESOURCE */
  6972.  
  6973. #define ORD_LANGDRIVER    1     /* The ordinal number for the entry point of
  6974.                                 ** language drivers.
  6975.                                 */
  6976.  
  6977. #ifndef NOICONS
  6978.  
  6979. // begin_r_winuser
  6980. /*
  6981.  * Standard Icon IDs
  6982.  */
  6983. #ifdef RC_INVOKED
  6984. #define IDI_APPLICATION     32512
  6985. #define IDI_HAND            32513
  6986. #define IDI_QUESTION        32514
  6987. #define IDI_EXCLAMATION     32515
  6988. #define IDI_ASTERISK        32516
  6989. #if(WINVER >= 0x0400)
  6990. #define IDI_WINLOGO         32517
  6991. #endif /* WINVER >= 0x0400 */
  6992. #else
  6993. #define IDI_APPLICATION     MAKEINTRESOURCE(32512)
  6994. #define IDI_HAND            MAKEINTRESOURCE(32513)
  6995. #define IDI_QUESTION        MAKEINTRESOURCE(32514)
  6996. #define IDI_EXCLAMATION     MAKEINTRESOURCE(32515)
  6997. #define IDI_ASTERISK        MAKEINTRESOURCE(32516)
  6998. #if(WINVER >= 0x0400)
  6999. #define IDI_WINLOGO         MAKEINTRESOURCE(32517)
  7000. #endif /* WINVER >= 0x0400 */
  7001. #endif /* RC_INVOKED */
  7002.  
  7003. #if(WINVER >= 0x0400)
  7004. #define IDI_WARNING     IDI_EXCLAMATION
  7005. #define IDI_ERROR       IDI_HAND
  7006. #define IDI_INFORMATION IDI_ASTERISK
  7007. #endif /* WINVER >= 0x0400 */
  7008.  
  7009. // end_r_winuser
  7010.  
  7011. #endif /* !NOICONS */
  7012.  
  7013. WINUSERAPI
  7014. int
  7015. WINAPI
  7016. LoadStringA(
  7017.     HINSTANCE hInstance,
  7018.     UINT uID,
  7019.     LPSTR lpBuffer,
  7020.     int nBufferMax);
  7021. WINUSERAPI
  7022. int
  7023. WINAPI
  7024. LoadStringW(
  7025.     HINSTANCE hInstance,
  7026.     UINT uID,
  7027.     LPWSTR lpBuffer,
  7028.     int nBufferMax);
  7029. #ifdef UNICODE
  7030. #define LoadString  LoadStringW
  7031. #else
  7032. #define LoadString  LoadStringA
  7033. #endif // !UNICODE
  7034.  
  7035. // begin_r_winuser
  7036.  
  7037. /*
  7038.  * Dialog Box Command IDs
  7039.  */
  7040. #define IDOK                1
  7041. #define IDCANCEL            2
  7042. #define IDABORT             3
  7043. #define IDRETRY             4
  7044. #define IDIGNORE            5
  7045. #define IDYES               6
  7046. #define IDNO                7
  7047. #if(WINVER >= 0x0400)
  7048. #define IDCLOSE         8
  7049. #define IDHELP          9
  7050. #endif /* WINVER >= 0x0400 */
  7051.  
  7052. // end_r_winuser
  7053.  
  7054. #ifndef NOCTLMGR
  7055.  
  7056. /*
  7057.  * Control Manager Structures and Definitions
  7058.  */
  7059.  
  7060. #ifndef NOWINSTYLES
  7061.  
  7062. // begin_r_winuser
  7063.  
  7064. /*
  7065.  * Edit Control Styles
  7066.  */
  7067. #define ES_LEFT             0x0000L
  7068. #define ES_CENTER           0x0001L
  7069. #define ES_RIGHT            0x0002L
  7070. #define ES_MULTILINE        0x0004L
  7071. #define ES_UPPERCASE        0x0008L
  7072. #define ES_LOWERCASE        0x0010L
  7073. #define ES_PASSWORD         0x0020L
  7074. #define ES_AUTOVSCROLL      0x0040L
  7075. #define ES_AUTOHSCROLL      0x0080L
  7076. #define ES_NOHIDESEL        0x0100L
  7077. #define ES_OEMCONVERT       0x0400L
  7078. #define ES_READONLY         0x0800L
  7079. #define ES_WANTRETURN       0x1000L
  7080. #if(WINVER >= 0x0400)
  7081. #define ES_NUMBER           0x2000L
  7082. #endif /* WINVER >= 0x0400 */
  7083.  
  7084. // end_r_winuser
  7085.  
  7086. #endif /* !NOWINSTYLES */
  7087.  
  7088. /*
  7089.  * Edit Control Notification Codes
  7090.  */
  7091. #define EN_SETFOCUS         0x0100
  7092. #define EN_KILLFOCUS        0x0200
  7093. #define EN_CHANGE           0x0300
  7094. #define EN_UPDATE           0x0400
  7095. #define EN_ERRSPACE         0x0500
  7096. #define EN_MAXTEXT          0x0501
  7097. #define EN_HSCROLL          0x0601
  7098. #define EN_VSCROLL          0x0602
  7099.  
  7100. #if(WINVER >= 0x0400)
  7101. /* Edit control EM_SETMARGIN parameters */
  7102. #define EC_LEFTMARGIN       0x0001
  7103. #define EC_RIGHTMARGIN      0x0002
  7104. #define EC_USEFONTINFO      0xffff
  7105. #endif /* WINVER >= 0x0400 */
  7106.  
  7107. #ifndef NOWINMESSAGES
  7108.  
  7109. // begin_r_winuser
  7110.  
  7111. /*
  7112.  * Edit Control Messages
  7113.  */
  7114. #define EM_GETSEL               0x00B0
  7115. #define EM_SETSEL               0x00B1
  7116. #define EM_GETRECT              0x00B2
  7117. #define EM_SETRECT              0x00B3
  7118. #define EM_SETRECTNP            0x00B4
  7119. #define EM_SCROLL               0x00B5
  7120. #define EM_LINESCROLL           0x00B6
  7121. #define EM_SCROLLCARET          0x00B7
  7122. #define EM_GETMODIFY            0x00B8
  7123. #define EM_SETMODIFY            0x00B9
  7124. #define EM_GETLINECOUNT         0x00BA
  7125. #define EM_LINEINDEX            0x00BB
  7126. #define EM_SETHANDLE            0x00BC
  7127. #define EM_GETHANDLE            0x00BD
  7128. #define EM_GETTHUMB             0x00BE
  7129. #define EM_LINELENGTH           0x00C1
  7130. #define EM_REPLACESEL           0x00C2
  7131. #define EM_GETLINE              0x00C4
  7132. #define EM_LIMITTEXT            0x00C5
  7133. #define EM_CANUNDO              0x00C6
  7134. #define EM_UNDO                 0x00C7
  7135. #define EM_FMTLINES             0x00C8
  7136. #define EM_LINEFROMCHAR         0x00C9
  7137. #define EM_SETTABSTOPS          0x00CB
  7138. #define EM_SETPASSWORDCHAR      0x00CC
  7139. #define EM_EMPTYUNDOBUFFER      0x00CD
  7140. #define EM_GETFIRSTVISIBLELINE  0x00CE
  7141. #define EM_SETREADONLY          0x00CF
  7142. #define EM_SETWORDBREAKPROC     0x00D0
  7143. #define EM_GETWORDBREAKPROC     0x00D1
  7144. #define EM_GETPASSWORDCHAR      0x00D2
  7145. #if(WINVER >= 0x0400)
  7146. #define EM_SETMARGINS           0x00D3
  7147. #define EM_GETMARGINS           0x00D4
  7148. #define EM_SETLIMITTEXT         EM_LIMITTEXT   /* ;win40 Name change */
  7149. #define EM_GETLIMITTEXT         0x00D5
  7150. #define EM_POSFROMCHAR          0x00D6
  7151. #define EM_CHARFROMPOS          0x00D7
  7152. #endif /* WINVER >= 0x0400 */
  7153.  
  7154.  
  7155. // end_r_winuser
  7156. #endif /* !NOWINMESSAGES */
  7157.  
  7158. /*
  7159.  * EDITWORDBREAKPROC code values
  7160.  */
  7161. #define WB_LEFT            0
  7162. #define WB_RIGHT           1
  7163. #define WB_ISDELIMITER     2
  7164.  
  7165. // begin_r_winuser
  7166.  
  7167. /*
  7168.  * Button Control Styles
  7169.  */
  7170. #define BS_PUSHBUTTON       0x00000000L
  7171. #define BS_DEFPUSHBUTTON    0x00000001L
  7172. #define BS_CHECKBOX         0x00000002L
  7173. #define BS_AUTOCHECKBOX     0x00000003L
  7174. #define BS_RADIOBUTTON      0x00000004L
  7175. #define BS_3STATE           0x00000005L
  7176. #define BS_AUTO3STATE       0x00000006L
  7177. #define BS_GROUPBOX         0x00000007L
  7178. #define BS_USERBUTTON       0x00000008L
  7179. #define BS_AUTORADIOBUTTON  0x00000009L
  7180. #define BS_OWNERDRAW        0x0000000BL
  7181. #define BS_LEFTTEXT         0x00000020L
  7182. #if(WINVER >= 0x0400)
  7183. #define BS_TEXT             0x00000000L
  7184. #define BS_ICON             0x00000040L
  7185. #define BS_BITMAP           0x00000080L
  7186. #define BS_LEFT             0x00000100L
  7187. #define BS_RIGHT            0x00000200L
  7188. #define BS_CENTER           0x00000300L
  7189. #define BS_TOP              0x00000400L
  7190. #define BS_BOTTOM           0x00000800L
  7191. #define BS_VCENTER          0x00000C00L
  7192. #define BS_PUSHLIKE         0x00001000L
  7193. #define BS_MULTILINE        0x00002000L
  7194. #define BS_NOTIFY           0x00004000L
  7195. #define BS_FLAT             0x00008000L
  7196. #define BS_RIGHTBUTTON      BS_LEFTTEXT
  7197. #endif /* WINVER >= 0x0400 */
  7198.  
  7199.  
  7200. /*
  7201.  * User Button Notification Codes
  7202.  */
  7203. #define BN_CLICKED          0
  7204. #define BN_PAINT            1
  7205. #define BN_HILITE           2
  7206. #define BN_UNHILITE         3
  7207. #define BN_DISABLE          4
  7208. #define BN_DOUBLECLICKED    5
  7209. #if(WINVER >= 0x0400)
  7210. #define BN_PUSHED           BN_HILITE
  7211. #define BN_UNPUSHED         BN_UNHILITE
  7212. #define BN_DBLCLK           BN_DOUBLECLICKED
  7213. #define BN_SETFOCUS         6
  7214. #define BN_KILLFOCUS        7
  7215. #endif /* WINVER >= 0x0400 */
  7216.  
  7217. /*
  7218.  * Button Control Messages
  7219.  */
  7220. #define BM_GETCHECK        0x00F0
  7221. #define BM_SETCHECK        0x00F1
  7222. #define BM_GETSTATE        0x00F2
  7223. #define BM_SETSTATE        0x00F3
  7224. #define BM_SETSTYLE        0x00F4
  7225. #if(WINVER >= 0x0400)
  7226. #define BM_CLICK           0x00F5
  7227. #define BM_GETIMAGE        0x00F6
  7228. #define BM_SETIMAGE        0x00F7
  7229.  
  7230. #define BST_UNCHECKED      0x0000
  7231. #define BST_CHECKED        0x0001
  7232. #define BST_INDETERMINATE  0x0002
  7233. #define BST_PUSHED         0x0004
  7234. #define BST_FOCUS          0x0008
  7235. #endif /* WINVER >= 0x0400 */
  7236.  
  7237. /*
  7238.  * Static Control Constants
  7239.  */
  7240. #define SS_LEFT             0x00000000L
  7241. #define SS_CENTER           0x00000001L
  7242. #define SS_RIGHT            0x00000002L
  7243. #define SS_ICON             0x00000003L
  7244. #define SS_BLACKRECT        0x00000004L
  7245. #define SS_GRAYRECT         0x00000005L
  7246. #define SS_WHITERECT        0x00000006L
  7247. #define SS_BLACKFRAME       0x00000007L
  7248. #define SS_GRAYFRAME        0x00000008L
  7249. #define SS_WHITEFRAME       0x00000009L
  7250. #define SS_USERITEM         0x0000000AL
  7251. #define SS_SIMPLE           0x0000000BL
  7252. #define SS_LEFTNOWORDWRAP   0x0000000CL
  7253. #if(WINVER >= 0x0400)
  7254. #define SS_OWNERDRAW        0x0000000DL
  7255. #define SS_BITMAP           0x0000000EL
  7256. #define SS_ENHMETAFILE      0x0000000FL
  7257. #define SS_ETCHEDHORZ       0x00000010L
  7258. #define SS_ETCHEDVERT       0x00000011L
  7259. #define SS_ETCHEDFRAME      0x00000012L
  7260. #define SS_TYPEMASK         0x0000001FL
  7261. #endif /* WINVER >= 0x0400 */
  7262. #define SS_NOPREFIX         0x00000080L /* Don't do "&" character translation */
  7263. #if(WINVER >= 0x0400)
  7264. #define SS_NOTIFY           0x00000100L
  7265. #define SS_CENTERIMAGE      0x00000200L
  7266. #define SS_RIGHTJUST        0x00000400L
  7267. #define SS_REALSIZEIMAGE    0x00000800L
  7268. #define SS_SUNKEN           0x00001000L
  7269. #define SS_ENDELLIPSIS      0x00004000L
  7270. #define SS_PATHELLIPSIS     0x00008000L
  7271. #define SS_WORDELLIPSIS     0x0000C000L
  7272. #define SS_ELLIPSISMASK     0x0000C000L
  7273. #endif /* WINVER >= 0x0400 */
  7274.  
  7275. // end_r_winuser
  7276.  
  7277. #ifndef NOWINMESSAGES
  7278. /*
  7279.  * Static Control Mesages
  7280.  */
  7281. #define STM_SETICON         0x0170
  7282. #define STM_GETICON         0x0171
  7283. #if(WINVER >= 0x0400)
  7284. #define STM_SETIMAGE        0x0172
  7285. #define STM_GETIMAGE        0x0173
  7286. #define STN_CLICKED         0
  7287. #define STN_DBLCLK          1
  7288. #define STN_ENABLE          2
  7289. #define STN_DISABLE         3
  7290. #endif /* WINVER >= 0x0400 */
  7291. #define STM_MSGMAX          0x0174
  7292. #endif /* !NOWINMESSAGES */
  7293.  
  7294. /*
  7295.  * Dialog window class
  7296.  */
  7297. #define WC_DIALOG       (MAKEINTATOM(0x8002))
  7298.  
  7299. /*
  7300.  * Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  7301.  */
  7302. #define DWL_MSGRESULT   0
  7303. #define DWL_DLGPROC     4
  7304. #define DWL_USER        8
  7305.  
  7306. /*
  7307.  * Dialog Manager Routines
  7308.  */
  7309.  
  7310. #ifndef NOMSG
  7311.  
  7312. WINUSERAPI
  7313. BOOL
  7314. WINAPI
  7315. IsDialogMessageA(
  7316.     HWND hDlg,
  7317.     LPMSG lpMsg);
  7318. WINUSERAPI
  7319. BOOL
  7320. WINAPI
  7321. IsDialogMessageW(
  7322.     HWND hDlg,
  7323.     LPMSG lpMsg);
  7324. #ifdef UNICODE
  7325. #define IsDialogMessage  IsDialogMessageW
  7326. #else
  7327. #define IsDialogMessage  IsDialogMessageA
  7328. #endif // !UNICODE
  7329.  
  7330. #endif /* !NOMSG */
  7331.  
  7332. WINUSERAPI
  7333. BOOL
  7334. WINAPI
  7335. MapDialogRect(
  7336.     HWND hDlg,
  7337.     LPRECT lpRect);
  7338.  
  7339. WINUSERAPI
  7340. int
  7341. WINAPI
  7342. DlgDirListA(
  7343.     HWND hDlg,
  7344.     LPSTR lpPathSpec,
  7345.     int nIDListBox,
  7346.     int nIDStaticPath,
  7347.     UINT uFileType);
  7348. WINUSERAPI
  7349. int
  7350. WINAPI
  7351. DlgDirListW(
  7352.     HWND hDlg,
  7353.     LPWSTR lpPathSpec,
  7354.     int nIDListBox,
  7355.     int nIDStaticPath,
  7356.     UINT uFileType);
  7357. #ifdef UNICODE
  7358. #define DlgDirList  DlgDirListW
  7359. #else
  7360. #define DlgDirList  DlgDirListA
  7361. #endif // !UNICODE
  7362.  
  7363. /*
  7364.  * DlgDirList, DlgDirListComboBox flags values
  7365.  */
  7366. #define DDL_READWRITE       0x0000
  7367. #define DDL_READONLY        0x0001
  7368. #define DDL_HIDDEN          0x0002
  7369. #define DDL_SYSTEM          0x0004
  7370. #define DDL_DIRECTORY       0x0010
  7371. #define DDL_ARCHIVE         0x0020
  7372.  
  7373. #define DDL_POSTMSGS        0x2000
  7374. #define DDL_DRIVES          0x4000
  7375. #define DDL_EXCLUSIVE       0x8000
  7376.  
  7377. WINUSERAPI
  7378. BOOL
  7379. WINAPI
  7380. DlgDirSelectExA(
  7381.     HWND hDlg,
  7382.     LPSTR lpString,
  7383.     int nCount,
  7384.     int nIDListBox);
  7385. WINUSERAPI
  7386. BOOL
  7387. WINAPI
  7388. DlgDirSelectExW(
  7389.     HWND hDlg,
  7390.     LPWSTR lpString,
  7391.     int nCount,
  7392.     int nIDListBox);
  7393. #ifdef UNICODE
  7394. #define DlgDirSelectEx  DlgDirSelectExW
  7395. #else
  7396. #define DlgDirSelectEx  DlgDirSelectExA
  7397. #endif // !UNICODE
  7398.  
  7399. WINUSERAPI
  7400. int
  7401. WINAPI
  7402. DlgDirListComboBoxA(
  7403.     HWND hDlg,
  7404.     LPSTR lpPathSpec,
  7405.     int nIDComboBox,
  7406.     int nIDStaticPath,
  7407.     UINT uFiletype);
  7408. WINUSERAPI
  7409. int
  7410. WINAPI
  7411. DlgDirListComboBoxW(
  7412.     HWND hDlg,
  7413.     LPWSTR lpPathSpec,
  7414.     int nIDComboBox,
  7415.     int nIDStaticPath,
  7416.     UINT uFiletype);
  7417. #ifdef UNICODE
  7418. #define DlgDirListComboBox  DlgDirListComboBoxW
  7419. #else
  7420. #define DlgDirListComboBox  DlgDirListComboBoxA
  7421. #endif // !UNICODE
  7422.  
  7423. WINUSERAPI
  7424. BOOL
  7425. WINAPI
  7426. DlgDirSelectComboBoxExA(
  7427.     HWND hDlg,
  7428.     LPSTR lpString,
  7429.     int nCount,
  7430.     int nIDComboBox);
  7431. WINUSERAPI
  7432. BOOL
  7433. WINAPI
  7434. DlgDirSelectComboBoxExW(
  7435.     HWND hDlg,
  7436.     LPWSTR lpString,
  7437.     int nCount,
  7438.     int nIDComboBox);
  7439. #ifdef UNICODE
  7440. #define DlgDirSelectComboBoxEx  DlgDirSelectComboBoxExW
  7441. #else
  7442. #define DlgDirSelectComboBoxEx  DlgDirSelectComboBoxExA
  7443. #endif // !UNICODE
  7444.  
  7445.  
  7446. // begin_r_winuser
  7447.  
  7448. /*
  7449.  * Dialog Styles
  7450.  */
  7451. #define DS_ABSALIGN         0x01L
  7452. #define DS_SYSMODAL         0x02L
  7453. #define DS_LOCALEDIT        0x20L   /* Edit items get Local storage. */
  7454. #define DS_SETFONT          0x40L   /* User specified font for Dlg controls */
  7455. #define DS_MODALFRAME       0x80L   /* Can be combined with WS_CAPTION  */
  7456. #define DS_NOIDLEMSG        0x100L  /* WM_ENTERIDLE message will not be sent */
  7457. #define DS_SETFOREGROUND    0x200L  /* not in win3.1 */
  7458.  
  7459.  
  7460.  
  7461. #if(WINVER >= 0x0400)
  7462. #define DS_3DLOOK           0x0004L
  7463. #define DS_FIXEDSYS         0x0008L
  7464. #define DS_NOFAILCREATE     0x0010L
  7465. #define DS_CONTROL          0x0400L
  7466. #define DS_CENTER           0x0800L
  7467. #define DS_CENTERMOUSE      0x1000L
  7468. #define DS_CONTEXTHELP      0x2000L
  7469.  
  7470.  
  7471. #endif /* WINVER >= 0x0400 */
  7472.  
  7473. // end_r_winuser
  7474.  
  7475. #define DM_GETDEFID         (WM_USER+0)
  7476. #define DM_SETDEFID         (WM_USER+1)
  7477.  
  7478. #if(WINVER >= 0x0400)
  7479. #define DM_REPOSITION       (WM_USER+2)
  7480.  
  7481. #define PSM_PAGEINFO        (WM_USER+100)
  7482. #define PSM_SHEETINFO       (WM_USER+101)
  7483.  
  7484. #define PSI_SETACTIVE       0x0001L
  7485. #define PSI_KILLACTIVE      0x0002L
  7486. #define PSI_APPLY           0x0003L
  7487. #define PSI_RESET           0x0004L
  7488. #define PSI_HASHELP         0x0005L
  7489. #define PSI_HELP            0x0006L
  7490.  
  7491. #define PSI_CHANGED         0x0001L
  7492. #define PSI_GUISTART        0x0002L
  7493. #define PSI_REBOOT          0x0003L
  7494. #define PSI_GETSIBLINGS     0x0004L
  7495. #endif /* WINVER >= 0x0400 */
  7496. /*
  7497.  * Returned in HIWORD() of DM_GETDEFID result if msg is supported
  7498.  */
  7499. #define DC_HASDEFID         0x534B
  7500.  
  7501. /*
  7502.  * Dialog Codes
  7503.  */
  7504. #define DLGC_WANTARROWS     0x0001      /* Control wants arrow keys         */
  7505. #define DLGC_WANTTAB        0x0002      /* Control wants tab keys           */
  7506. #define DLGC_WANTALLKEYS    0x0004      /* Control wants all keys           */
  7507. #define DLGC_WANTMESSAGE    0x0004      /* Pass message to control          */
  7508. #define DLGC_HASSETSEL      0x0008      /* Understands EM_SETSEL message    */
  7509. #define DLGC_DEFPUSHBUTTON  0x0010      /* Default pushbutton               */
  7510. #define DLGC_UNDEFPUSHBUTTON 0x0020     /* Non-default pushbutton           */
  7511. #define DLGC_RADIOBUTTON    0x0040      /* Radio button                     */
  7512. #define DLGC_WANTCHARS      0x0080      /* Want WM_CHAR messages            */
  7513. #define DLGC_STATIC         0x0100      /* Static item: don't include       */
  7514. #define DLGC_BUTTON         0x2000      /* Button item: can be checked      */
  7515.  
  7516. #define LB_CTLCODE          0L
  7517.  
  7518. /*
  7519.  * Listbox Return Values
  7520.  */
  7521. #define LB_OKAY             0
  7522. #define LB_ERR              (-1)
  7523. #define LB_ERRSPACE         (-2)
  7524.  
  7525. /*
  7526. **  The idStaticPath parameter to DlgDirList can have the following values
  7527. **  ORed if the list box should show other details of the files along with
  7528. **  the name of the files;
  7529. */
  7530.                                   /* all other details also will be returned */
  7531.  
  7532.  
  7533. /*
  7534.  * Listbox Notification Codes
  7535.  */
  7536. #define LBN_ERRSPACE        (-2)
  7537. #define LBN_SELCHANGE       1
  7538. #define LBN_DBLCLK          2
  7539. #define LBN_SELCANCEL       3
  7540. #define LBN_SETFOCUS        4
  7541. #define LBN_KILLFOCUS       5
  7542.  
  7543.  
  7544.  
  7545. #ifndef NOWINMESSAGES
  7546.  
  7547. /*
  7548.  * Listbox messages
  7549.  */
  7550. #define LB_ADDSTRING            0x0180
  7551. #define LB_INSERTSTRING         0x0181
  7552. #define LB_DELETESTRING         0x0182
  7553. #define LB_SELITEMRANGEEX       0x0183
  7554. #define LB_RESETCONTENT         0x0184
  7555. #define LB_SETSEL               0x0185
  7556. #define LB_SETCURSEL            0x0186
  7557. #define LB_GETSEL               0x0187
  7558. #define LB_GETCURSEL            0x0188
  7559. #define LB_GETTEXT              0x0189
  7560. #define LB_GETTEXTLEN           0x018A
  7561. #define LB_GETCOUNT             0x018B
  7562. #define LB_SELECTSTRING         0x018C
  7563. #define LB_DIR                  0x018D
  7564. #define LB_GETTOPINDEX          0x018E
  7565. #define LB_FINDSTRING           0x018F
  7566. #define LB_GETSELCOUNT          0x0190
  7567. #define LB_GETSELITEMS          0x0191
  7568. #define LB_SETTABSTOPS          0x0192
  7569. #define LB_GETHORIZONTALEXTENT  0x0193
  7570. #define LB_SETHORIZONTALEXTENT  0x0194
  7571. #define LB_SETCOLUMNWIDTH       0x0195
  7572. #define LB_ADDFILE              0x0196
  7573. #define LB_SETTOPINDEX          0x0197
  7574. #define LB_GETITEMRECT          0x0198
  7575. #define LB_GETITEMDATA          0x0199
  7576. #define LB_SETITEMDATA          0x019A
  7577. #define LB_SELITEMRANGE         0x019B
  7578. #define LB_SETANCHORINDEX       0x019C
  7579. #define LB_GETANCHORINDEX       0x019D
  7580. #define LB_SETCARETINDEX        0x019E
  7581. #define LB_GETCARETINDEX        0x019F
  7582. #define LB_SETITEMHEIGHT        0x01A0
  7583. #define LB_GETITEMHEIGHT        0x01A1
  7584. #define LB_FINDSTRINGEXACT      0x01A2
  7585. #define LB_SETLOCALE            0x01A5
  7586. #define LB_GETLOCALE            0x01A6
  7587. #define LB_SETCOUNT             0x01A7
  7588. #if(WINVER >= 0x0400)
  7589. #define LB_INITSTORAGE          0x01A8
  7590. #define LB_ITEMFROMPOINT        0x01A9
  7591. #endif /* WINVER >= 0x0400 */
  7592. #if(WINVER >= 0x0400)
  7593. #define LB_MSGMAX               0x01B0
  7594. #else
  7595. #define LB_MSGMAX               0x01A8
  7596. #endif
  7597.  
  7598. #endif /* !NOWINMESSAGES */
  7599.  
  7600. #ifndef NOWINSTYLES
  7601.  
  7602. // begin_r_winuser
  7603.  
  7604. /*
  7605.  * Listbox Styles
  7606.  */
  7607. #define LBS_NOTIFY            0x0001L
  7608. #define LBS_SORT              0x0002L
  7609. #define LBS_NOREDRAW          0x0004L
  7610. #define LBS_MULTIPLESEL       0x0008L
  7611. #define LBS_OWNERDRAWFIXED    0x0010L
  7612. #define LBS_OWNERDRAWVARIABLE 0x0020L
  7613. #define LBS_HASSTRINGS        0x0040L
  7614. #define LBS_USETABSTOPS       0x0080L
  7615. #define LBS_NOINTEGRALHEIGHT  0x0100L
  7616. #define LBS_MULTICOLUMN       0x0200L
  7617. #define LBS_WANTKEYBOARDINPUT 0x0400L
  7618. #define LBS_EXTENDEDSEL       0x0800L
  7619. #define LBS_DISABLENOSCROLL   0x1000L
  7620. #define LBS_NODATA            0x2000L
  7621. #if(WINVER >= 0x0400)
  7622. #define LBS_NOSEL             0x4000L
  7623. #endif /* WINVER >= 0x0400 */
  7624. #define LBS_STANDARD          (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  7625.  
  7626. // end_r_winuser
  7627.  
  7628. #endif /* !NOWINSTYLES */
  7629.  
  7630.  
  7631. /*
  7632.  * Combo Box return Values
  7633.  */
  7634. #define CB_OKAY             0
  7635. #define CB_ERR              (-1)
  7636. #define CB_ERRSPACE         (-2)
  7637.  
  7638.  
  7639. /*
  7640.  * Combo Box Notification Codes
  7641.  */
  7642. #define CBN_ERRSPACE        (-1)
  7643. #define CBN_SELCHANGE       1
  7644. #define CBN_DBLCLK          2
  7645. #define CBN_SETFOCUS        3
  7646. #define CBN_KILLFOCUS       4
  7647. #define CBN_EDITCHANGE      5
  7648. #define CBN_EDITUPDATE      6
  7649. #define CBN_DROPDOWN        7
  7650. #define CBN_CLOSEUP         8
  7651. #define CBN_SELENDOK        9
  7652. #define CBN_SELENDCANCEL    10
  7653.  
  7654. #ifndef NOWINSTYLES
  7655. // begin_r_winuser
  7656.  
  7657. /*
  7658.  * Combo Box styles
  7659.  */
  7660. #define CBS_SIMPLE            0x0001L
  7661. #define CBS_DROPDOWN          0x0002L
  7662. #define CBS_DROPDOWNLIST      0x0003L
  7663. #define CBS_OWNERDRAWFIXED    0x0010L
  7664. #define CBS_OWNERDRAWVARIABLE 0x0020L
  7665. #define CBS_AUTOHSCROLL       0x0040L
  7666. #define CBS_OEMCONVERT        0x0080L
  7667. #define CBS_SORT              0x0100L
  7668. #define CBS_HASSTRINGS        0x0200L
  7669. #define CBS_NOINTEGRALHEIGHT  0x0400L
  7670. #define CBS_DISABLENOSCROLL   0x0800L
  7671. #if(WINVER >= 0x0400)
  7672. #define CBS_UPPERCASE           0x2000L
  7673. #define CBS_LOWERCASE           0x4000L
  7674. #endif /* WINVER >= 0x0400 */
  7675.  
  7676. // end_r_winuser
  7677. #endif  /* !NOWINSTYLES */
  7678.  
  7679.  
  7680. /*
  7681.  * Combo Box messages
  7682.  */
  7683. #ifndef NOWINMESSAGES
  7684. #define CB_GETEDITSEL               0x0140
  7685. #define CB_LIMITTEXT                0x0141
  7686. #define CB_SETEDITSEL               0x0142
  7687. #define CB_ADDSTRING                0x0143
  7688. #define CB_DELETESTRING             0x0144
  7689. #define CB_DIR                      0x0145
  7690. #define CB_GETCOUNT                 0x0146
  7691. #define CB_GETCURSEL                0x0147
  7692. #define CB_GETLBTEXT                0x0148
  7693. #define CB_GETLBTEXTLEN             0x0149
  7694. #define CB_INSERTSTRING             0x014A
  7695. #define CB_RESETCONTENT             0x014B
  7696. #define CB_FINDSTRING               0x014C
  7697. #define CB_SELECTSTRING             0x014D
  7698. #define CB_SETCURSEL                0x014E
  7699. #define CB_SHOWDROPDOWN             0x014F
  7700. #define CB_GETITEMDATA              0x0150
  7701. #define CB_SETITEMDATA              0x0151
  7702. #define CB_GETDROPPEDCONTROLRECT    0x0152
  7703. #define CB_SETITEMHEIGHT            0x0153
  7704. #define CB_GETITEMHEIGHT            0x0154
  7705. #define CB_SETEXTENDEDUI            0x0155
  7706. #define CB_GETEXTENDEDUI            0x0156
  7707. #define CB_GETDROPPEDSTATE          0x0157
  7708. #define CB_FINDSTRINGEXACT          0x0158
  7709. #define CB_SETLOCALE                0x0159
  7710. #define CB_GETLOCALE                0x015A
  7711. #if(WINVER >= 0x0400)
  7712. #define CB_GETTOPINDEX              0x015b
  7713. #define CB_SETTOPINDEX              0x015c
  7714. #define CB_GETHORIZONTALEXTENT      0x015d
  7715. #define CB_SETHORIZONTALEXTENT      0x015e
  7716. #define CB_GETDROPPEDWIDTH          0x015f
  7717. #define CB_SETDROPPEDWIDTH          0x0160
  7718. #define CB_INITSTORAGE              0x0161
  7719. #endif /* WINVER >= 0x0400 */
  7720. #if(WINVER >= 0x0400)
  7721. #define CB_MSGMAX                   0x0162
  7722. #else
  7723. #define CB_MSGMAX                   0x015B
  7724. #endif
  7725. #endif  /* !NOWINMESSAGES */
  7726.  
  7727.  
  7728.  
  7729. #ifndef NOWINSTYLES
  7730.  
  7731. // begin_r_winuser
  7732.  
  7733. /*
  7734.  * Scroll Bar Styles
  7735.  */
  7736. #define SBS_HORZ                    0x0000L
  7737. #define SBS_VERT                    0x0001L
  7738. #define SBS_TOPALIGN                0x0002L
  7739. #define SBS_LEFTALIGN               0x0002L
  7740. #define SBS_BOTTOMALIGN             0x0004L
  7741. #define SBS_RIGHTALIGN              0x0004L
  7742. #define SBS_SIZEBOXTOPLEFTALIGN     0x0002L
  7743. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  7744. #define SBS_SIZEBOX                 0x0008L
  7745. #if(WINVER >= 0x0400)
  7746. #define SBS_SIZEGRIP                0x0010L
  7747. #endif /* WINVER >= 0x0400 */
  7748.  
  7749. // end_r_winuser
  7750.  
  7751. #endif /* !NOWINSTYLES */
  7752.  
  7753. /*
  7754.  * Scroll bar messages
  7755.  */
  7756. #ifndef NOWINMESSAGES
  7757. #define SBM_SETPOS                  0x00E0 /*not in win3.1 */
  7758. #define SBM_GETPOS                  0x00E1 /*not in win3.1 */
  7759. #define SBM_SETRANGE                0x00E2 /*not in win3.1 */
  7760. #define SBM_SETRANGEREDRAW          0x00E6 /*not in win3.1 */
  7761. #define SBM_GETRANGE                0x00E3 /*not in win3.1 */
  7762. #define SBM_ENABLE_ARROWS           0x00E4 /*not in win3.1 */
  7763. #if(WINVER >= 0x0400)
  7764. #define SBM_SETSCROLLINFO           0x00E9
  7765. #define SBM_GETSCROLLINFO           0x00EA
  7766.  
  7767. #define SIF_RANGE           0x0001
  7768. #define SIF_PAGE            0x0002
  7769. #define SIF_POS             0x0004
  7770. #define SIF_DISABLENOSCROLL 0x0008
  7771. #define SIF_TRACKPOS        0x0010
  7772. #define SIF_ALL             (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
  7773.  
  7774. typedef struct tagSCROLLINFO
  7775. {
  7776.     UINT    cbSize;
  7777.     UINT    fMask;
  7778.     int     nMin;
  7779.     int     nMax;
  7780.     UINT    nPage;
  7781.     int     nPos;
  7782.     int     nTrackPos;
  7783. }   SCROLLINFO, FAR *LPSCROLLINFO;
  7784. typedef SCROLLINFO CONST FAR *LPCSCROLLINFO;
  7785.  
  7786. WINUSERAPI int     WINAPI SetScrollInfo(HWND, int, LPCSCROLLINFO, BOOL);
  7787. WINUSERAPI BOOL    WINAPI GetScrollInfo(HWND, int, LPSCROLLINFO);
  7788. #endif /* WINVER >= 0x0400 */
  7789. #endif /* !NOWINMESSAGES */
  7790. #endif /* !NOCTLMGR */
  7791.  
  7792. #ifndef NOMDI
  7793.  
  7794. /*
  7795.  * MDI client style bits
  7796.  */
  7797. #define MDIS_ALLCHILDSTYLES    0x0001
  7798.  
  7799. /*
  7800.  * wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
  7801.  */
  7802. #define MDITILE_VERTICAL       0x0000 /*not in win3.1 */
  7803. #define MDITILE_HORIZONTAL     0x0001 /*not in win3.1 */
  7804. #define MDITILE_SKIPDISABLED   0x0002 /*not in win3.1 */
  7805.  
  7806. typedef struct tagMDICREATESTRUCTA {
  7807.     LPCSTR   szClass;
  7808.     LPCSTR   szTitle;
  7809.     HANDLE hOwner;
  7810.     int x;
  7811.     int y;
  7812.     int cx;
  7813.     int cy;
  7814.     DWORD style;
  7815.     LPARAM lParam;        /* app-defined stuff */
  7816. } MDICREATESTRUCTA, *LPMDICREATESTRUCTA;
  7817. typedef struct tagMDICREATESTRUCTW {
  7818.     LPCWSTR  szClass;
  7819.     LPCWSTR  szTitle;
  7820.     HANDLE hOwner;
  7821.     int x;
  7822.     int y;
  7823.     int cx;
  7824.     int cy;
  7825.     DWORD style;
  7826.     LPARAM lParam;        /* app-defined stuff */
  7827. } MDICREATESTRUCTW, *LPMDICREATESTRUCTW;
  7828. #ifdef UNICODE
  7829. typedef MDICREATESTRUCTW MDICREATESTRUCT;
  7830. typedef LPMDICREATESTRUCTW LPMDICREATESTRUCT;
  7831. #else
  7832. typedef MDICREATESTRUCTA MDICREATESTRUCT;
  7833. typedef LPMDICREATESTRUCTA LPMDICREATESTRUCT;
  7834. #endif // UNICODE
  7835.  
  7836. typedef struct tagCLIENTCREATESTRUCT {
  7837.     HANDLE hWindowMenu;
  7838.     UINT idFirstChild;
  7839. } CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
  7840.  
  7841. WINUSERAPI
  7842. LRESULT
  7843. WINAPI
  7844. DefFrameProcA(
  7845.     HWND hWnd,
  7846.     HWND hWndMDIClient ,
  7847.     UINT uMsg,
  7848.     WPARAM wParam,
  7849.     LPARAM lParam);
  7850. WINUSERAPI
  7851. LRESULT
  7852. WINAPI
  7853. DefFrameProcW(
  7854.     HWND hWnd,
  7855.     HWND hWndMDIClient ,
  7856.     UINT uMsg,
  7857.     WPARAM wParam,
  7858.     LPARAM lParam);
  7859. #ifdef UNICODE
  7860. #define DefFrameProc  DefFrameProcW
  7861. #else
  7862. #define DefFrameProc  DefFrameProcA
  7863. #endif // !UNICODE
  7864.  
  7865. WINUSERAPI
  7866. LRESULT
  7867. WINAPI
  7868. DefMDIChildProcA(
  7869.     HWND hWnd,
  7870.     UINT uMsg,
  7871.     WPARAM wParam,
  7872.     LPARAM lParam);
  7873. WINUSERAPI
  7874. LRESULT
  7875. WINAPI
  7876. DefMDIChildProcW(
  7877.     HWND hWnd,
  7878.     UINT uMsg,
  7879.     WPARAM wParam,
  7880.     LPARAM lParam);
  7881. #ifdef UNICODE
  7882. #define DefMDIChildProc  DefMDIChildProcW
  7883. #else
  7884. #define DefMDIChildProc  DefMDIChildProcA
  7885. #endif // !UNICODE
  7886.  
  7887. #ifndef NOMSG
  7888.  
  7889. WINUSERAPI
  7890. BOOL
  7891. WINAPI
  7892. TranslateMDISysAccel(
  7893.     HWND hWndClient,
  7894.     LPMSG lpMsg);
  7895.  
  7896. #endif /* !NOMSG */
  7897.  
  7898. WINUSERAPI
  7899. UINT
  7900. WINAPI
  7901. ArrangeIconicWindows(
  7902.     HWND hWnd);
  7903.  
  7904. WINUSERAPI
  7905. HWND
  7906. WINAPI
  7907. CreateMDIWindowA(
  7908.     LPSTR lpClassName,
  7909.     LPSTR lpWindowName,
  7910.     DWORD dwStyle,
  7911.     int X,
  7912.     int Y,
  7913.     int nWidth,
  7914.     int nHeight,
  7915.     HWND hWndParent,
  7916.     HINSTANCE hInstance,
  7917.     LPARAM lParam
  7918.     );
  7919. WINUSERAPI
  7920. HWND
  7921. WINAPI
  7922. CreateMDIWindowW(
  7923.     LPWSTR lpClassName,
  7924.     LPWSTR lpWindowName,
  7925.     DWORD dwStyle,
  7926.     int X,
  7927.     int Y,
  7928.     int nWidth,
  7929.     int nHeight,
  7930.     HWND hWndParent,
  7931.     HINSTANCE hInstance,
  7932.     LPARAM lParam
  7933.     );
  7934. #ifdef UNICODE
  7935. #define CreateMDIWindow  CreateMDIWindowW
  7936. #else
  7937. #define CreateMDIWindow  CreateMDIWindowA
  7938. #endif // !UNICODE
  7939.  
  7940. #if(WINVER >= 0x0400)
  7941. WINUSERAPI WORD    WINAPI TileWindows(HWND hwndParent, UINT wHow, CONST RECT * lpRect, UINT cKids, const HWND FAR * lpKids);
  7942. WINUSERAPI WORD    WINAPI CascadeWindows(HWND hwndParent, UINT wHow, CONST RECT * lpRect, UINT cKids,  const HWND FAR * lpKids);
  7943. #endif /* WINVER >= 0x0400 */
  7944. #endif /* !NOMDI */
  7945.  
  7946. #endif /* !NOUSER */
  7947.  
  7948. /****** Help support ********************************************************/
  7949.  
  7950. #ifndef NOHELP
  7951.  
  7952. typedef DWORD HELPPOLY;
  7953. typedef struct tagMULTIKEYHELPA {
  7954.     DWORD  mkSize;
  7955.     CHAR   mkKeylist;
  7956.     CHAR   szKeyphrase[1];
  7957. } MULTIKEYHELPA, *PMULTIKEYHELPA, *LPMULTIKEYHELPA;
  7958. typedef struct tagMULTIKEYHELPW {
  7959.     DWORD  mkSize;
  7960.     WCHAR  mkKeylist;
  7961.     WCHAR  szKeyphrase[1];
  7962. } MULTIKEYHELPW, *PMULTIKEYHELPW, *LPMULTIKEYHELPW;
  7963. #ifdef UNICODE
  7964. typedef MULTIKEYHELPW MULTIKEYHELP;
  7965. typedef PMULTIKEYHELPW PMULTIKEYHELP;
  7966. typedef LPMULTIKEYHELPW LPMULTIKEYHELP;
  7967. #else
  7968. typedef MULTIKEYHELPA MULTIKEYHELP;
  7969. typedef PMULTIKEYHELPA PMULTIKEYHELP;
  7970. typedef LPMULTIKEYHELPA LPMULTIKEYHELP;
  7971. #endif // UNICODE
  7972.  
  7973. typedef struct tagHELPWININFOA {
  7974.     int  wStructSize;
  7975.     int  x;
  7976.     int  y;
  7977.     int  dx;
  7978.     int  dy;
  7979.     int  wMax;
  7980.     CHAR   rgchMember[2];
  7981. } HELPWININFOA, *PHELPWININFOA, *LPHELPWININFOA;
  7982. typedef struct tagHELPWININFOW {
  7983.     int  wStructSize;
  7984.     int  x;
  7985.     int  y;
  7986.     int  dx;
  7987.     int  dy;
  7988.     int  wMax;
  7989.     WCHAR  rgchMember[2];
  7990. } HELPWININFOW, *PHELPWININFOW, *LPHELPWININFOW;
  7991. #ifdef UNICODE
  7992. typedef HELPWININFOW HELPWININFO;
  7993. typedef PHELPWININFOW PHELPWININFO;
  7994. typedef LPHELPWININFOW LPHELPWININFO;
  7995. #else
  7996. typedef HELPWININFOA HELPWININFO;
  7997. typedef PHELPWININFOA PHELPWININFO;
  7998. typedef LPHELPWININFOA LPHELPWININFO;
  7999. #endif // UNICODE
  8000.  
  8001. // begin_r_winuser
  8002.  
  8003. /*
  8004.  * Commands to pass to WinHelp()
  8005.  */
  8006. #define HELP_CONTEXT      0x0001L  /* Display topic in ulTopic */
  8007. #define HELP_QUIT         0x0002L  /* Terminate help */
  8008. #define HELP_INDEX        0x0003L  /* Display index */
  8009. #define HELP_CONTENTS     0x0003L
  8010. #define HELP_HELPONHELP   0x0004L  /* Display help on using help */
  8011. #define HELP_SETINDEX     0x0005L  /* Set current Index for multi index help */
  8012. #define HELP_SETCONTENTS  0x0005L
  8013. #define HELP_CONTEXTPOPUP 0x0008L
  8014. #define HELP_FORCEFILE    0x0009L
  8015. #define HELP_KEY          0x0101L  /* Display topic for keyword in offabData */
  8016. #define HELP_COMMAND      0x0102L
  8017. #define HELP_PARTIALKEY   0x0105L
  8018. #define HELP_MULTIKEY     0x0201L
  8019. #define HELP_SETWINPOS    0x0203L
  8020. #if(WINVER >= 0x0400)
  8021. #define HELP_CONTEXTMENU  0x000a
  8022. #define HELP_FINDER       0x000b
  8023. #define HELP_WM_HELP      0x000c
  8024. #define HELP_SETPOPUP_POS 0x000d
  8025.  
  8026. #define HELP_TCARD              0x8000
  8027. #define HELP_TCARD_DATA         0x0010
  8028. #define HELP_TCARD_OTHER_CALLER 0x0011
  8029.  
  8030. // These are in winhelp.h in Win95.
  8031. #define IDH_NO_HELP                     28440
  8032. #define IDH_MISSING_CONTEXT             28441 // Control doesn't have matching help context
  8033. #define IDH_GENERIC_HELP_BUTTON         28442 // Property sheet help button
  8034. #define IDH_OK                          28443
  8035. #define IDH_CANCEL                      28444
  8036. #define IDH_HELP                        28445
  8037.  
  8038. #endif /* WINVER >= 0x0400 */
  8039.  
  8040. // end_r_winuser
  8041.  
  8042.  
  8043. WINUSERAPI
  8044. BOOL
  8045. WINAPI
  8046. WinHelpA(
  8047.     HWND hWndMain,
  8048.     LPCSTR lpszHelp,
  8049.     UINT uCommand,
  8050.     DWORD dwData
  8051.     );
  8052. WINUSERAPI
  8053. BOOL
  8054. WINAPI
  8055. WinHelpW(
  8056.     HWND hWndMain,
  8057.     LPCWSTR lpszHelp,
  8058.     UINT uCommand,
  8059.     DWORD dwData
  8060.     );
  8061. #ifdef UNICODE
  8062. #define WinHelp  WinHelpW
  8063. #else
  8064. #define WinHelp  WinHelpA
  8065. #endif // !UNICODE
  8066.  
  8067. #endif /* !NOHELP */
  8068.  
  8069. #ifndef NOSYSPARAMSINFO
  8070.  
  8071. /*
  8072.  * Parameter for SystemParametersInfo()
  8073.  */
  8074.  
  8075. #define SPI_GETBEEP                 1
  8076. #define SPI_SETBEEP                 2
  8077. #define SPI_GETMOUSE                3
  8078. #define SPI_SETMOUSE                4
  8079. #define SPI_GETBORDER               5
  8080. #define SPI_SETBORDER               6
  8081. #define SPI_GETKEYBOARDSPEED       10
  8082. #define SPI_SETKEYBOARDSPEED       11
  8083. #define SPI_LANGDRIVER             12
  8084. #define SPI_ICONHORIZONTALSPACING  13
  8085. #define SPI_GETSCREENSAVETIMEOUT   14
  8086. #define SPI_SETSCREENSAVETIMEOUT   15
  8087. #define SPI_GETSCREENSAVEACTIVE    16
  8088. #define SPI_SETSCREENSAVEACTIVE    17
  8089. #define SPI_GETGRIDGRANULARITY     18
  8090. #define SPI_SETGRIDGRANULARITY     19
  8091. #define SPI_SETDESKWALLPAPER       20
  8092. #define SPI_SETDESKPATTERN         21
  8093. #define SPI_GETKEYBOARDDELAY       22
  8094. #define SPI_SETKEYBOARDDELAY       23
  8095. #define SPI_ICONVERTICALSPACING    24
  8096. #define SPI_GETICONTITLEWRAP       25
  8097. #define SPI_SETICONTITLEWRAP       26
  8098. #define SPI_GETMENUDROPALIGNMENT   27
  8099. #define SPI_SETMENUDROPALIGNMENT   28
  8100. #define SPI_SETDOUBLECLKWIDTH      29
  8101. #define SPI_SETDOUBLECLKHEIGHT     30
  8102. #define SPI_GETICONTITLELOGFONT    31
  8103. #define SPI_SETDOUBLECLICKTIME     32
  8104. #define SPI_SETMOUSEBUTTONSWAP     33
  8105. #define SPI_SETICONTITLELOGFONT    34
  8106. #define SPI_GETFASTTASKSWITCH      35
  8107. #define SPI_SETFASTTASKSWITCH      36
  8108. #if(WINVER >= 0x0400)
  8109. #define SPI_SETDRAGFULLWINDOWS     37
  8110. #define SPI_GETDRAGFULLWINDOWS     38
  8111. #define SPI_GETNONCLIENTMETRICS    41
  8112. #define SPI_SETNONCLIENTMETRICS    42
  8113. #define SPI_GETMINIMIZEDMETRICS    43
  8114. #define SPI_SETMINIMIZEDMETRICS    44
  8115. #define SPI_GETICONMETRICS         45
  8116. #define SPI_SETICONMETRICS         46
  8117. #define SPI_SETWORKAREA            47
  8118. #define SPI_GETWORKAREA            48
  8119. #define SPI_SETPENWINDOWS          49
  8120.  
  8121. #define SPI_GETHIGHCONTRAST        66
  8122. #define SPI_SETHIGHCONTRAST        67
  8123. #define SPI_GETKEYBOARDPREF        68
  8124. #define SPI_SETKEYBOARDPREF        69
  8125. #define SPI_GETSCREENREADER        70
  8126. #define SPI_SETSCREENREADER        71
  8127. #define SPI_GETANIMATION           72
  8128. #define SPI_SETANIMATION           73
  8129. #define SPI_GETFONTSMOOTHING       74
  8130. #define SPI_SETFONTSMOOTHING       75
  8131. #define SPI_SETDRAGWIDTH           76
  8132. #define SPI_SETDRAGHEIGHT          77
  8133. #define SPI_SETHANDHELD            78
  8134. #define SPI_GETLOWPOWERTIMEOUT     79
  8135. #define SPI_GETPOWEROFFTIMEOUT     80
  8136. #define SPI_SETLOWPOWERTIMEOUT     81
  8137. #define SPI_SETPOWEROFFTIMEOUT     82
  8138. #define SPI_GETLOWPOWERACTIVE      83
  8139. #define SPI_GETPOWEROFFACTIVE      84
  8140. #define SPI_SETLOWPOWERACTIVE      85
  8141. #define SPI_SETPOWEROFFACTIVE      86
  8142. #define SPI_SETCURSORS             87
  8143. #define SPI_SETICONS               88
  8144. #define SPI_GETDEFAULTINPUTLANG    89
  8145. #define SPI_SETDEFAULTINPUTLANG    90
  8146. #define SPI_SETLANGTOGGLE          91
  8147. #define SPI_GETWINDOWSEXTENSION    92
  8148. #define SPI_SETMOUSETRAILS         93
  8149. #define SPI_GETMOUSETRAILS         94
  8150. #define SPI_SCREENSAVERRUNNING     97
  8151. #endif /* WINVER >= 0x0400 */
  8152. #define SPI_GETFILTERKEYS          50
  8153. #define SPI_SETFILTERKEYS          51
  8154. #define SPI_GETTOGGLEKEYS          52
  8155. #define SPI_SETTOGGLEKEYS          53
  8156. #define SPI_GETMOUSEKEYS           54
  8157. #define SPI_SETMOUSEKEYS           55
  8158. #define SPI_GETSHOWSOUNDS          56
  8159. #define SPI_SETSHOWSOUNDS          57
  8160. #define SPI_GETSTICKYKEYS          58
  8161. #define SPI_SETSTICKYKEYS          59
  8162. #define SPI_GETACCESSTIMEOUT       60
  8163. #define SPI_SETACCESSTIMEOUT       61
  8164. #if(WINVER >= 0x0400)
  8165. #define SPI_GETSERIALKEYS          62
  8166. #define SPI_SETSERIALKEYS          63
  8167. #endif /* WINVER >= 0x0400 */
  8168. #define SPI_GETSOUNDSENTRY         64
  8169. #define SPI_SETSOUNDSENTRY         65
  8170. #if(_WIN32_WINNT >= 0x0400)
  8171. #define SPI_GETSNAPTODEFBUTTON     95
  8172. #define SPI_SETSNAPTODEFBUTTON     96
  8173. #define SPI_GETMOUSEHOVERWIDTH     98
  8174. #define SPI_SETMOUSEHOVERWIDTH     99
  8175. #define SPI_GETMOUSEHOVERHEIGHT   100
  8176. #define SPI_SETMOUSEHOVERHEIGHT   101
  8177. #define SPI_GETMOUSEHOVERTIME     102
  8178. #define SPI_SETMOUSEHOVERTIME     103
  8179. #define SPI_GETWHEELSCROLLLINES   104
  8180. #define SPI_SETWHEELSCROLLLINES   105
  8181.  
  8182. #endif /* _WIN32_WINNT >= 0x0400 */
  8183.  
  8184. /*
  8185.  * SPI User Preferences.
  8186.  */
  8187.  
  8188. /*
  8189.  * Flags
  8190.  */
  8191. #define SPIF_UPDATEINIFILE    0x0001
  8192. #define SPIF_SENDWININICHANGE 0x0002
  8193. #define SPIF_SENDCHANGE       SPIF_SENDWININICHANGE
  8194.  
  8195.  
  8196. #define METRICS_USEDEFAULT -1
  8197. #ifdef _WINGDI_
  8198. #ifndef NOGDI
  8199. typedef struct tagNONCLIENTMETRICSA
  8200. {
  8201.     UINT    cbSize;
  8202.     int     iBorderWidth;
  8203.     int     iScrollWidth;
  8204.     int     iScrollHeight;
  8205.     int     iCaptionWidth;
  8206.     int     iCaptionHeight;
  8207.     LOGFONTA lfCaptionFont;
  8208.     int     iSmCaptionWidth;
  8209.     int     iSmCaptionHeight;
  8210.     LOGFONTA lfSmCaptionFont;
  8211.     int     iMenuWidth;
  8212.     int     iMenuHeight;
  8213.     LOGFONTA lfMenuFont;
  8214.     LOGFONTA lfStatusFont;
  8215.     LOGFONTA lfMessageFont;
  8216. }   NONCLIENTMETRICSA, *PNONCLIENTMETRICSA, FAR* LPNONCLIENTMETRICSA;
  8217. typedef struct tagNONCLIENTMETRICSW
  8218. {
  8219.     UINT    cbSize;
  8220.     int     iBorderWidth;
  8221.     int     iScrollWidth;
  8222.     int     iScrollHeight;
  8223.     int     iCaptionWidth;
  8224.     int     iCaptionHeight;
  8225.     LOGFONTW lfCaptionFont;
  8226.     int     iSmCaptionWidth;
  8227.     int     iSmCaptionHeight;
  8228.     LOGFONTW lfSmCaptionFont;
  8229.     int     iMenuWidth;
  8230.     int     iMenuHeight;
  8231.     LOGFONTW lfMenuFont;
  8232.     LOGFONTW lfStatusFont;
  8233.     LOGFONTW lfMessageFont;
  8234. }   NONCLIENTMETRICSW, *PNONCLIENTMETRICSW, FAR* LPNONCLIENTMETRICSW;
  8235. #ifdef UNICODE
  8236. typedef NONCLIENTMETRICSW NONCLIENTMETRICS;
  8237. typedef PNONCLIENTMETRICSW PNONCLIENTMETRICS;
  8238. typedef LPNONCLIENTMETRICSW LPNONCLIENTMETRICS;
  8239. #else
  8240. typedef NONCLIENTMETRICSA NONCLIENTMETRICS;
  8241. typedef PNONCLIENTMETRICSA PNONCLIENTMETRICS;
  8242. typedef LPNONCLIENTMETRICSA LPNONCLIENTMETRICS;
  8243. #endif // UNICODE
  8244. #endif /* NOGDI */
  8245. #endif /* _WINGDI_ */
  8246.  
  8247. #define ARW_BOTTOMLEFT              0x0000L
  8248. #define ARW_BOTTOMRIGHT             0x0001L
  8249. #define ARW_TOPLEFT                 0x0002L
  8250. #define ARW_TOPRIGHT                0x0003L
  8251. #define ARW_STARTMASK               0x0003L
  8252. #define ARW_STARTRIGHT              0x0001L
  8253. #define ARW_STARTTOP                0x0002L
  8254.  
  8255. #define ARW_LEFT                    0x0000L
  8256. #define ARW_RIGHT                   0x0000L
  8257. #define ARW_UP                      0x0004L
  8258. #define ARW_DOWN                    0x0004L
  8259. #define ARW_HIDE                    0x0008L
  8260. #define ARW_VALID                   0x000FL
  8261.  
  8262. typedef struct tagMINIMIZEDMETRICS
  8263. {
  8264.     UINT    cbSize;
  8265.     int     iWidth;
  8266.     int     iHorzGap;
  8267.     int     iVertGap;
  8268.     int     iArrange;
  8269. }   MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, *LPMINIMIZEDMETRICS;
  8270.  
  8271. #ifdef _WINGDI_
  8272. #ifndef NOGDI
  8273. typedef struct tagICONMETRICSA
  8274. {
  8275.     UINT    cbSize;
  8276.     int     iHorzSpacing;
  8277.     int     iVertSpacing;
  8278.     int     iTitleWrap;
  8279.     LOGFONTA lfFont;
  8280. }   ICONMETRICSA, *PICONMETRICSA, *LPICONMETRICSA;
  8281. typedef struct tagICONMETRICSW
  8282. {
  8283.     UINT    cbSize;
  8284.     int     iHorzSpacing;
  8285.     int     iVertSpacing;
  8286.     int     iTitleWrap;
  8287.     LOGFONTW lfFont;
  8288. }   ICONMETRICSW, *PICONMETRICSW, *LPICONMETRICSW;
  8289. #ifdef UNICODE
  8290. typedef ICONMETRICSW ICONMETRICS;
  8291. typedef PICONMETRICSW PICONMETRICS;
  8292. typedef LPICONMETRICSW LPICONMETRICS;
  8293. #else
  8294. typedef ICONMETRICSA ICONMETRICS;
  8295. typedef PICONMETRICSA PICONMETRICS;
  8296. typedef LPICONMETRICSA LPICONMETRICS;
  8297. #endif // UNICODE
  8298. #endif /* NOGDI */
  8299. #endif /* _WINGDI_ */
  8300.  
  8301. typedef struct tagANIMATIONINFO
  8302. {
  8303.     UINT    cbSize;
  8304.     int     iMinAnimate;
  8305. }   ANIMATIONINFO, *LPANIMATIONINFO;
  8306.  
  8307. typedef struct tagSERIALKEYSA
  8308. {
  8309.     UINT    cbSize;
  8310.     DWORD   dwFlags;
  8311.     LPSTR     lpszActivePort;
  8312.     LPSTR     lpszPort;
  8313.     UINT    iBaudRate;
  8314.     UINT    iPortState;
  8315.     UINT    iActive;
  8316. }   SERIALKEYSA, *LPSERIALKEYSA;
  8317. typedef struct tagSERIALKEYSW
  8318. {
  8319.     UINT    cbSize;
  8320.     DWORD   dwFlags;
  8321.     LPWSTR    lpszActivePort;
  8322.     LPWSTR    lpszPort;
  8323.     UINT    iBaudRate;
  8324.     UINT    iPortState;
  8325.     UINT    iActive;
  8326. }   SERIALKEYSW, *LPSERIALKEYSW;
  8327. #ifdef UNICODE
  8328. typedef SERIALKEYSW SERIALKEYS;
  8329. typedef LPSERIALKEYSW LPSERIALKEYS;
  8330. #else
  8331. typedef SERIALKEYSA SERIALKEYS;
  8332. typedef LPSERIALKEYSA LPSERIALKEYS;
  8333. #endif // UNICODE
  8334.  
  8335. /* flags for SERIALKEYS dwFlags field */
  8336. #define SERKF_SERIALKEYSON  0x00000001
  8337. #define SERKF_AVAILABLE     0x00000002
  8338. #define SERKF_INDICATOR     0x00000004
  8339.  
  8340.  
  8341. typedef struct tagHIGHCONTRASTA
  8342. {
  8343.     UINT    cbSize;
  8344.     DWORD   dwFlags;
  8345.     LPSTR   lpszDefaultScheme;
  8346. }   HIGHCONTRASTA, *LPHIGHCONTRASTA;
  8347. typedef struct tagHIGHCONTRASTW
  8348. {
  8349.     UINT    cbSize;
  8350.     DWORD   dwFlags;
  8351.     LPWSTR  lpszDefaultScheme;
  8352. }   HIGHCONTRASTW, *LPHIGHCONTRASTW;
  8353. #ifdef UNICODE
  8354. typedef HIGHCONTRASTW HIGHCONTRAST;
  8355. typedef LPHIGHCONTRASTW LPHIGHCONTRAST;
  8356. #else
  8357. typedef HIGHCONTRASTA HIGHCONTRAST;
  8358. typedef LPHIGHCONTRASTA LPHIGHCONTRAST;
  8359. #endif // UNICODE
  8360.  
  8361. /* flags for HIGHCONTRAST dwFlags field */
  8362. #define HCF_HIGHCONTRASTON  0x00000001
  8363. #define HCF_AVAILABLE       0x00000002
  8364. #define HCF_HOTKEYACTIVE    0x00000004
  8365. #define HCF_CONFIRMHOTKEY   0x00000008
  8366. #define HCF_HOTKEYSOUND     0x00000010
  8367. #define HCF_INDICATOR       0x00000020
  8368. #define HCF_HOTKEYAVAILABLE 0x00000040
  8369.  
  8370. /* Flags for ChangeDisplaySettings */
  8371. #define CDS_UPDATEREGISTRY  0x00000001
  8372. #define CDS_TEST            0x00000002
  8373. #define CDS_FULLSCREEN      0x00000004
  8374. #define CDS_GLOBAL          0x00000008
  8375. #define CDS_SET_PRIMARY     0x00000010
  8376. #define CDS_RESET           0x40000000
  8377. #define CDS_SETRECT         0x20000000
  8378. #define CDS_NORESET         0x10000000
  8379.  
  8380. /* Return values for ChangeDisplaySettings */
  8381. #define DISP_CHANGE_SUCCESSFUL       0
  8382. #define DISP_CHANGE_RESTART          1
  8383. #define DISP_CHANGE_FAILED          -1
  8384. #define DISP_CHANGE_BADMODE         -2
  8385. #define DISP_CHANGE_NOTUPDATED      -3
  8386. #define DISP_CHANGE_BADFLAGS        -4
  8387. #define DISP_CHANGE_BADPARAM        -5
  8388.  
  8389. #ifdef _WINGDI_
  8390. #ifndef NOGDI
  8391.  
  8392. WINUSERAPI
  8393. LONG
  8394. WINAPI
  8395. ChangeDisplaySettingsA(
  8396.     LPDEVMODEA  lpDevMode,
  8397.     DWORD       dwFlags);
  8398. WINUSERAPI
  8399. LONG
  8400. WINAPI
  8401. ChangeDisplaySettingsW(
  8402.     LPDEVMODEW  lpDevMode,
  8403.     DWORD       dwFlags);
  8404. #ifdef UNICODE
  8405. #define ChangeDisplaySettings  ChangeDisplaySettingsW
  8406. #else
  8407. #define ChangeDisplaySettings  ChangeDisplaySettingsA
  8408. #endif // !UNICODE
  8409.  
  8410. WINUSERAPI
  8411. LONG
  8412. WINAPI
  8413. ChangeDisplaySettingsExA(
  8414.     LPCSTR    lpszDeviceName,
  8415.     LPDEVMODEA  lpDevMode,
  8416.     HWND        hwnd,
  8417.     DWORD       dwflags,
  8418.     LPVOID      lParam);
  8419. WINUSERAPI
  8420. LONG
  8421. WINAPI
  8422. ChangeDisplaySettingsExW(
  8423.     LPCWSTR    lpszDeviceName,
  8424.     LPDEVMODEW  lpDevMode,
  8425.     HWND        hwnd,
  8426.     DWORD       dwflags,
  8427.     LPVOID      lParam);
  8428. #ifdef UNICODE
  8429. #define ChangeDisplaySettingsEx  ChangeDisplaySettingsExW
  8430. #else
  8431. #define ChangeDisplaySettingsEx  ChangeDisplaySettingsExA
  8432. #endif // !UNICODE
  8433.  
  8434. #define ENUM_CURRENT_SETTINGS       ((DWORD)-1)
  8435. #define ENUM_REGISTRY_SETTINGS      ((DWORD)-2)
  8436.  
  8437. WINUSERAPI
  8438. BOOL
  8439. WINAPI
  8440. EnumDisplaySettingsA(
  8441.     LPCSTR lpszDeviceName,
  8442.     DWORD iModeNum,
  8443.     LPDEVMODEA lpDevMode);
  8444. WINUSERAPI
  8445. BOOL
  8446. WINAPI
  8447. EnumDisplaySettingsW(
  8448.     LPCWSTR lpszDeviceName,
  8449.     DWORD iModeNum,
  8450.     LPDEVMODEW lpDevMode);
  8451. #ifdef UNICODE
  8452. #define EnumDisplaySettings  EnumDisplaySettingsW
  8453. #else
  8454. #define EnumDisplaySettings  EnumDisplaySettingsA
  8455. #endif // !UNICODE
  8456.  
  8457.  
  8458. #endif /* NOGDI */
  8459. #endif /* _WINGDI_ */
  8460.  
  8461.  
  8462. WINUSERAPI
  8463. BOOL
  8464. WINAPI
  8465. SystemParametersInfoA(
  8466.     UINT uiAction,
  8467.     UINT uiParam,
  8468.     PVOID pvParam,
  8469.     UINT fWinIni);
  8470. WINUSERAPI
  8471. BOOL
  8472. WINAPI
  8473. SystemParametersInfoW(
  8474.     UINT uiAction,
  8475.     UINT uiParam,
  8476.     PVOID pvParam,
  8477.     UINT fWinIni);
  8478. #ifdef UNICODE
  8479. #define SystemParametersInfo  SystemParametersInfoW
  8480. #else
  8481. #define SystemParametersInfo  SystemParametersInfoA
  8482. #endif // !UNICODE
  8483.  
  8484. #endif  /* !NOSYSPARAMSINFO  */
  8485.  
  8486. /*
  8487.  * Accessibility support
  8488.  */
  8489. typedef struct tagFILTERKEYS
  8490. {
  8491.     UINT  cbSize;
  8492.     DWORD dwFlags;
  8493.     DWORD iWaitMSec;            // Acceptance Delay
  8494.     DWORD iDelayMSec;           // Delay Until Repeat
  8495.     DWORD iRepeatMSec;          // Repeat Rate
  8496.     DWORD iBounceMSec;          // Debounce Time
  8497. } FILTERKEYS, *LPFILTERKEYS;
  8498.  
  8499. /*
  8500.  * FILTERKEYS dwFlags field
  8501.  */
  8502. #define FKF_FILTERKEYSON    0x00000001
  8503. #define FKF_AVAILABLE       0x00000002
  8504. #define FKF_HOTKEYACTIVE    0x00000004
  8505. #define FKF_CONFIRMHOTKEY   0x00000008
  8506. #define FKF_HOTKEYSOUND     0x00000010
  8507. #define FKF_INDICATOR       0x00000020
  8508. #define FKF_CLICKON         0x00000040
  8509.  
  8510. typedef struct tagSTICKYKEYS
  8511. {
  8512.     UINT  cbSize;
  8513.     DWORD dwFlags;
  8514. } STICKYKEYS, *LPSTICKYKEYS;
  8515.  
  8516. /*
  8517.  * STICKYKEYS dwFlags field
  8518.  */
  8519. #define SKF_STICKYKEYSON    0x00000001
  8520. #define SKF_AVAILABLE       0x00000002
  8521. #define SKF_HOTKEYACTIVE    0x00000004
  8522. #define SKF_CONFIRMHOTKEY   0x00000008
  8523. #define SKF_HOTKEYSOUND     0x00000010
  8524. #define SKF_INDICATOR       0x00000020
  8525. #define SKF_AUDIBLEFEEDBACK 0x00000040
  8526. #define SKF_TRISTATE        0x00000080
  8527. #define SKF_TWOKEYSOFF      0x00000100
  8528.  
  8529. typedef struct tagMOUSEKEYS
  8530. {
  8531.     UINT cbSize;
  8532.     DWORD dwFlags;
  8533.     DWORD iMaxSpeed;
  8534.     DWORD iTimeToMaxSpeed;
  8535.     DWORD iCtrlSpeed;
  8536.     DWORD dwReserved1;
  8537.     DWORD dwReserved2;
  8538. } MOUSEKEYS, *LPMOUSEKEYS;
  8539.  
  8540. /*
  8541.  * MOUSEKEYS dwFlags field
  8542.  */
  8543. #define MKF_MOUSEKEYSON     0x00000001
  8544. #define MKF_AVAILABLE       0x00000002
  8545. #define MKF_HOTKEYACTIVE    0x00000004
  8546. #define MKF_CONFIRMHOTKEY   0x00000008
  8547. #define MKF_HOTKEYSOUND     0x00000010
  8548. #define MKF_INDICATOR       0x00000020
  8549. #define MKF_MODIFIERS       0x00000040
  8550. #define MKF_REPLACENUMBERS  0x00000080
  8551.  
  8552. typedef struct tagACCESSTIMEOUT
  8553. {
  8554.     UINT  cbSize;
  8555.     DWORD dwFlags;
  8556.     DWORD iTimeOutMSec;
  8557. } ACCESSTIMEOUT, *LPACCESSTIMEOUT;
  8558.  
  8559. /*
  8560.  * ACCESSTIMEOUT dwFlags field
  8561.  */
  8562. #define ATF_TIMEOUTON       0x00000001
  8563. #define ATF_ONOFFFEEDBACK   0x00000002
  8564.  
  8565. /* values for SOUNDSENTRY iFSGrafEffect field */
  8566. #define SSGF_NONE       0
  8567. #define SSGF_DISPLAY    3
  8568.  
  8569. /* values for SOUNDSENTRY iFSTextEffect field */
  8570. #define SSTF_NONE       0
  8571. #define SSTF_CHARS      1
  8572. #define SSTF_BORDER     2
  8573. #define SSTF_DISPLAY    3
  8574.  
  8575. /* values for SOUNDSENTRY iWindowsEffect field */
  8576. #define SSWF_NONE     0
  8577. #define SSWF_TITLE    1
  8578. #define SSWF_WINDOW   2
  8579. #define SSWF_DISPLAY  3
  8580. #define SSWF_CUSTOM   4
  8581.  
  8582. typedef struct tagSOUNDSENTRYA
  8583. {
  8584.     UINT cbSize;
  8585.     DWORD dwFlags;
  8586.     DWORD iFSTextEffect;
  8587.     DWORD iFSTextEffectMSec;
  8588.     DWORD iFSTextEffectColorBits;
  8589.     DWORD iFSGrafEffect;
  8590.     DWORD iFSGrafEffectMSec;
  8591.     DWORD iFSGrafEffectColor;
  8592.     DWORD iWindowsEffect;
  8593.     DWORD iWindowsEffectMSec;
  8594.     LPSTR   lpszWindowsEffectDLL;
  8595.     DWORD iWindowsEffectOrdinal;
  8596. } SOUNDSENTRYA, *LPSOUNDSENTRYA;
  8597. typedef struct tagSOUNDSENTRYW
  8598. {
  8599.     UINT cbSize;
  8600.     DWORD dwFlags;
  8601.     DWORD iFSTextEffect;
  8602.     DWORD iFSTextEffectMSec;
  8603.     DWORD iFSTextEffectColorBits;
  8604.     DWORD iFSGrafEffect;
  8605.     DWORD iFSGrafEffectMSec;
  8606.     DWORD iFSGrafEffectColor;
  8607.     DWORD iWindowsEffect;
  8608.     DWORD iWindowsEffectMSec;
  8609.     LPWSTR  lpszWindowsEffectDLL;
  8610.     DWORD iWindowsEffectOrdinal;
  8611. } SOUNDSENTRYW, *LPSOUNDSENTRYW;
  8612. #ifdef UNICODE
  8613. typedef SOUNDSENTRYW SOUNDSENTRY;
  8614. typedef LPSOUNDSENTRYW LPSOUNDSENTRY;
  8615. #else
  8616. typedef SOUNDSENTRYA SOUNDSENTRY;
  8617. typedef LPSOUNDSENTRYA LPSOUNDSENTRY;
  8618. #endif // UNICODE
  8619.  
  8620. /*
  8621.  * SOUNDSENTRY dwFlags field
  8622.  */
  8623. #define SSF_SOUNDSENTRYON   0x00000001
  8624. #define SSF_AVAILABLE       0x00000002
  8625. #define SSF_INDICATOR       0x00000004
  8626.  
  8627. typedef struct tagTOGGLEKEYS
  8628. {
  8629.     UINT cbSize;
  8630.     DWORD dwFlags;
  8631. } TOGGLEKEYS, *LPTOGGLEKEYS;
  8632.  
  8633. /*
  8634.  * TOGGLEKEYS dwFlags field
  8635.  */
  8636. #define TKF_TOGGLEKEYSON    0x00000001
  8637. #define TKF_AVAILABLE       0x00000002
  8638. #define TKF_HOTKEYACTIVE    0x00000004
  8639. #define TKF_CONFIRMHOTKEY   0x00000008
  8640. #define TKF_HOTKEYSOUND     0x00000010
  8641. #define TKF_INDICATOR       0x00000020
  8642.  
  8643.  
  8644.  
  8645.  
  8646. /*
  8647.  * Set debug level
  8648.  */
  8649.  
  8650. WINUSERAPI
  8651. VOID
  8652. WINAPI
  8653. SetDebugErrorLevel(
  8654.     DWORD dwLevel
  8655.     );
  8656.  
  8657. /*
  8658.  * SetLastErrorEx() types.
  8659.  */
  8660.  
  8661. #define SLE_ERROR       0x00000001
  8662. #define SLE_MINORERROR  0x00000002
  8663. #define SLE_WARNING     0x00000003
  8664.  
  8665. WINUSERAPI
  8666. VOID
  8667. WINAPI
  8668. SetLastErrorEx(
  8669.     DWORD dwErrCode,
  8670.     DWORD dwType
  8671.     );
  8672.  
  8673.  
  8674. #ifdef __cplusplus
  8675. }
  8676. #endif  /* __cplusplus */
  8677.  
  8678. #endif /* !_WINUSER_ */
  8679.