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