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