home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / WINUSER.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  188KB  |  8,344 lines

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