home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / WINUSER.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  119.8 KB  |  5,727 lines

  1. /*++ BUILD Version: 0003    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1985-91, Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     winuser.h
  8.  
  9. Abstract:
  10.  
  11.     Procedure declarations, constant definitions and macros for the User
  12.     component.
  13.  
  14. --*/
  15.  
  16. #ifndef __WINUSER_H
  17. #define __WINUSER_H
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif /* __cplusplus */
  22.  
  23. #ifndef WINVER
  24. #define WINVER  0x0314      // version 3.2
  25. #endif /* !WINVER */
  26.  
  27. #ifndef __WINBASE_H
  28. #include <winbase.h>
  29. #endif
  30.  
  31. #ifndef __STDARG_H
  32. #include "stdarg.h"
  33. #endif
  34.  
  35. #ifndef NOUSER
  36.  
  37. typedef HANDLE HDWP;
  38. typedef VOID MENUTEMPLATEA;
  39. typedef VOID MENUTEMPLATEW;
  40. #ifdef UNICODE
  41. typedef MENUTEMPLATEW MENUTEMPLATE;
  42. #else
  43. typedef MENUTEMPLATEA MENUTEMPLATE;
  44. #endif // UNICODE
  45. typedef PVOID LPMENUTEMPLATEA;
  46. typedef PVOID LPMENUTEMPLATEW;
  47. #ifdef UNICODE
  48. typedef LPMENUTEMPLATEW LPMENUTEMPLATE;
  49. #else
  50. typedef LPMENUTEMPLATEA LPMENUTEMPLATE;
  51. #endif // UNICODE
  52.  
  53. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  54.  
  55. #ifdef STRICT
  56.  
  57. typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  58. typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD);
  59. typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int);
  60. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  61. typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  62. typedef VOID (CALLBACK* SENDASYNCPROC)(HWND, UINT, DWORD, LRESULT);
  63.  
  64. typedef BOOL (CALLBACK* PROPENUMPROCA)(HWND, LPCSTR, HANDLE);
  65. typedef BOOL (CALLBACK* PROPENUMPROCW)(HWND, LPCWSTR, HANDLE);
  66.  
  67. typedef BOOL (CALLBACK* PROPENUMPROCEXA)(HWND, LPSTR, HANDLE, DWORD);
  68. typedef BOOL (CALLBACK* PROPENUMPROCEXW)(HWND, LPWSTR, HANDLE, DWORD);
  69.  
  70. typedef int (CALLBACK* EDITWORDBREAKPROCA)(LPSTR lpch, int ichCurrent, int cch, int code);
  71. typedef int (CALLBACK* EDITWORDBREAKPROCW)(LPWSTR lpch, int ichCurrent, int cch, int code);
  72.  
  73. #else /* !STRICT */
  74.  
  75. typedef FARPROC DLGPROC;
  76. typedef FARPROC TIMERPROC;
  77. typedef FARPROC GRAYSTRINGPROC;
  78. typedef FARPROC WNDENUMPROC;
  79. typedef FARPROC HOOKPROC;
  80. typedef FARPROC SENDASYNCPROC;
  81.  
  82. typedef FARPROC EDITWORDBREAKPROCA;
  83. typedef FARPROC EDITWORDBREAKPROCW;
  84.  
  85. typedef FARPROC PROPENUMPROCA;
  86. typedef FARPROC PROPENUMPROCW;
  87.  
  88. typedef FARPROC PROPENUMPROCEXA;
  89. typedef FARPROC PROPENUMPROCEXW;
  90.  
  91. #endif /* !STRICT */
  92.  
  93. #ifdef UNICODE
  94. typedef PROPENUMPROCW        PROPENUMPROC;
  95. typedef PROPENUMPROCEXW      PROPENUMPROCEX;
  96. typedef EDITWORDBREAKPROCW   EDITWORDBREAKPROC;
  97. #else  /* !UNICODE */
  98. typedef PROPENUMPROCA        PROPENUMPROC;
  99. typedef PROPENUMPROCEXA      PROPENUMPROCEX;
  100. typedef EDITWORDBREAKPROCA   EDITWORDBREAKPROC;
  101. #endif /* UNICODE */
  102.  
  103. #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i)))
  104. #define MAKEINTRESOURCEW(i) (LPWSTR)((DWORD)((WORD)(i)))
  105. #ifdef UNICODE
  106. #define MAKEINTRESOURCE  MAKEINTRESOURCEW
  107. #else
  108. #define MAKEINTRESOURCE  MAKEINTRESOURCEA
  109. #endif // !UNICODE
  110.  
  111. #ifndef NORESOURCE
  112.  
  113. /*
  114.  * Predefined Resource Types
  115.  */
  116. #define RT_CURSOR           MAKEINTRESOURCE(1)
  117. #define RT_BITMAP           MAKEINTRESOURCE(2)
  118. #define RT_ICON             MAKEINTRESOURCE(3)
  119. #define RT_MENU             MAKEINTRESOURCE(4)
  120. #define RT_DIALOG           MAKEINTRESOURCE(5)
  121. #define RT_STRING           MAKEINTRESOURCE(6)
  122. #define RT_FONTDIR          MAKEINTRESOURCE(7)
  123. #define RT_FONT             MAKEINTRESOURCE(8)
  124. #define RT_ACCELERATOR      MAKEINTRESOURCE(9)
  125. #define RT_RCDATA           MAKEINTRESOURCE(10)
  126. #define RT_MESSAGETABLE     MAKEINTRESOURCE(11)
  127.  
  128. #define DIFFERENCE          11
  129. #define RT_GROUP_CURSOR     MAKEINTRESOURCE((DWORD)RT_CURSOR + DIFFERENCE)
  130. #define RT_GROUP_ICON       MAKEINTRESOURCE((DWORD)RT_ICON + DIFFERENCE)
  131. #define RT_VERSION          MAKEINTRESOURCE(16)
  132. #define RT_DLGINCLUDE       MAKEINTRESOURCE(17)
  133.  
  134. #endif /* !NORESOURCE */
  135.  
  136. int WINAPI wvsprintfA(LPSTR, LPCSTR, va_list arglist);
  137. int WINAPI wvsprintfW(LPWSTR, LPCWSTR, va_list arglist);
  138. #ifdef UNICODE
  139. #define wvsprintf  wvsprintfW
  140. #else
  141. #define wvsprintf  wvsprintfA
  142. #endif // !UNICODE
  143. int WINAPI wsprintfA(LPSTR, LPCSTR, ...);
  144. int WINAPI wsprintfW(LPWSTR, LPCWSTR, ...);
  145. #ifdef UNICODE
  146. #define wsprintf  wsprintfW
  147. #else
  148. #define wsprintf  wsprintfA
  149. #endif // !UNICODE
  150.  
  151. #ifndef NOSCROLL
  152.  
  153. /*
  154.  * Scroll Bar Constants
  155.  */
  156. #define SB_HORZ             0
  157. #define SB_VERT             1
  158. #define SB_CTL              2
  159. #define SB_BOTH             3
  160.  
  161. /*
  162.  * Scroll Bar Commands
  163.  */
  164. #define SB_LINEUP           0
  165. #define SB_LINELEFT         0
  166. #define SB_LINEDOWN         1
  167. #define SB_LINERIGHT        1
  168. #define SB_PAGEUP           2
  169. #define SB_PAGELEFT         2
  170. #define SB_PAGEDOWN         3
  171. #define SB_PAGERIGHT        3
  172. #define SB_THUMBPOSITION    4
  173. #define SB_THUMBTRACK       5
  174. #define SB_TOP              6
  175. #define SB_LEFT             6
  176. #define SB_BOTTOM           7
  177. #define SB_RIGHT            7
  178. #define SB_ENDSCROLL        8
  179.  
  180. #endif /* !NOSCROLL */
  181.  
  182. #ifndef NOSHOWWINDOW
  183.  
  184. /*
  185.  * ShowWindow() Commands
  186.  */
  187. #define SW_HIDE             0
  188. #define SW_SHOWNORMAL       1
  189. #define SW_NORMAL           1
  190. #define SW_SHOWMINIMIZED    2
  191. #define SW_SHOWMAXIMIZED    3
  192. #define SW_MAXIMIZE         3
  193. #define SW_SHOWNOACTIVATE   4
  194. #define SW_SHOW             5
  195. #define SW_MINIMIZE         6
  196. #define SW_SHOWMINNOACTIVE  7
  197. #define SW_SHOWNA           8
  198. #define SW_RESTORE          9
  199. #define SW_SHOWDEFAULT      10
  200. #define SW_MAX              10
  201.  
  202. /*
  203.  * Old ShowWindow() Commands
  204.  */
  205. #define HIDE_WINDOW         0
  206. #define SHOW_OPENWINDOW     1
  207. #define SHOW_ICONWINDOW     2
  208. #define SHOW_FULLSCREEN     3
  209. #define SHOW_OPENNOACTIVATE 4
  210.  
  211. /*
  212.  * Identifiers for the WM_SHOWWINDOW message
  213.  */
  214. #define SW_PARENTCLOSING    1
  215. #define SW_OTHERZOOM        2
  216. #define SW_PARENTOPENING    3
  217. #define SW_OTHERUNZOOM      4
  218.  
  219. #endif /* !NOSHOWWINDOW */
  220.  
  221. /*
  222.  * WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
  223.  */
  224. #define KF_EXTENDED         0x0100
  225. #define KF_DLGMODE          0x0800
  226. #define KF_MENUMODE         0x1000
  227. #define KF_ALTDOWN          0x2000
  228. #define KF_REPEAT           0x4000
  229. #define KF_UP               0x8000
  230.  
  231. #ifndef NOVIRTUALKEYCODES
  232.  
  233. /*
  234.  * Virtual Keys, Standard Set
  235.  */
  236. #define VK_LBUTTON        0x01
  237. #define VK_RBUTTON        0x02
  238. #define VK_CANCEL         0x03
  239. #define VK_MBUTTON        0x04    /* NOT contiguous with L & RBUTTON */
  240.  
  241. #define VK_BACK           0x08
  242. #define VK_TAB            0x09
  243.  
  244. #define VK_CLEAR          0x0C
  245. #define VK_RETURN         0x0D
  246.  
  247. #define VK_SHIFT          0x10
  248. #define VK_CONTROL        0x11
  249. #define VK_MENU           0x12
  250. #define VK_PAUSE          0x13
  251. #define VK_CAPITAL        0x14
  252.  
  253. #define VK_ESCAPE         0x1B
  254.  
  255. #define VK_SPACE          0x20
  256. #define VK_PRIOR          0x21
  257. #define VK_NEXT           0x22
  258. #define VK_END            0x23
  259. #define VK_HOME           0x24
  260. #define VK_LEFT           0x25
  261. #define VK_UP             0x26
  262. #define VK_RIGHT          0x27
  263. #define VK_DOWN           0x28
  264. #define VK_SELECT         0x29
  265. #define VK_PRINT          0x2A
  266. #define VK_EXECUTE        0x2B
  267. #define VK_SNAPSHOT       0x2C
  268. #define VK_INSERT         0x2D
  269. #define VK_DELETE         0x2E
  270. #define VK_HELP           0x2F
  271.  
  272. /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
  273. /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
  274.  
  275. #define VK_NUMPAD0        0x60
  276. #define VK_NUMPAD1        0x61
  277. #define VK_NUMPAD2        0x62
  278. #define VK_NUMPAD3        0x63
  279. #define VK_NUMPAD4        0x64
  280. #define VK_NUMPAD5        0x65
  281. #define VK_NUMPAD6        0x66
  282. #define VK_NUMPAD7        0x67
  283. #define VK_NUMPAD8        0x68
  284. #define VK_NUMPAD9        0x69
  285. #define VK_MULTIPLY       0x6A
  286. #define VK_ADD            0x6B
  287. #define VK_SEPARATOR      0x6C
  288. #define VK_SUBTRACT       0x6D
  289. #define VK_DECIMAL        0x6E
  290. #define VK_DIVIDE         0x6F
  291. #define VK_F1             0x70
  292. #define VK_F2             0x71
  293. #define VK_F3             0x72
  294. #define VK_F4             0x73
  295. #define VK_F5             0x74
  296. #define VK_F6             0x75
  297. #define VK_F7             0x76
  298. #define VK_F8             0x77
  299. #define VK_F9             0x78
  300. #define VK_F10            0x79
  301. #define VK_F11            0x7A
  302. #define VK_F12            0x7B
  303. #define VK_F13            0x7C
  304. #define VK_F14            0x7D
  305. #define VK_F15            0x7E
  306. #define VK_F16            0x7F
  307. #define VK_F17            0x80
  308. #define VK_F18            0x81
  309. #define VK_F19            0x82
  310. #define VK_F20            0x83
  311. #define VK_F21            0x84
  312. #define VK_F22            0x85
  313. #define VK_F23            0x86
  314. #define VK_F24            0x87
  315.  
  316. #define VK_NUMLOCK        0x90
  317. #define VK_SCROLL           0x91
  318.  
  319. /*
  320.  * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  321.  * Used only as parameters to GetAsyncKeyState() and GetKeyState().
  322.  * No other API or message will distinguish left and right keys in this way.
  323.  */
  324. #define VK_LSHIFT         0xA0
  325. #define VK_RSHIFT         0xA1
  326. #define VK_LCONTROL       0xA2
  327. #define VK_RCONTROL       0xA3
  328. #define VK_LMENU          0xA4
  329. #define VK_RMENU          0xA5
  330.  
  331. #define VK_ATTN           0xF6
  332. #define VK_CRSEL          0xF7
  333. #define VK_EXSEL          0xF8
  334. #define VK_EREOF          0xF9
  335. #define VK_PLAY           0xFA
  336. #define VK_ZOOM           0xFB
  337. #define VK_NONAME         0xFC
  338. #define VK_PA1            0xFD
  339. #define VK_OEM_CLEAR      0xFE
  340.  
  341. #endif /* !NOVIRTUALKEYCODES */
  342.  
  343. #ifndef NOWH
  344.  
  345. /*
  346.  * SetWindowsHook() codes
  347.  */
  348. #define WH_MIN              (-1)
  349. #define WH_MSGFILTER        (-1)
  350. #define WH_JOURNALRECORD    0
  351. #define WH_JOURNALPLAYBACK  1
  352. #define WH_KEYBOARD         2
  353. #define WH_GETMESSAGE       3
  354. #define WH_CALLWNDPROC      4
  355. #define WH_CBT              5
  356. #define WH_SYSMSGFILTER     6
  357. #define WH_MOUSE            7
  358. #define WH_HARDWARE         8
  359. #define WH_DEBUG            9
  360. #define WH_SHELL           10
  361. #define WH_FOREGROUNDIDLE  11
  362. #define WH_MAX             11
  363.  
  364. /*
  365.  * Hook Codes
  366.  */
  367. #define HC_ACTION           0
  368. #define HC_GETNEXT          1
  369. #define HC_SKIP             2
  370. #define HC_NOREMOVE         3
  371. #define HC_NOREM            HC_NOREMOVE
  372. #define HC_SYSMODALON       4
  373. #define HC_SYSMODALOFF      5
  374.  
  375. /*
  376.  * CBT Hook Codes
  377.  */
  378. #define HCBT_MOVESIZE       0
  379. #define HCBT_MINMAX         1
  380. #define HCBT_QS             2
  381. #define HCBT_CREATEWND      3
  382. #define HCBT_DESTROYWND     4
  383. #define HCBT_ACTIVATE       5
  384. #define HCBT_CLICKSKIPPED   6
  385. #define HCBT_KEYSKIPPED     7
  386. #define HCBT_SYSCOMMAND     8
  387. #define HCBT_SETFOCUS       9
  388.  
  389. /*
  390.  * HCBT_CREATEWND parameters pointed to by lParam
  391.  */
  392. typedef struct tagCBT_CREATEWNDA
  393. {
  394.     struct tagCREATESTRUCTA *lpcs;
  395.     HWND           hwndInsertAfter;
  396. } CBT_CREATEWNDA, *LPCBT_CREATEWNDA;
  397. /*
  398.  * HCBT_CREATEWND parameters pointed to by lParam
  399.  */
  400. typedef struct tagCBT_CREATEWNDW
  401. {
  402.     struct tagCREATESTRUCTW *lpcs;
  403.     HWND           hwndInsertAfter;
  404. } CBT_CREATEWNDW, *LPCBT_CREATEWNDW;
  405. #ifdef UNICODE
  406. typedef CBT_CREATEWNDW CBT_CREATEWND;
  407. typedef LPCBT_CREATEWNDW LPCBT_CREATEWND;
  408. #else
  409. typedef CBT_CREATEWNDA CBT_CREATEWND;
  410. typedef LPCBT_CREATEWNDA LPCBT_CREATEWND;
  411. #endif // UNICODE
  412.  
  413. /*
  414.  * HCBT_ACTIVATE structure pointed to by lParam
  415.  */
  416. typedef struct tagCBTACTIVATESTRUCT
  417. {
  418.     BOOL    fMouse;
  419.     HWND    hWndActive;
  420. } CBTACTIVATESTRUCT, *LPCBTACTIVATESTRUCT;
  421.  
  422. /*
  423.  * WH_MSGFILTER Filter Proc Codes
  424.  */
  425. #define MSGF_DIALOGBOX      0
  426. #define MSGF_MESSAGEBOX     1
  427. #define MSGF_MENU           2
  428. #define MSGF_MOVE           3
  429. #define MSGF_SIZE           4
  430. #define MSGF_SCROLLBAR      5
  431. #define MSGF_NEXTWINDOW     6
  432. #define MSGF_MAINLOOP       8
  433. #define MSGF_MAX            8
  434. #define MSGF_USER           4096
  435.  
  436. /*
  437.  * Shell support
  438.  */
  439. #define HSHELL_WINDOWCREATED       1
  440. #define HSHELL_WINDOWDESTROYED     2
  441. #define HSHELL_ACTIVATESHELLWINDOW 3
  442.  
  443. /*
  444.  * Message Structure used in Journaling
  445.  */
  446. typedef struct tagEVENTMSG {
  447.     UINT    message;
  448.     UINT    paramL;
  449.     UINT    paramH;
  450.     DWORD    time;
  451.     HWND     hwnd;
  452. } EVENTMSG, *PEVENTMSGMSG, NEAR *NPEVENTMSGMSG, FAR *LPEVENTMSGMSG;
  453.  
  454. typedef struct tagEVENTMSG *PEVENTMSG, NEAR *NPEVENTMSG, FAR *LPEVENTMSG;
  455.  
  456. /*
  457.  * Message structure used by WH_CALLWNDPROC
  458.  */
  459. typedef struct tagCWPSTRUCT {
  460.     LPARAM  lParam;
  461.     WPARAM  wParam;
  462.     DWORD   message;
  463.     HWND    hwnd;
  464. } CWPSTRUCT, *PCWPSTRUCT, NEAR *NPCWPSTRUCT, FAR *LPCWPSTRUCT;
  465.  
  466. /*
  467.  * Structure used by WH_DEBUG
  468.  */
  469. typedef struct tagDEBUGHOOKINFO
  470. {
  471.     DWORD   idThread;
  472.     LPARAM  reserved;
  473.     LPARAM  lParam;
  474.     WPARAM  wParam;
  475.     int     code;
  476. } DEBUGHOOKINFO, *PDEBUGHOOKINFO, NEAR *NPDEBUGHOOKINFO, FAR* LPDEBUGHOOKINFO;
  477.  
  478. typedef struct tagMOUSEHOOKSTRUCT {
  479.     POINT   pt;
  480.     HWND    hwnd;
  481.     UINT    wHitTestCode;
  482.     DWORD   dwExtraInfo;
  483. } MOUSEHOOKSTRUCT, FAR *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
  484. #endif /* !NOWH */
  485.  
  486. /*
  487.  * Keyboard Layout API
  488.  */
  489. #define HKL_PREV            0
  490. #define HKL_NEXT            1
  491.  
  492. #define KLF_ACTIVATE        0x00000001
  493. #define KLF_SUBSTITUTE_OK   0x00000002
  494. #define KLF_UNLOADPREVIOUS  0x00000004
  495. #define KLF_REORDER         0x00000008
  496.  
  497. /*
  498.  * Size of KeyboardLayoutName (number of characters), including nul terminator
  499.  */
  500. #define KL_NAMELENGTH       9
  501.  
  502. HKL WINAPI LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags);
  503. HKL WINAPI LoadKeyboardLayoutW(LPCWSTR pwszKLID, UINT Flags);
  504. #ifdef UNICODE
  505. #define LoadKeyboardLayout  LoadKeyboardLayoutW
  506. #else
  507. #define LoadKeyboardLayout  LoadKeyboardLayoutA
  508. #endif // !UNICODE
  509. BOOL WINAPI ActivateKeyboardLayout(HKL hkl, UINT Flags);
  510. BOOL WINAPI UnloadKeyboardLayout(HKL hkl);
  511. BOOL WINAPI GetKeyboardLayoutNameA(LPSTR pwszKLID);
  512. BOOL WINAPI GetKeyboardLayoutNameW(LPWSTR pwszKLID);
  513. #ifdef UNICODE
  514. #define GetKeyboardLayoutName  GetKeyboardLayoutNameW
  515. #else
  516. #define GetKeyboardLayoutName  GetKeyboardLayoutNameA
  517. #endif // !UNICODE
  518.  
  519. #ifndef NODESKTOP
  520. /*
  521.  * Desktop-specific access flags
  522.  */
  523. #define DESKTOP_READOBJECTS         0x0001L
  524. #define DESKTOP_CREATEWINDOW        0x0002L
  525. #define DESKTOP_CREATEMENU          0x0004L
  526. #define DESKTOP_HOOKCONTROL         0x0008L
  527. #define DESKTOP_JOURNALRECORD       0x0010L
  528. #define DESKTOP_JOURNALPLAYBACK     0x0020L
  529. #define DESKTOP_ENUMERATE           0x0040L
  530. #define DESKTOP_WRITEOBJECTS        0x0080L
  531.  
  532. HDESK
  533. WINAPI
  534. GetThreadDesktop(
  535.     DWORD);
  536.  
  537. #endif  /* !NODESKTOP */
  538.  
  539. #ifndef NOWINDOWSTATION
  540. /*
  541.  * Windowstation-specific access flags
  542.  */
  543. #define WINSTA_ENUMDESKTOPS         0x0001L
  544. #define WINSTA_READATTRIBUTES       0x0002L
  545. #define WINSTA_ACCESSCLIPBOARD      0x0004L
  546. #define WINSTA_CREATEDESKTOP        0x0008L
  547. #define WINSTA_WRITEATTRIBUTES      0x0010L
  548. #define WINSTA_ACCESSGLOBALATOMS    0x0020L
  549. #define WINSTA_EXITWINDOWS          0x0040L
  550. #define WINSTA_ENUMERATE            0x0100L
  551. #define WINSTA_READSCREEN           0x0200L
  552.  
  553. HWINSTA
  554. WINAPI
  555. GetProcessWindowStation(
  556.     VOID);
  557. #endif  /* !NOWINDOWSTATION */
  558.  
  559. #ifndef NOSECURITY
  560.  
  561. BOOL
  562. WINAPI
  563. SetUserObjectSecurity(
  564.     HANDLE hObj,
  565.     PSECURITY_INFORMATION pSIRequested,
  566.     PSECURITY_DESCRIPTOR pSID);
  567.  
  568. BOOL
  569. WINAPI
  570. GetUserObjectSecurity(
  571.     HANDLE hObj,
  572.     PSECURITY_INFORMATION pSIRequested,
  573.     PSECURITY_DESCRIPTOR pSID,
  574.     DWORD nLength,
  575.     LPDWORD lpnLengthNeeded);
  576.  
  577. #endif  /* !NOSECURITY */
  578.  
  579. typedef struct tagWNDCLASSA {
  580.     UINT        style;
  581.     WNDPROC     lpfnWndProc;
  582.     int         cbClsExtra;
  583.     int         cbWndExtra;
  584.     HINSTANCE   hInstance;
  585.     HICON       hIcon;
  586.     HCURSOR     hCursor;
  587.     HBRUSH      hbrBackground;
  588.     LPCSTR      lpszMenuName;
  589.     LPCSTR      lpszClassName;
  590. } WNDCLASSA, *PWNDCLASSA, NEAR *NPWNDCLASSA, FAR *LPWNDCLASSA;
  591. typedef struct tagWNDCLASSW {
  592.     UINT        style;
  593.     WNDPROC     lpfnWndProc;
  594.     int         cbClsExtra;
  595.     int         cbWndExtra;
  596.     HINSTANCE   hInstance;
  597.     HICON       hIcon;
  598.     HCURSOR     hCursor;
  599.     HBRUSH      hbrBackground;
  600.     LPCWSTR     lpszMenuName;
  601.     LPCWSTR     lpszClassName;
  602. } WNDCLASSW, *PWNDCLASSW, NEAR *NPWNDCLASSW, FAR *LPWNDCLASSW;
  603. #ifdef UNICODE
  604. typedef WNDCLASSW WNDCLASS;
  605. typedef PWNDCLASSW PWNDCLASS;
  606. typedef NPWNDCLASSW NPWNDCLASS;
  607. typedef LPWNDCLASSW LPWNDCLASS;
  608. #else
  609. typedef WNDCLASSA WNDCLASS;
  610. typedef PWNDCLASSA PWNDCLASS;
  611. typedef NPWNDCLASSA NPWNDCLASS;
  612. typedef LPWNDCLASSA LPWNDCLASS;
  613. #endif // UNICODE
  614.  
  615.  
  616. #ifndef NOMSG
  617.  
  618. /*
  619.  * Message structure
  620.  */
  621. typedef struct tagMSG {
  622.     HWND        hwnd;
  623.     UINT        message;
  624.     WPARAM      wParam;
  625.     LPARAM      lParam;
  626.     DWORD       time;
  627.     POINT       pt;
  628. } MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
  629.  
  630. #define POINTSTOPOINT(pt,pts)  {(pt).x = (SHORT)LOWORD(pts); \
  631.                                 (pt).y = (SHORT)HIWORD(pts);}
  632. #define POINTTOPOINTS(pt)      (MAKELONG((short)((pt).x), (short)((pt).y)))
  633. #define MAKEWPARAM(l, h)      (WPARAM)MAKELONG(l, h)
  634. #define MAKELPARAM(l, h)      (LPARAM)MAKELONG(l, h)
  635. #define MAKELRESULT(l, h)     (LRESULT)MAKELONG(l, h)
  636.  
  637.  
  638. #endif /* !NOMSG */
  639.  
  640. #ifndef NOWINOFFSETS
  641.  
  642. /*
  643.  * Window field offsets for GetWindowLong()
  644.  */
  645. #define GWL_WNDPROC         (-4)
  646. #define GWL_HINSTANCE       (-6)
  647. #define GWL_HWNDPARENT      (-8)
  648. #define GWL_STYLE           (-16)
  649. #define GWL_EXSTYLE         (-20)
  650. #define GWL_USERDATA        (-21)
  651. #define GWL_ID              (-12)
  652.  
  653. /*
  654.  * Class field offsets for GetClassLong()
  655.  */
  656. #define GCL_MENUNAME        (-8)
  657. #define GCL_HBRBACKGROUND   (-10)
  658. #define GCL_HCURSOR         (-12)
  659. #define GCL_HICON           (-14)
  660. #define GCL_HMODULE         (-16)
  661. #define GCL_CBWNDEXTRA      (-18)
  662. #define GCL_CBCLSEXTRA      (-20)
  663. #define GCL_WNDPROC         (-24)
  664. #define GCL_STYLE           (-26)
  665. #define GCW_ATOM            (-32)
  666.  
  667. #endif /* !NOWINOFFSETS */
  668.  
  669. #ifndef NOWINMESSAGES
  670.  
  671. /*
  672.  * Window Messages
  673.  */
  674.  
  675. #define WM_NULL                         0x0000
  676. #define WM_CREATE                       0x0001
  677. #define WM_DESTROY                      0x0002
  678. #define WM_MOVE                         0x0003
  679. #define WM_SIZE                         0x0005
  680.  
  681. #define WM_ACTIVATE                     0x0006
  682. /*
  683.  * WM_ACTIVATE state values
  684.  */
  685. #define     WA_INACTIVE     0
  686. #define     WA_ACTIVE       1
  687. #define     WA_CLICKACTIVE  2
  688.  
  689. #define WM_SETFOCUS                     0x0007
  690. #define WM_KILLFOCUS                    0x0008
  691. #define WM_ENABLE                       0x000A
  692. #define WM_SETREDRAW                    0x000B
  693. #define WM_SETTEXT                      0x000C
  694. #define WM_GETTEXT                      0x000D
  695. #define WM_GETTEXTLENGTH                0x000E
  696. #define WM_PAINT                        0x000F
  697. #define WM_CLOSE                        0x0010
  698. #define WM_QUERYENDSESSION              0x0011
  699. #define WM_QUIT                         0x0012
  700. #define WM_QUERYOPEN                    0x0013
  701. #define WM_ERASEBKGND                   0x0014
  702. #define WM_SYSCOLORCHANGE               0x0015
  703. #define WM_ENDSESSION                   0x0016
  704. #define WM_SHOWWINDOW                   0x0018
  705. #define WM_WININICHANGE                 0x001A
  706. #define WM_DEVMODECHANGE                0x001B
  707. #define WM_ACTIVATEAPP                  0x001C
  708. #define WM_FONTCHANGE                   0x001D
  709. #define WM_TIMECHANGE                   0x001E
  710. #define WM_CANCELMODE                   0x001F
  711. #define WM_SETCURSOR                    0x0020
  712. #define WM_MOUSEACTIVATE                0x0021
  713. #define WM_CHILDACTIVATE                0x0022
  714. #define WM_QUEUESYNC                    0x0023
  715.  
  716. #define WM_GETMINMAXINFO                0x0024
  717. /*
  718.  * Struct pointed to by WM_GETMINMAXINFO lParam
  719.  */
  720. typedef struct tagMINMAXINFO {
  721.     POINT ptReserved;
  722.     POINT ptMaxSize;
  723.     POINT ptMaxPosition;
  724.     POINT ptMinTrackSize;
  725.     POINT ptMaxTrackSize;
  726. } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
  727.  
  728. #define WM_PAINTICON                    0x0026
  729. #define WM_ICONERASEBKGND               0x0027
  730. #define WM_NEXTDLGCTL                   0x0028
  731. #define WM_SPOOLERSTATUS                0x002A
  732. #define WM_DRAWITEM                     0x002B
  733. #define WM_MEASUREITEM                  0x002C
  734. #define WM_DELETEITEM                   0x002D
  735. #define WM_VKEYTOITEM                   0x002E
  736. #define WM_CHARTOITEM                   0x002F
  737. #define WM_SETFONT                      0x0030
  738. #define WM_GETFONT                      0x0031
  739. #define WM_SETHOTKEY                    0x0032
  740. #define WM_GETHOTKEY                    0x0033
  741. #define WM_QUERYDRAGICON                0x0037
  742. #define WM_COMPAREITEM                  0x0039
  743. #define WM_COMPACTING                   0x0041
  744. #define WM_OTHERWINDOWCREATED           0x0042  /* no longer suported */
  745. #define WM_OTHERWINDOWDESTROYED         0x0043  /* no longer suported */
  746. #define WM_COMMNOTIFY                   0x0044  /* no longer suported */
  747. #define WM_WINDOWPOSCHANGING            0x0046
  748. #define WM_WINDOWPOSCHANGED             0x0047
  749.  
  750. #define WM_POWER                        0x0048
  751. /*
  752.  * wParam for WM_POWER window message and DRV_POWER driver notification
  753.  */
  754. #define PWR_OK              1
  755. #define PWR_FAIL            (-1)
  756. #define PWR_SUSPENDREQUEST  1
  757. #define PWR_SUSPENDRESUME   2
  758. #define PWR_CRITICALRESUME  3
  759.  
  760. #define WM_COPYDATA                     0x004A
  761. #define WM_CANCELJOURNAL                0x004B
  762. /*
  763.  * lParam of WM_COPYDATA message points to...
  764.  */
  765. typedef struct tagCOPYDATASTRUCT {
  766.     DWORD dwData;
  767.     DWORD cbData;
  768.     PVOID lpData;
  769. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  770.  
  771. #define WM_NCCREATE                     0x0081
  772. #define WM_NCDESTROY                    0x0082
  773. #define WM_NCCALCSIZE                   0x0083
  774. #define WM_NCHITTEST                    0x0084
  775. #define WM_NCPAINT                      0x0085
  776. #define WM_NCACTIVATE                   0x0086
  777. #define WM_GETDLGCODE                   0x0087
  778. #define WM_NCMOUSEMOVE                  0x00A0
  779. #define WM_NCLBUTTONDOWN                0x00A1
  780. #define WM_NCLBUTTONUP                  0x00A2
  781. #define WM_NCLBUTTONDBLCLK              0x00A3
  782. #define WM_NCRBUTTONDOWN                0x00A4
  783. #define WM_NCRBUTTONUP                  0x00A5
  784. #define WM_NCRBUTTONDBLCLK              0x00A6
  785. #define WM_NCMBUTTONDOWN                0x00A7
  786. #define WM_NCMBUTTONUP                  0x00A8
  787. #define WM_NCMBUTTONDBLCLK              0x00A9
  788.  
  789. #define WM_KEYFIRST                     0x0100
  790. #define WM_KEYDOWN                      0x0100
  791. #define WM_KEYUP                        0x0101
  792. #define WM_CHAR                         0x0102
  793. #define WM_DEADCHAR                     0x0103
  794. #define WM_SYSKEYDOWN                   0x0104
  795. #define WM_SYSKEYUP                     0x0105
  796. #define WM_SYSCHAR                      0x0106
  797. #define WM_SYSDEADCHAR                  0x0107
  798. #define WM_KEYLAST                      0x0108
  799. #define WM_INITDIALOG                   0x0110
  800. #define WM_COMMAND                      0x0111
  801. #define WM_SYSCOMMAND                   0x0112
  802. #define WM_TIMER                        0x0113
  803. #define WM_HSCROLL                      0x0114
  804. #define WM_VSCROLL                      0x0115
  805. #define WM_INITMENU                     0x0116
  806. #define WM_INITMENUPOPUP                0x0117
  807. #define WM_MENUSELECT                   0x011F
  808. #define WM_MENUCHAR                     0x0120
  809. #define WM_ENTERIDLE                    0x0121
  810.  
  811. #define WM_CTLCOLORMSGBOX               0x0132
  812. #define WM_CTLCOLOREDIT                 0x0133
  813. #define WM_CTLCOLORLISTBOX              0x0134
  814. #define WM_CTLCOLORBTN                  0x0135
  815. #define WM_CTLCOLORDLG                  0x0136
  816. #define WM_CTLCOLORSCROLLBAR            0x0137
  817. #define WM_CTLCOLORSTATIC               0x0138
  818.  
  819. #define WM_MOUSEFIRST                   0x0200
  820. #define WM_MOUSEMOVE                    0x0200
  821. #define WM_LBUTTONDOWN                  0x0201
  822. #define WM_LBUTTONUP                    0x0202
  823. #define WM_LBUTTONDBLCLK                0x0203
  824. #define WM_RBUTTONDOWN                  0x0204
  825. #define WM_RBUTTONUP                    0x0205
  826. #define WM_RBUTTONDBLCLK                0x0206
  827. #define WM_MBUTTONDOWN                  0x0207
  828. #define WM_MBUTTONUP                    0x0208
  829. #define WM_MBUTTONDBLCLK                0x0209
  830. #define WM_MOUSELAST                    0x0209
  831.  
  832. #define WM_PARENTNOTIFY                 0x0210
  833. #define WM_ENTERMENULOOP                0x0211
  834. #define WM_EXITMENULOOP                 0x0212
  835. #define WM_MDICREATE                    0x0220
  836. #define WM_MDIDESTROY                   0x0221
  837. #define WM_MDIACTIVATE                  0x0222
  838. #define WM_MDIRESTORE                   0x0223
  839. #define WM_MDINEXT                      0x0224
  840. #define WM_MDIMAXIMIZE                  0x0225
  841. #define WM_MDITILE                      0x0226
  842. #define WM_MDICASCADE                   0x0227
  843. #define WM_MDIICONARRANGE               0x0228
  844. #define WM_MDIGETACTIVE                 0x0229
  845. #define WM_MDISETMENU                   0x0230
  846. #define WM_DROPFILES                    0x0233
  847. #define WM_MDIREFRESHMENU               0x0234
  848.  
  849.  
  850. #define WM_CUT                          0x0300
  851. #define WM_COPY                         0x0301
  852. #define WM_PASTE                        0x0302
  853. #define WM_CLEAR                        0x0303
  854. #define WM_UNDO                         0x0304
  855. #define WM_RENDERFORMAT                 0x0305
  856. #define WM_RENDERALLFORMATS             0x0306
  857. #define WM_DESTROYCLIPBOARD             0x0307
  858. #define WM_DRAWCLIPBOARD                0x0308
  859. #define WM_PAINTCLIPBOARD               0x0309
  860. #define WM_VSCROLLCLIPBOARD             0x030A
  861. #define WM_SIZECLIPBOARD                0x030B
  862. #define WM_ASKCBFORMATNAME              0x030C
  863. #define WM_CHANGECBCHAIN                0x030D
  864. #define WM_HSCROLLCLIPBOARD             0x030E
  865. #define WM_QUERYNEWPALETTE              0x030F
  866. #define WM_PALETTEISCHANGING            0x0310
  867. #define WM_PALETTECHANGED               0x0311
  868. #define WM_HOTKEY                       0x0312
  869.  
  870. #define WM_PENWINFIRST                  0x0380
  871. #define WM_PENWINLAST                   0x038F
  872.  
  873.  
  874.  
  875.  
  876. /*
  877.  * NOTE: All Message Numbers below 0x0400 are RESERVED.
  878.  *
  879.  * Private Window Messages Start Here:
  880.  */
  881. #define WM_USER                         0x0400
  882.  
  883. #ifndef NONCMESSAGES
  884.  
  885. /*
  886.  * WM_SYNCTASK Commands
  887.  */
  888. #define ST_BEGINSWP         0
  889. #define ST_ENDSWP           1
  890.  
  891. /*
  892.  * WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  893.  */
  894. #define HTERROR             (-2)
  895. #define HTTRANSPARENT       (-1)
  896. #define HTNOWHERE           0
  897. #define HTCLIENT            1
  898. #define HTCAPTION           2
  899. #define HTSYSMENU           3
  900. #define HTGROWBOX           4
  901. #define HTSIZE              HTGROWBOX
  902. #define HTMENU              5
  903. #define HTHSCROLL           6
  904. #define HTVSCROLL           7
  905. #define HTMINBUTTON         8
  906. #define HTMAXBUTTON         9
  907. #define HTLEFT              10
  908. #define HTRIGHT             11
  909. #define HTTOP               12
  910. #define HTTOPLEFT           13
  911. #define HTTOPRIGHT          14
  912. #define HTBOTTOM            15
  913. #define HTBOTTOMLEFT        16
  914. #define HTBOTTOMRIGHT       17
  915. #define HTBORDER            18
  916. #define HTREDUCE            HTMINBUTTON
  917. #define HTZOOM              HTMAXBUTTON
  918. #define HTSIZEFIRST         HTLEFT
  919. #define HTSIZELAST          HTBOTTOMRIGHT
  920.  
  921. /*
  922.  * SendMessageTimeout values
  923.  */
  924. #define SMTO_NORMAL         0x0000
  925. #define SMTO_BLOCK          0x0001
  926. #define SMTO_ABORTIFHUNG    0x0002
  927.  
  928. #endif /* !NONCMESSAGES */
  929.  
  930. /*
  931.  * WM_MOUSEACTIVATE Return Codes
  932.  */
  933. #define MA_ACTIVATE         1
  934. #define MA_ACTIVATEANDEAT   2
  935. #define MA_NOACTIVATE       3
  936. #define MA_NOACTIVATEANDEAT 4
  937.  
  938. UINT
  939. WINAPI
  940. RegisterWindowMessageA(
  941.     LPCSTR lpString);
  942. UINT
  943. WINAPI
  944. RegisterWindowMessageW(
  945.     LPCWSTR lpString);
  946. #ifdef UNICODE
  947. #define RegisterWindowMessage  RegisterWindowMessageW
  948. #else
  949. #define RegisterWindowMessage  RegisterWindowMessageA
  950. #endif // !UNICODE
  951.  
  952. /*
  953.  * WM_SIZE message wParam values
  954.  */
  955. #define SIZE_RESTORED       0
  956. #define SIZE_MINIMIZED      1
  957. #define SIZE_MAXIMIZED      2
  958. #define SIZE_MAXSHOW        3
  959. #define SIZE_MAXHIDE        4
  960.  
  961. /*
  962.  * Obsolete constant names
  963.  */
  964. #define SIZENORMAL          SIZE_RESTORED
  965. #define SIZEICONIC          SIZE_MINIMIZED
  966. #define SIZEFULLSCREEN      SIZE_MAXIMIZED
  967. #define SIZEZOOMSHOW        SIZE_MAXSHOW
  968. #define SIZEZOOMHIDE        SIZE_MAXHIDE
  969.  
  970. /*
  971.  * WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
  972.  */
  973. typedef struct tagWINDOWPOS {
  974.     HWND    hwnd;
  975.     HWND    hwndInsertAfter;
  976.     int     x;
  977.     int     y;
  978.     int     cx;
  979.     int     cy;
  980.     UINT    flags;
  981. } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
  982.  
  983. /*
  984.  * WM_NCCALCSIZE parameter structure
  985.  */
  986. typedef struct tagNCCALCSIZE_PARAMS {
  987.     RECT       rgrc[3];
  988.     PWINDOWPOS lppos;
  989. } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
  990.  
  991. /*
  992.  * WM_NCCALCSIZE "window valid rect" return values
  993.  */
  994. #define WVR_ALIGNTOP        0x0010
  995. #define WVR_ALIGNLEFT       0x0020
  996. #define WVR_ALIGNBOTTOM     0x0040
  997. #define WVR_ALIGNRIGHT      0x0080
  998. #define WVR_HREDRAW         0x0100
  999. #define WVR_VREDRAW         0x0200
  1000. #define WVR_REDRAW         (WVR_HREDRAW | \
  1001.                             WVR_VREDRAW)
  1002. #define WVR_VALIDRECTS      0x0400
  1003.  
  1004.  
  1005. #ifndef NOKEYSTATES
  1006.  
  1007. /*
  1008.  * Key State Masks for Mouse Messages
  1009.  */
  1010. #define MK_LBUTTON          0x0001
  1011. #define MK_RBUTTON          0x0002
  1012. #define MK_SHIFT            0x0004
  1013. #define MK_CONTROL          0x0008
  1014. #define MK_MBUTTON          0x0010
  1015.  
  1016. #endif /* !NOKEYSTATES */
  1017.  
  1018. #endif /* !NOWINMESSAGES */
  1019.  
  1020. #ifndef NOWINSTYLES
  1021.  
  1022. /*
  1023.  * Window Styles
  1024.  */
  1025. #define WS_OVERLAPPED       0x00000000L
  1026. #define WS_POPUP            0x80000000L
  1027. #define WS_CHILD            0x40000000L
  1028. #define WS_MINIMIZE         0x20000000L
  1029. #define WS_VISIBLE          0x10000000L
  1030. #define WS_DISABLED         0x08000000L
  1031. #define WS_CLIPSIBLINGS     0x04000000L
  1032. #define WS_CLIPCHILDREN     0x02000000L
  1033. #define WS_MAXIMIZE         0x01000000L
  1034. #define WS_CAPTION          0x00C00000L     /* WS_BORDER | WS_DLGFRAME  */
  1035. #define WS_BORDER           0x00800000L
  1036. #define WS_DLGFRAME         0x00400000L
  1037. #define WS_VSCROLL          0x00200000L
  1038. #define WS_HSCROLL          0x00100000L
  1039. #define WS_SYSMENU          0x00080000L
  1040. #define WS_THICKFRAME       0x00040000L
  1041. #define WS_GROUP            0x00020000L
  1042. #define WS_TABSTOP          0x00010000L
  1043.  
  1044. #define WS_MINIMIZEBOX      0x00020000L
  1045. #define WS_MAXIMIZEBOX      0x00010000L
  1046.  
  1047. #define WS_TILED            WS_OVERLAPPED
  1048. #define WS_ICONIC           WS_MINIMIZE
  1049. #define WS_SIZEBOX          WS_THICKFRAME
  1050. #define WS_TILEDWINDOW      WS_OVERLAPPEDWINDOW
  1051.  
  1052. /*
  1053.  * Common Window Styles
  1054.  */
  1055. #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED     | \
  1056.                              WS_CAPTION        | \
  1057.                              WS_SYSMENU        | \
  1058.                              WS_THICKFRAME     | \
  1059.                              WS_MINIMIZEBOX    | \
  1060.                              WS_MAXIMIZEBOX)
  1061.  
  1062. #define WS_POPUPWINDOW      (WS_POPUP          | \
  1063.                              WS_BORDER         | \
  1064.                              WS_SYSMENU)
  1065.  
  1066. #define WS_CHILDWINDOW      (WS_CHILD)
  1067.  
  1068. /*
  1069.  * Extended Window Styles
  1070.  */
  1071. #define WS_EX_DLGMODALFRAME  0x00000001L
  1072. #define WS_EX_NOPARENTNOTIFY 0x00000004L
  1073. #define WS_EX_TOPMOST        0x00000008L
  1074. #define WS_EX_ACCEPTFILES    0x00000010L
  1075. #define WS_EX_TRANSPARENT    0x00000020L
  1076.  
  1077. /*
  1078.  * Class styles
  1079.  */
  1080. #define CS_VREDRAW          0x0001
  1081. #define CS_HREDRAW          0x0002
  1082. #define CS_KEYCVTWINDOW     0x0004
  1083. #define CS_DBLCLKS          0x0008
  1084. #define CS_OWNDC            0x0020
  1085. #define CS_CLASSDC          0x0040
  1086. #define CS_PARENTDC         0x0080
  1087. #define CS_NOKEYCVT         0x0100
  1088. #define CS_NOCLOSE          0x0200
  1089. #define CS_SAVEBITS         0x0800
  1090. #define CS_BYTEALIGNCLIENT  0x1000
  1091. #define CS_BYTEALIGNWINDOW  0x2000
  1092. #define CS_GLOBALCLASS      0x4000
  1093.  
  1094. #endif /* !NOWINSTYLES */
  1095.  
  1096. #ifndef NOCLIPBOARD
  1097.  
  1098. /*
  1099.  * Predefined Clipboard Formats
  1100.  */
  1101. #define CF_TEXT             1
  1102. #define CF_BITMAP           2
  1103. #define CF_METAFILEPICT     3
  1104. #define CF_SYLK             4
  1105. #define CF_DIF              5
  1106. #define CF_TIFF             6
  1107. #define CF_OEMTEXT          7
  1108. #define CF_DIB              8
  1109. #define CF_PALETTE          9
  1110. #define CF_PENDATA          10
  1111. #define CF_RIFF             11
  1112. #define CF_WAVE             12
  1113. #define CF_UNICODETEXT      13
  1114. #define CF_ENHMETAFILE      14
  1115.  
  1116. #define CF_OWNERDISPLAY     0x0080
  1117. #define CF_DSPTEXT          0x0081
  1118. #define CF_DSPBITMAP        0x0082
  1119. #define CF_DSPMETAFILEPICT  0x0083
  1120. #define CF_DSPENHMETAFILE   0x008E
  1121.  
  1122. /*
  1123.  * "Private" formats don't get GlobalFree()'d
  1124.  */
  1125. #define CF_PRIVATEFIRST     0x0200
  1126. #define CF_PRIVATELAST      0x02FF
  1127.  
  1128. /*
  1129.  * "GDIOBJ" formats do get DeleteObject()'d
  1130.  */
  1131. #define CF_GDIOBJFIRST      0x0300
  1132. #define CF_GDIOBJLAST       0x03FF
  1133.  
  1134. #endif /* !NOCLIPBOARD */
  1135.  
  1136. /*
  1137.  * Defines for the fVirt field of the Accelerator table structure.
  1138.  */
  1139. #define FVIRTKEY  TRUE          /* Assumed to be == TRUE */
  1140. #define FNOINVERT 0x02
  1141. #define FSHIFT    0x04
  1142. #define FCONTROL  0x08
  1143. #define FALT      0x10
  1144.  
  1145. typedef struct tagACCEL {
  1146.     BYTE   fVirt;               /* Also called the flags field */
  1147.     WORD   key;
  1148.     WORD   cmd;
  1149. } ACCEL, *LPACCEL;
  1150.  
  1151. typedef struct tagPAINTSTRUCT {
  1152.     HDC         hdc;
  1153.     BOOL        fErase;
  1154.     RECT        rcPaint;
  1155.     BOOL        fRestore;
  1156.     BOOL        fIncUpdate;
  1157.     BYTE        rgbReserved[32];
  1158. } PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, *LPPAINTSTRUCT;
  1159.  
  1160. typedef struct tagCREATESTRUCTA {
  1161.     LPVOID      lpCreateParams;
  1162.     HINSTANCE   hInstance;
  1163.     HMENU       hMenu;
  1164.     HWND        hwndParent;
  1165.     int         cy;
  1166.     int         cx;
  1167.     int         y;
  1168.     int         x;
  1169.     LONG        style;
  1170.     LPCSTR      lpszName;
  1171.     LPCSTR      lpszClass;
  1172.     DWORD       dwExStyle;
  1173. } CREATESTRUCTA, *LPCREATESTRUCTA;
  1174. typedef struct tagCREATESTRUCTW {
  1175.     LPVOID      lpCreateParams;
  1176.     HINSTANCE   hInstance;
  1177.     HMENU       hMenu;
  1178.     HWND        hwndParent;
  1179.     int         cy;
  1180.     int         cx;
  1181.     int         y;
  1182.     int         x;
  1183.     LONG        style;
  1184.     LPCWSTR     lpszName;
  1185.     LPCWSTR     lpszClass;
  1186.     DWORD       dwExStyle;
  1187. } CREATESTRUCTW, *LPCREATESTRUCTW;
  1188. #ifdef UNICODE
  1189. typedef CREATESTRUCTW CREATESTRUCT;
  1190. typedef LPCREATESTRUCTW LPCREATESTRUCT;
  1191. #else
  1192. typedef CREATESTRUCTA CREATESTRUCT;
  1193. typedef LPCREATESTRUCTA LPCREATESTRUCT;
  1194. #endif // UNICODE
  1195.  
  1196. typedef struct tagWINDOWPLACEMENT {
  1197.     UINT  length;
  1198.     UINT  flags;
  1199.     UINT  showCmd;
  1200.     POINT ptMinPosition;
  1201.     POINT ptMaxPosition;
  1202.     RECT  rcNormalPosition;
  1203. } WINDOWPLACEMENT;
  1204. typedef WINDOWPLACEMENT *PWINDOWPLACEMENT, *LPWINDOWPLACEMENT;
  1205.  
  1206. #define WPF_SETMINPOSITION      0x0001
  1207. #define WPF_RESTORETOMAXIMIZED  0x0002
  1208.  
  1209. /*
  1210.  * Owner draw control types
  1211.  */
  1212. #define ODT_MENU        1
  1213. #define ODT_LISTBOX     2
  1214. #define ODT_COMBOBOX    3
  1215. #define ODT_BUTTON      4
  1216.  
  1217. /*
  1218.  * Owner draw actions
  1219.  */
  1220. #define ODA_DRAWENTIRE  0x0001
  1221. #define ODA_SELECT      0x0002
  1222. #define ODA_FOCUS       0x0004
  1223.  
  1224. /*
  1225.  * Owner draw state
  1226.  */
  1227. #define ODS_SELECTED    0x0001
  1228. #define ODS_GRAYED      0x0002
  1229. #define ODS_DISABLED    0x0004
  1230. #define ODS_CHECKED     0x0008
  1231. #define ODS_FOCUS       0x0010
  1232.  
  1233. /*
  1234.  * MEASUREITEMSTRUCT for ownerdraw
  1235.  */
  1236. typedef struct tagMEASUREITEMSTRUCT {
  1237.     UINT       CtlType;
  1238.     UINT       CtlID;
  1239.     UINT       itemID;
  1240.     UINT       itemWidth;
  1241.     UINT       itemHeight;
  1242.     DWORD      itemData;
  1243. } MEASUREITEMSTRUCT, NEAR *PMEASUREITEMSTRUCT, FAR *LPMEASUREITEMSTRUCT;
  1244.  
  1245.  
  1246.  
  1247. /*
  1248.  * DRAWITEMSTRUCT for ownerdraw
  1249.  */
  1250. typedef struct tagDRAWITEMSTRUCT {
  1251.     UINT        CtlType;
  1252.     UINT        CtlID;
  1253.     UINT        itemID;
  1254.     UINT        itemAction;
  1255.     UINT        itemState;
  1256.     HWND        hwndItem;
  1257.     HDC         hDC;
  1258.     RECT        rcItem;
  1259.     DWORD       itemData;
  1260. } DRAWITEMSTRUCT, NEAR *PDRAWITEMSTRUCT, FAR *LPDRAWITEMSTRUCT;
  1261.  
  1262. /*
  1263.  * DELETEITEMSTRUCT for ownerdraw
  1264.  */
  1265. typedef struct tagDELETEITEMSTRUCT {
  1266.     UINT       CtlType;
  1267.     UINT       CtlID;
  1268.     UINT       itemID;
  1269.     HWND       hwndItem;
  1270.     UINT       itemData;
  1271. } DELETEITEMSTRUCT, NEAR *PDELETEITEMSTRUCT, FAR *LPDELETEITEMSTRUCT;
  1272.  
  1273. /*
  1274.  * COMPAREITEMSTUCT for ownerdraw sorting
  1275.  */
  1276. typedef struct tagCOMPAREITEMSTRUCT {
  1277.     UINT        CtlType;
  1278.     UINT        CtlID;
  1279.     HWND        hwndItem;
  1280.     UINT        itemID1;
  1281.     DWORD       itemData1;
  1282.     UINT        itemID2;
  1283.     DWORD       itemData2;
  1284.     DWORD       dwLocaleId;
  1285. } COMPAREITEMSTRUCT, NEAR *PCOMPAREITEMSTRUCT, FAR *LPCOMPAREITEMSTRUCT;
  1286.  
  1287. #ifndef NOMSG
  1288.  
  1289. /*
  1290.  * Message Function Templates
  1291.  */
  1292. BOOL
  1293. WINAPI
  1294. GetMessageA(
  1295.     LPMSG lpMsg,
  1296.     HWND hWnd ,
  1297.     UINT wMsgFilterMin,
  1298.     UINT wMsgFilterMax);
  1299. /*
  1300.  * Message Function Templates
  1301.  */
  1302. BOOL
  1303. WINAPI
  1304. GetMessageW(
  1305.     LPMSG lpMsg,
  1306.     HWND hWnd ,
  1307.     UINT wMsgFilterMin,
  1308.     UINT wMsgFilterMax);
  1309. #ifdef UNICODE
  1310. #define GetMessage  GetMessageW
  1311. #else
  1312. #define GetMessage  GetMessageA
  1313. #endif // !UNICODE
  1314.  
  1315. BOOL
  1316. WINAPI
  1317. TranslateMessage(
  1318.     CONST MSG *lpMsg);
  1319.  
  1320. LONG
  1321. WINAPI
  1322. DispatchMessageA(
  1323.     CONST MSG *lpMsg);
  1324. LONG
  1325. WINAPI
  1326. DispatchMessageW(
  1327.     CONST MSG *lpMsg);
  1328. #ifdef UNICODE
  1329. #define DispatchMessage  DispatchMessageW
  1330. #else
  1331. #define DispatchMessage  DispatchMessageA
  1332. #endif // !UNICODE
  1333.  
  1334.  
  1335. BOOL
  1336. WINAPI
  1337. SetMessageQueue(
  1338.     int cMessagesMax);
  1339.  
  1340. BOOL
  1341. WINAPI
  1342. PeekMessageA(
  1343.     LPMSG lpMsg,
  1344.     HWND hWnd ,
  1345.     UINT wMsgFilterMin,
  1346.     UINT wMsgFilterMax,
  1347.     UINT wRemoveMsg);
  1348. BOOL
  1349. WINAPI
  1350. PeekMessageW(
  1351.     LPMSG lpMsg,
  1352.     HWND hWnd ,
  1353.     UINT wMsgFilterMin,
  1354.     UINT wMsgFilterMax,
  1355.     UINT wRemoveMsg);
  1356. #ifdef UNICODE
  1357. #define PeekMessage  PeekMessageW
  1358. #else
  1359. #define PeekMessage  PeekMessageA
  1360. #endif // !UNICODE
  1361.  
  1362. /*
  1363.  * PeekMessage() Options
  1364.  */
  1365. #define PM_NOREMOVE         0x0000
  1366. #define PM_REMOVE           0x0001
  1367. #define PM_NOYIELD          0x0002
  1368.  
  1369. #endif /* !NOMSG */
  1370.  
  1371. BOOL
  1372. WINAPI
  1373. RegisterHotKey(
  1374.     HWND hWnd ,
  1375.     int id,
  1376.     UINT fsModifiers,
  1377.     UINT vk);
  1378.  
  1379. BOOL
  1380. WINAPI
  1381. UnregisterHotKey(
  1382.     HWND hWnd,
  1383.     int id);
  1384.  
  1385. #define MOD_ALT         0x0001
  1386. #define MOD_CONTROL     0x0002
  1387. #define MOD_SHIFT       0x0004
  1388.  
  1389. #define IDHOT_SNAPWINDOW        (-1)    /* SHIFT-PRINTSCRN  */
  1390. #define IDHOT_SNAPDESKTOP       (-2)    /* PRINTSCRN        */
  1391.  
  1392. #ifdef WIN_INTERNAL
  1393.     #ifndef LSTRING
  1394.     #define NOLSTRING
  1395.     #endif /* LSTRING */
  1396.     #ifndef LFILEIO
  1397.     #define NOLFILEIO
  1398.     #endif /* LFILEIO */
  1399. #endif /* WIN_INTERNAL */
  1400.  
  1401.  
  1402. #define EWX_LOGOFF   0
  1403. #define EWX_SHUTDOWN 1
  1404. #define EWX_REBOOT   2
  1405. #define EWX_FORCE    4
  1406.  
  1407.  
  1408. #define ExitWindows(dwReserved, Code) ExitWindowsEx(EWX_LOGOFF, 0xFFFFFFFF)
  1409.  
  1410. BOOL
  1411. WINAPI
  1412. ExitWindowsEx(
  1413.     UINT uFlags,
  1414.     DWORD dwReserved);
  1415.  
  1416. BOOL
  1417. WINAPI
  1418. SwapMouseButton(
  1419.     BOOL fSwap);
  1420.  
  1421. DWORD
  1422. WINAPI
  1423. GetMessagePos(
  1424.     VOID);
  1425.  
  1426. LONG
  1427. WINAPI
  1428. GetMessageTime(
  1429.     VOID);
  1430.  
  1431. LONG
  1432. WINAPI
  1433. GetMessageExtraInfo(
  1434.     VOID);
  1435.  
  1436. LRESULT
  1437. WINAPI
  1438. SendMessageA(
  1439.     HWND hWnd,
  1440.     UINT Msg,
  1441.     WPARAM wParam,
  1442.     LPARAM lParam);
  1443. LRESULT
  1444. WINAPI
  1445. SendMessageW(
  1446.     HWND hWnd,
  1447.     UINT Msg,
  1448.     WPARAM wParam,
  1449.     LPARAM lParam);
  1450. #ifdef UNICODE
  1451. #define SendMessage  SendMessageW
  1452. #else
  1453. #define SendMessage  SendMessageA
  1454. #endif // !UNICODE
  1455.  
  1456. LRESULT
  1457. WINAPI
  1458. SendMessageTimeoutA(
  1459.     HWND hWnd,
  1460.     UINT Msg,
  1461.     WPARAM wParam,
  1462.     LPARAM lParam,
  1463.     UINT fuFlags,
  1464.     UINT uTimeout,
  1465.     LPDWORD lpdwResult);
  1466. LRESULT
  1467. WINAPI
  1468. SendMessageTimeoutW(
  1469.     HWND hWnd,
  1470.     UINT Msg,
  1471.     WPARAM wParam,
  1472.     LPARAM lParam,
  1473.     UINT fuFlags,
  1474.     UINT uTimeout,
  1475.     LPDWORD lpdwResult);
  1476. #ifdef UNICODE
  1477. #define SendMessageTimeout  SendMessageTimeoutW
  1478. #else
  1479. #define SendMessageTimeout  SendMessageTimeoutA
  1480. #endif // !UNICODE
  1481.  
  1482. BOOL
  1483. WINAPI
  1484. SendNotifyMessageA(
  1485.     HWND hWnd,
  1486.     UINT Msg,
  1487.     WPARAM wParam,
  1488.     LPARAM lParam);
  1489. BOOL
  1490. WINAPI
  1491. SendNotifyMessageW(
  1492.     HWND hWnd,
  1493.     UINT Msg,
  1494.     WPARAM wParam,
  1495.     LPARAM lParam);
  1496. #ifdef UNICODE
  1497. #define SendNotifyMessage  SendNotifyMessageW
  1498. #else
  1499. #define SendNotifyMessage  SendNotifyMessageA
  1500. #endif // !UNICODE
  1501.  
  1502. BOOL
  1503. WINAPI
  1504. SendMessageCallbackA(
  1505.     HWND hWnd,
  1506.     UINT Msg,
  1507.     WPARAM wParam,
  1508.     LPARAM lParam,
  1509.     SENDASYNCPROC lpResultCallBack,
  1510.     DWORD dwData);
  1511. BOOL
  1512. WINAPI
  1513. SendMessageCallbackW(
  1514.     HWND hWnd,
  1515.     UINT Msg,
  1516.     WPARAM wParam,
  1517.     LPARAM lParam,
  1518.     SENDASYNCPROC lpResultCallBack,
  1519.     DWORD dwData);
  1520. #ifdef UNICODE
  1521. #define SendMessageCallback  SendMessageCallbackW
  1522. #else
  1523. #define SendMessageCallback  SendMessageCallbackA
  1524. #endif // !UNICODE
  1525.  
  1526. BOOL
  1527. WINAPI
  1528. PostMessageA(
  1529.     HWND hWnd,
  1530.     UINT Msg,
  1531.     WPARAM wParam,
  1532.     LPARAM lParam);
  1533. BOOL
  1534. WINAPI
  1535. PostMessageW(
  1536.     HWND hWnd,
  1537.     UINT Msg,
  1538.     WPARAM wParam,
  1539.     LPARAM lParam);
  1540. #ifdef UNICODE
  1541. #define PostMessage  PostMessageW
  1542. #else
  1543. #define PostMessage  PostMessageA
  1544. #endif // !UNICODE
  1545.  
  1546. BOOL
  1547. WINAPI
  1548. PostThreadMessageA(
  1549.     DWORD idThread,
  1550.     UINT Msg,
  1551.     WPARAM wParam,
  1552.     LPARAM lParam);
  1553. BOOL
  1554. WINAPI
  1555. PostThreadMessageW(
  1556.     DWORD idThread,
  1557.     UINT Msg,
  1558.     WPARAM wParam,
  1559.     LPARAM lParam);
  1560. #ifdef UNICODE
  1561. #define PostThreadMessage  PostThreadMessageW
  1562. #else
  1563. #define PostThreadMessage  PostThreadMessageA
  1564. #endif // !UNICODE
  1565.  
  1566. #define PostAppMessageA(idThread, wMsg, wParam, lParam)\
  1567.         PostThreadMessageA((DWORD)idThread, wMsg, wParam, lParam)
  1568. #define PostAppMessageW(idThread, wMsg, wParam, lParam)\
  1569.         PostThreadMessageW((DWORD)idThread, wMsg, wParam, lParam)
  1570. #ifdef UNICODE
  1571. #define PostAppMessage  PostAppMessageW
  1572. #else
  1573. #define PostAppMessage  PostAppMessageA
  1574. #endif // !UNICODE
  1575.  
  1576. /*
  1577.  * Special HWND value for use with PostMessage() and SendMessage()
  1578.  */
  1579. #define HWND_BROADCAST  ((HWND)0xffff)
  1580.  
  1581. BOOL
  1582. WINAPI
  1583. AttachThreadInput(
  1584.     DWORD idAttach,
  1585.     DWORD idAttachTo,
  1586.     BOOL fAttach);
  1587.  
  1588.  
  1589. BOOL
  1590. WINAPI
  1591. ReplyMessage(
  1592.     LRESULT lResult);
  1593.  
  1594. BOOL
  1595. WINAPI
  1596. WaitMessage(
  1597.     VOID);
  1598.  
  1599. DWORD
  1600. WINAPI
  1601. WaitForInputIdle(
  1602.     HANDLE hProcess,
  1603.     DWORD dwMilliseconds);
  1604.  
  1605. LRESULT
  1606. WINAPI
  1607. DefWindowProcA(
  1608.     HWND hWnd,
  1609.     UINT Msg,
  1610.     WPARAM wParam,
  1611.     LPARAM lParam);
  1612. LRESULT
  1613. WINAPI
  1614. DefWindowProcW(
  1615.     HWND hWnd,
  1616.     UINT Msg,
  1617.     WPARAM wParam,
  1618.     LPARAM lParam);
  1619. #ifdef UNICODE
  1620. #define DefWindowProc  DefWindowProcW
  1621. #else
  1622. #define DefWindowProc  DefWindowProcA
  1623. #endif // !UNICODE
  1624.  
  1625. VOID
  1626. WINAPI
  1627. PostQuitMessage(
  1628.     int nExitCode);
  1629.  
  1630. #ifdef STRICT
  1631.  
  1632. LRESULT
  1633. WINAPI
  1634. CallWindowProcA(
  1635.     WNDPROC lpPrevWndFunc,
  1636.     HWND hWnd,
  1637.     UINT Msg,
  1638.     WPARAM wParam,
  1639.     LPARAM lParam);
  1640. LRESULT
  1641. WINAPI
  1642. CallWindowProcW(
  1643.     WNDPROC lpPrevWndFunc,
  1644.     HWND hWnd,
  1645.     UINT Msg,
  1646.     WPARAM wParam,
  1647.     LPARAM lParam);
  1648. #ifdef UNICODE
  1649. #define CallWindowProc  CallWindowProcW
  1650. #else
  1651. #define CallWindowProc  CallWindowProcA
  1652. #endif // !UNICODE
  1653.  
  1654. #else /* !STRICT */
  1655.  
  1656. LRESULT
  1657. WINAPI
  1658. CallWindowProcA(
  1659.     FARPROC lpPrevWndFunc,
  1660.     HWND hWnd,
  1661.     UINT Msg,
  1662.     WPARAM wParam,
  1663.     LPARAM lParam);
  1664. LRESULT
  1665. WINAPI
  1666. CallWindowProcW(
  1667.     FARPROC lpPrevWndFunc,
  1668.     HWND hWnd,
  1669.     UINT Msg,
  1670.     WPARAM wParam,
  1671.     LPARAM lParam);
  1672. #ifdef UNICODE
  1673. #define CallWindowProc  CallWindowProcW
  1674. #else
  1675. #define CallWindowProc  CallWindowProcA
  1676. #endif // !UNICODE
  1677.  
  1678. #endif /* !STRICT */
  1679.  
  1680. BOOL
  1681. WINAPI
  1682. InSendMessage(
  1683.     VOID);
  1684.  
  1685. UINT
  1686. WINAPI
  1687. GetDoubleClickTime(
  1688.     VOID);
  1689.  
  1690. BOOL
  1691. WINAPI
  1692. SetDoubleClickTime(
  1693.     UINT);
  1694.  
  1695. ATOM
  1696. WINAPI
  1697. RegisterClassA(
  1698.     CONST WNDCLASSA *lpWndClass);
  1699. ATOM
  1700. WINAPI
  1701. RegisterClassW(
  1702.     CONST WNDCLASSW *lpWndClass);
  1703. #ifdef UNICODE
  1704. #define RegisterClass  RegisterClassW
  1705. #else
  1706. #define RegisterClass  RegisterClassA
  1707. #endif // !UNICODE
  1708.  
  1709. BOOL
  1710. WINAPI
  1711. UnregisterClassA(
  1712.     LPCSTR lpClassName,
  1713.     HINSTANCE hInstance);
  1714. BOOL
  1715. WINAPI
  1716. UnregisterClassW(
  1717.     LPCWSTR lpClassName,
  1718.     HINSTANCE hInstance);
  1719. #ifdef UNICODE
  1720. #define UnregisterClass  UnregisterClassW
  1721. #else
  1722. #define UnregisterClass  UnregisterClassA
  1723. #endif // !UNICODE
  1724.  
  1725. BOOL
  1726. WINAPI
  1727. GetClassInfoA(
  1728.     HINSTANCE hInstance ,
  1729.     LPCSTR lpClassName,
  1730.     LPWNDCLASSA lpWndClass);
  1731. BOOL
  1732. WINAPI
  1733. GetClassInfoW(
  1734.     HINSTANCE hInstance ,
  1735.     LPCWSTR lpClassName,
  1736.     LPWNDCLASSW lpWndClass);
  1737. #ifdef UNICODE
  1738. #define GetClassInfo  GetClassInfoW
  1739. #else
  1740. #define GetClassInfo  GetClassInfoA
  1741. #endif // !UNICODE
  1742.  
  1743. #define CW_USEDEFAULT       ((int)0x80000000)
  1744.  
  1745. /*
  1746.  * Special value for CreateWindow, et al.
  1747.  */
  1748. #define HWND_DESKTOP        ((HWND)0)
  1749.  
  1750. HWND
  1751. WINAPI
  1752. CreateWindowExA(
  1753.     DWORD dwExStyle,
  1754.     LPCSTR lpClassName,
  1755.     LPCSTR lpWindowName,
  1756.     DWORD dwStyle,
  1757.     int X,
  1758.     int Y,
  1759.     int nWidth,
  1760.     int nHeight,
  1761.     HWND hWndParent ,
  1762.     HMENU hMenu,
  1763.     HINSTANCE hInstance,
  1764.     LPVOID lpParam);
  1765. HWND
  1766. WINAPI
  1767. CreateWindowExW(
  1768.     DWORD dwExStyle,
  1769.     LPCWSTR lpClassName,
  1770.     LPCWSTR lpWindowName,
  1771.     DWORD dwStyle,
  1772.     int X,
  1773.     int Y,
  1774.     int nWidth,
  1775.     int nHeight,
  1776.     HWND hWndParent ,
  1777.     HMENU hMenu,
  1778.     HINSTANCE hInstance,
  1779.     LPVOID lpParam);
  1780. #ifdef UNICODE
  1781. #define CreateWindowEx  CreateWindowExW
  1782. #else
  1783. #define CreateWindowEx  CreateWindowExA
  1784. #endif // !UNICODE
  1785.  
  1786. #define CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y,\
  1787. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  1788. CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  1789. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  1790. #define CreateWindowW(lpClassName, lpWindowName, dwStyle, x, y,\
  1791. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  1792. CreateWindowExW(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  1793. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  1794. #ifdef UNICODE
  1795. #define CreateWindow  CreateWindowW
  1796. #else
  1797. #define CreateWindow  CreateWindowA
  1798. #endif // !UNICODE
  1799.  
  1800. BOOL
  1801. WINAPI
  1802. IsWindow(
  1803.     HWND hWnd);
  1804.  
  1805. BOOL
  1806. WINAPI
  1807. IsMenu(
  1808.     HMENU hMenu);
  1809.  
  1810. BOOL
  1811. WINAPI
  1812. IsChild(
  1813.     HWND hWndParent,
  1814.     HWND hWnd);
  1815.  
  1816. BOOL
  1817. WINAPI
  1818. DestroyWindow(
  1819.     HWND hWnd);
  1820.  
  1821. BOOL
  1822. WINAPI
  1823. ShowWindow(
  1824.     HWND hWnd,
  1825.     int nCmdShow);
  1826.  
  1827. BOOL
  1828. WINAPI
  1829. FlashWindow(
  1830.     HWND hWnd,
  1831.     BOOL bInvert);
  1832.  
  1833. BOOL
  1834. WINAPI
  1835. ShowOwnedPopups(
  1836.     HWND hWnd,
  1837.     BOOL fShow);
  1838.  
  1839. BOOL
  1840. WINAPI
  1841. OpenIcon(
  1842.     HWND hWnd);
  1843.  
  1844. BOOL
  1845. WINAPI
  1846. CloseWindow(
  1847.     HWND hWnd);
  1848.  
  1849. BOOL
  1850. WINAPI
  1851. MoveWindow(
  1852.     HWND hWnd,
  1853.     int X,
  1854.     int Y,
  1855.     int nWidth,
  1856.     int nHeight,
  1857.     BOOL bRepaint);
  1858.  
  1859. BOOL
  1860. WINAPI
  1861. SetWindowPos(
  1862.     HWND hWnd,
  1863.     HWND hWndInsertAfter ,
  1864.     int X,
  1865.     int Y,
  1866.     int cx,
  1867.     int cy,
  1868.     UINT uFlags);
  1869.  
  1870. BOOL
  1871. WINAPI
  1872. GetWindowPlacement(
  1873.     HWND hWnd,
  1874.     WINDOWPLACEMENT *lpwndpl);
  1875.  
  1876. BOOL
  1877. WINAPI
  1878. SetWindowPlacement(
  1879.     HWND hWnd,
  1880.     CONST WINDOWPLACEMENT *lpwndpl);
  1881.  
  1882.  
  1883. #ifndef NODEFERWINDOWPOS
  1884.  
  1885. HDWP
  1886. WINAPI
  1887. BeginDeferWindowPos(
  1888.     int nNumWindows);
  1889.  
  1890. HDWP
  1891. WINAPI
  1892. DeferWindowPos(
  1893.     HDWP hWinPosInfo,
  1894.     HWND hWnd,
  1895.     HWND hWndInsertAfter ,
  1896.     int x,
  1897.     int y,
  1898.     int cx,
  1899.     int cy,
  1900.     UINT uFlags);
  1901.  
  1902. BOOL
  1903. WINAPI
  1904. EndDeferWindowPos(
  1905.     HDWP hWinPosInfo);
  1906.  
  1907. #endif /* !NODEFERWINDOWPOS */
  1908.  
  1909. BOOL
  1910. WINAPI
  1911. IsWindowVisible(
  1912.     HWND hWnd);
  1913.  
  1914. BOOL
  1915. WINAPI
  1916. IsIconic(
  1917.     HWND hWnd);
  1918.  
  1919. BOOL
  1920. WINAPI
  1921. AnyPopup(
  1922.     VOID);
  1923.  
  1924. BOOL
  1925. WINAPI
  1926. BringWindowToTop(
  1927.     HWND hWnd);
  1928.  
  1929. BOOL
  1930. WINAPI
  1931. IsZoomed(
  1932.     HWND hWnd);
  1933.  
  1934. /*
  1935.  * SetWindowPos Flags
  1936.  */
  1937. #define SWP_NOSIZE          0x0001
  1938. #define SWP_NOMOVE          0x0002
  1939. #define SWP_NOZORDER        0x0004
  1940. #define SWP_NOREDRAW        0x0008
  1941. #define SWP_NOACTIVATE      0x0010
  1942. #define SWP_FRAMECHANGED    0x0020  /* The frame changed: send WM_NCCALCSIZE */
  1943. #define SWP_SHOWWINDOW      0x0040
  1944. #define SWP_HIDEWINDOW      0x0080
  1945. #define SWP_NOCOPYBITS      0x0100
  1946. #define SWP_NOOWNERZORDER   0x0200  /* Don't do owner Z ordering */
  1947.  
  1948. #define SWP_DRAWFRAME       SWP_FRAMECHANGED
  1949. #define SWP_NOREPOSITION    SWP_NOOWNERZORDER
  1950.  
  1951.  
  1952. #define HWND_TOP        ((HWND)0)
  1953. #define HWND_BOTTOM     ((HWND)1)
  1954. #define HWND_TOPMOST    ((HWND)-1)
  1955. #define HWND_NOTOPMOST  ((HWND)-2)
  1956.  
  1957. #ifndef NOCTLMGR
  1958.  
  1959. #ifndef RC_INVOKED       /* RC can't handle #pragmas */
  1960.  
  1961. /*
  1962.  * WARNING:
  1963.  * The following structures must NOT be DWORD padded because they are
  1964.  * followed by strings, etc that do not have to be DWORD aligned.
  1965.  */
  1966. #pragma pack(2)
  1967.  
  1968. typedef struct {
  1969.     DWORD style;
  1970.     DWORD dwExtendedStyle;
  1971.     WORD cdit;
  1972.     short x;
  1973.     short y;
  1974.     short cx;
  1975.     short cy;
  1976. } DLGTEMPLATE;
  1977. typedef DLGTEMPLATE *LPDLGTEMPLATEA;
  1978. typedef DLGTEMPLATE *LPDLGTEMPLATEW;
  1979. #ifdef UNICODE
  1980. typedef LPDLGTEMPLATEW LPDLGTEMPLATE;
  1981. #else
  1982. typedef LPDLGTEMPLATEA LPDLGTEMPLATE;
  1983. #endif // UNICODE
  1984. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEA;
  1985. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATEW;
  1986. #ifdef UNICODE
  1987. typedef LPCDLGTEMPLATEW LPCDLGTEMPLATE;
  1988. #else
  1989. typedef LPCDLGTEMPLATEA LPCDLGTEMPLATE;
  1990. #endif // UNICODE
  1991.  
  1992. /*
  1993.  * Dialog item template (dit)
  1994.  */
  1995. typedef struct {
  1996.     DWORD style;
  1997.     DWORD dwExtendedStyle;
  1998.     short x;
  1999.     short y;
  2000.     short cx;
  2001.     short cy;
  2002.     WORD id;
  2003. } DLGITEMTEMPLATE;
  2004. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEA;
  2005. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATEW;
  2006. #ifdef UNICODE
  2007. typedef PDLGITEMTEMPLATEW PDLGITEMTEMPLATE;
  2008. #else
  2009. typedef PDLGITEMTEMPLATEA PDLGITEMTEMPLATE;
  2010. #endif // UNICODE
  2011. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEA;
  2012. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATEW;
  2013. #ifdef UNICODE
  2014. typedef LPDLGITEMTEMPLATEW LPDLGITEMTEMPLATE;
  2015. #else
  2016. typedef LPDLGITEMTEMPLATEA LPDLGITEMTEMPLATE;
  2017. #endif // UNICODE
  2018.  
  2019. #pragma pack()      /* Resume normal packing */
  2020. #endif  /* !RC_INVOKED */
  2021.  
  2022. HWND
  2023. WINAPI
  2024. CreateDialogParamA(
  2025.     HINSTANCE hInstance,
  2026.     LPCSTR lpTemplateName,
  2027.     HWND hWndParent ,
  2028.     DLGPROC lpDialogFunc,
  2029.     LPARAM dwInitParam);
  2030. HWND
  2031. WINAPI
  2032. CreateDialogParamW(
  2033.     HINSTANCE hInstance,
  2034.     LPCWSTR lpTemplateName,
  2035.     HWND hWndParent ,
  2036.     DLGPROC lpDialogFunc,
  2037.     LPARAM dwInitParam);
  2038. #ifdef UNICODE
  2039. #define CreateDialogParam  CreateDialogParamW
  2040. #else
  2041. #define CreateDialogParam  CreateDialogParamA
  2042. #endif // !UNICODE
  2043.  
  2044. HWND
  2045. WINAPI
  2046. CreateDialogIndirectParamA(
  2047.     HINSTANCE hInstance,
  2048.     LPCDLGTEMPLATEA lpTemplate,
  2049.     HWND hWndParent,
  2050.     DLGPROC lpDialogFunc,
  2051.     LPARAM dwInitParam);
  2052. HWND
  2053. WINAPI
  2054. CreateDialogIndirectParamW(
  2055.     HINSTANCE hInstance,
  2056.     LPCDLGTEMPLATEW lpTemplate,
  2057.     HWND hWndParent,
  2058.     DLGPROC lpDialogFunc,
  2059.     LPARAM dwInitParam);
  2060. #ifdef UNICODE
  2061. #define CreateDialogIndirectParam  CreateDialogIndirectParamW
  2062. #else
  2063. #define CreateDialogIndirectParam  CreateDialogIndirectParamA
  2064. #endif // !UNICODE
  2065.  
  2066. #define CreateDialogA(hInstance, lpName, hWndParent, lpDialogFunc) \
  2067. CreateDialogParamA(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  2068. #define CreateDialogW(hInstance, lpName, hWndParent, lpDialogFunc) \
  2069. CreateDialogParamW(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  2070. #ifdef UNICODE
  2071. #define CreateDialog  CreateDialogW
  2072. #else
  2073. #define CreateDialog  CreateDialogA
  2074. #endif // !UNICODE
  2075.  
  2076. #define CreateDialogIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  2077. CreateDialogIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  2078. #define CreateDialogIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  2079. CreateDialogIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  2080. #ifdef UNICODE
  2081. #define CreateDialogIndirect  CreateDialogIndirectW
  2082. #else
  2083. #define CreateDialogIndirect  CreateDialogIndirectA
  2084. #endif // !UNICODE
  2085.  
  2086. int
  2087. WINAPI
  2088. DialogBoxParamA(
  2089.     HINSTANCE hInstance,
  2090.     LPCSTR lpTemplateName,
  2091.     HWND hWndParent ,
  2092.     DLGPROC lpDialogFunc,
  2093.     LPARAM dwInitParam);
  2094. int
  2095. WINAPI
  2096. DialogBoxParamW(
  2097.     HINSTANCE hInstance,
  2098.     LPCWSTR lpTemplateName,
  2099.     HWND hWndParent ,
  2100.     DLGPROC lpDialogFunc,
  2101.     LPARAM dwInitParam);
  2102. #ifdef UNICODE
  2103. #define DialogBoxParam  DialogBoxParamW
  2104. #else
  2105. #define DialogBoxParam  DialogBoxParamA
  2106. #endif // !UNICODE
  2107.  
  2108. int
  2109. WINAPI
  2110. DialogBoxIndirectParamA(
  2111.     HINSTANCE hInstance,
  2112.     LPCDLGTEMPLATEA hDialogTemplate,
  2113.     HWND hWndParent ,
  2114.     DLGPROC lpDialogFunc,
  2115.     LPARAM dwInitParam);
  2116. int
  2117. WINAPI
  2118. DialogBoxIndirectParamW(
  2119.     HINSTANCE hInstance,
  2120.     LPCDLGTEMPLATEW hDialogTemplate,
  2121.     HWND hWndParent ,
  2122.     DLGPROC lpDialogFunc,
  2123.     LPARAM dwInitParam);
  2124. #ifdef UNICODE
  2125. #define DialogBoxIndirectParam  DialogBoxIndirectParamW
  2126. #else
  2127. #define DialogBoxIndirectParam  DialogBoxIndirectParamA
  2128. #endif // !UNICODE
  2129.  
  2130. #define DialogBoxA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  2131. DialogBoxParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  2132. #define DialogBoxW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  2133. DialogBoxParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  2134. #ifdef UNICODE
  2135. #define DialogBox  DialogBoxW
  2136. #else
  2137. #define DialogBox  DialogBoxA
  2138. #endif // !UNICODE
  2139.  
  2140. #define DialogBoxIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  2141. DialogBoxIndirectParamA(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  2142. #define DialogBoxIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  2143. DialogBoxIndirectParamW(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  2144. #ifdef UNICODE
  2145. #define DialogBoxIndirect  DialogBoxIndirectW
  2146. #else
  2147. #define DialogBoxIndirect  DialogBoxIndirectA
  2148. #endif // !UNICODE
  2149.  
  2150. BOOL
  2151. WINAPI
  2152. EndDialog(
  2153.     HWND hDlg,
  2154.     int nResult);
  2155.  
  2156. HWND
  2157. WINAPI
  2158. GetDlgItem(
  2159.     HWND hDlg,
  2160.     int nIDDlgItem);
  2161.  
  2162. BOOL
  2163. WINAPI
  2164. SetDlgItemInt(
  2165.     HWND hDlg,
  2166.     int nIDDlgItem,
  2167.     UINT uValue,
  2168.     BOOL bSigned);
  2169.  
  2170. UINT
  2171. WINAPI
  2172. GetDlgItemInt(
  2173.     HWND hDlg,
  2174.     int nIDDlgItem,
  2175.     BOOL *lpTranslated,
  2176.     BOOL bSigned);
  2177.  
  2178. BOOL
  2179. WINAPI
  2180. SetDlgItemTextA(
  2181.     HWND hDlg,
  2182.     int nIDDlgItem,
  2183.     LPCSTR lpString);
  2184. BOOL
  2185. WINAPI
  2186. SetDlgItemTextW(
  2187.     HWND hDlg,
  2188.     int nIDDlgItem,
  2189.     LPCWSTR lpString);
  2190. #ifdef UNICODE
  2191. #define SetDlgItemText  SetDlgItemTextW
  2192. #else
  2193. #define SetDlgItemText  SetDlgItemTextA
  2194. #endif // !UNICODE
  2195.  
  2196. UINT
  2197. WINAPI
  2198. GetDlgItemTextA(
  2199.     HWND hDlg,
  2200.     int nIDDlgItem,
  2201.     LPSTR lpString,
  2202.     int nMaxCount);
  2203. UINT
  2204. WINAPI
  2205. GetDlgItemTextW(
  2206.     HWND hDlg,
  2207.     int nIDDlgItem,
  2208.     LPWSTR lpString,
  2209.     int nMaxCount);
  2210. #ifdef UNICODE
  2211. #define GetDlgItemText  GetDlgItemTextW
  2212. #else
  2213. #define GetDlgItemText  GetDlgItemTextA
  2214. #endif // !UNICODE
  2215.  
  2216. BOOL
  2217. WINAPI
  2218. CheckDlgButton(
  2219.     HWND hDlg,
  2220.     int nIDButton,
  2221.     UINT uCheck);
  2222.  
  2223. BOOL
  2224. WINAPI
  2225. CheckRadioButton(
  2226.     HWND hDlg,
  2227.     int nIDFirstButton,
  2228.     int nIDLastButton,
  2229.     int nIDCheckButton);
  2230.  
  2231. UINT
  2232. WINAPI
  2233. IsDlgButtonChecked(
  2234.     HWND hDlg,
  2235.     int nIDButton);
  2236.  
  2237. LONG
  2238. WINAPI
  2239. SendDlgItemMessageA(
  2240.     HWND hDlg,
  2241.     int nIDDlgItem,
  2242.     UINT Msg,
  2243.     WPARAM wParam,
  2244.     LPARAM lParam);
  2245. LONG
  2246. WINAPI
  2247. SendDlgItemMessageW(
  2248.     HWND hDlg,
  2249.     int nIDDlgItem,
  2250.     UINT Msg,
  2251.     WPARAM wParam,
  2252.     LPARAM lParam);
  2253. #ifdef UNICODE
  2254. #define SendDlgItemMessage  SendDlgItemMessageW
  2255. #else
  2256. #define SendDlgItemMessage  SendDlgItemMessageA
  2257. #endif // !UNICODE
  2258.  
  2259. HWND
  2260. WINAPI
  2261. GetNextDlgGroupItem(
  2262.     HWND hDlg,
  2263.     HWND hCtl,
  2264.     BOOL bPrevious);
  2265.  
  2266. HWND
  2267. WINAPI
  2268. GetNextDlgTabItem(
  2269.     HWND hDlg,
  2270.     HWND hCtl,
  2271.     BOOL bPrevious);
  2272.  
  2273. int
  2274. WINAPI
  2275. GetDlgCtrlID(
  2276.     HWND hWnd);
  2277.  
  2278. long
  2279. WINAPI
  2280. GetDialogBaseUnits(VOID);
  2281.  
  2282. LRESULT
  2283. WINAPI
  2284. DefDlgProcA(
  2285.     HWND hDlg,
  2286.     UINT Msg,
  2287.     WPARAM wParam,
  2288.     LPARAM lParam);
  2289. LRESULT
  2290. WINAPI
  2291. DefDlgProcW(
  2292.     HWND hDlg,
  2293.     UINT Msg,
  2294.     WPARAM wParam,
  2295.     LPARAM lParam);
  2296. #ifdef UNICODE
  2297. #define DefDlgProc  DefDlgProcW
  2298. #else
  2299. #define DefDlgProc  DefDlgProcA
  2300. #endif // !UNICODE
  2301.  
  2302. /*
  2303.  * Window extra byted needed for private dialog classes.
  2304.  */
  2305. #define DLGWINDOWEXTRA 30
  2306.  
  2307. #endif /* !NOCTLMGR */
  2308.  
  2309. #ifndef NOMSG
  2310.  
  2311. BOOL
  2312. WINAPI
  2313. CallMsgFilterA(
  2314.     LPMSG lpMsg,
  2315.     int nCode);
  2316. BOOL
  2317. WINAPI
  2318. CallMsgFilterW(
  2319.     LPMSG lpMsg,
  2320.     int nCode);
  2321. #ifdef UNICODE
  2322. #define CallMsgFilter  CallMsgFilterW
  2323. #else
  2324. #define CallMsgFilter  CallMsgFilterA
  2325. #endif // !UNICODE
  2326.  
  2327. #endif /* !NOMSG */
  2328.  
  2329. #ifndef NOCLIPBOARD
  2330.  
  2331. /*
  2332.  * Clipboard Manager Functions
  2333.  */
  2334. BOOL
  2335. WINAPI
  2336. OpenClipboard(
  2337.     HWND hWndNewOwner);
  2338.  
  2339. BOOL
  2340. WINAPI
  2341. CloseClipboard(
  2342.     VOID);
  2343.  
  2344. HWND
  2345. WINAPI
  2346. GetClipboardOwner(
  2347.     VOID);
  2348.  
  2349. HWND
  2350. WINAPI
  2351. SetClipboardViewer(
  2352.     HWND hWndNewViewer);
  2353.  
  2354. HWND
  2355. WINAPI
  2356. GetClipboardViewer(
  2357.     VOID);
  2358.  
  2359. BOOL
  2360. WINAPI
  2361. ChangeClipboardChain(
  2362.     HWND hWndRemove,
  2363.     HWND hWndNewNext);
  2364.  
  2365. HANDLE
  2366. WINAPI
  2367. SetClipboardData(
  2368.     UINT uFormat,
  2369.     HANDLE hMem);
  2370.  
  2371. HANDLE
  2372. WINAPI
  2373.     GetClipboardData(
  2374.     UINT uFormat);
  2375.  
  2376. UINT
  2377. WINAPI
  2378. RegisterClipboardFormatA(
  2379.     LPCSTR lpszFormat);
  2380. UINT
  2381. WINAPI
  2382. RegisterClipboardFormatW(
  2383.     LPCWSTR lpszFormat);
  2384. #ifdef UNICODE
  2385. #define RegisterClipboardFormat  RegisterClipboardFormatW
  2386. #else
  2387. #define RegisterClipboardFormat  RegisterClipboardFormatA
  2388. #endif // !UNICODE
  2389.  
  2390. int
  2391. WINAPI
  2392. CountClipboardFormats(
  2393.     VOID);
  2394.  
  2395. UINT
  2396. WINAPI
  2397. EnumClipboardFormats(
  2398.     UINT format);
  2399.  
  2400. int
  2401. WINAPI
  2402. GetClipboardFormatNameA(
  2403.     UINT format,
  2404.     LPSTR lpszFormatName,
  2405.     int cchMaxCount);
  2406. int
  2407. WINAPI
  2408. GetClipboardFormatNameW(
  2409.     UINT format,
  2410.     LPWSTR lpszFormatName,
  2411.     int cchMaxCount);
  2412. #ifdef UNICODE
  2413. #define GetClipboardFormatName  GetClipboardFormatNameW
  2414. #else
  2415. #define GetClipboardFormatName  GetClipboardFormatNameA
  2416. #endif // !UNICODE
  2417.  
  2418. BOOL
  2419. WINAPI
  2420. EmptyClipboard(
  2421.     VOID);
  2422.  
  2423. BOOL
  2424. WINAPI
  2425. IsClipboardFormatAvailable(
  2426.     UINT format);
  2427.  
  2428. int
  2429. WINAPI
  2430. GetPriorityClipboardFormat(
  2431.     UINT *paFormatPriorityList,
  2432.     int cFormats);
  2433.  
  2434. HWND
  2435. WINAPI
  2436. GetOpenClipboardWindow(
  2437.     VOID);
  2438.  
  2439. #endif /* !NOCLIPBOARD */
  2440.  
  2441. /*
  2442.  * Character Translation Routines
  2443.  */
  2444.  
  2445. BOOL
  2446. WINAPI
  2447. CharToOemA(
  2448.     LPCSTR lpszSrc,
  2449.     LPSTR lpszDst);
  2450. BOOL
  2451. WINAPI
  2452. CharToOemW(
  2453.     LPCWSTR lpszSrc,
  2454.     LPSTR lpszDst);
  2455. #ifdef UNICODE
  2456. #define CharToOem  CharToOemW
  2457. #else
  2458. #define CharToOem  CharToOemA
  2459. #endif // !UNICODE
  2460.  
  2461. BOOL
  2462. WINAPI
  2463. OemToCharA(
  2464.     LPCSTR lpszSrc,
  2465.     LPSTR lpszDst);
  2466. BOOL
  2467. WINAPI
  2468. OemToCharW(
  2469.     LPCSTR lpszSrc,
  2470.     LPWSTR lpszDst);
  2471. #ifdef UNICODE
  2472. #define OemToChar  OemToCharW
  2473. #else
  2474. #define OemToChar  OemToCharA
  2475. #endif // !UNICODE
  2476.  
  2477. BOOL
  2478. WINAPI
  2479. CharToOemBuffA(
  2480.     LPCSTR lpszSrc,
  2481.     LPSTR lpszDst,
  2482.     DWORD cchDstLength);
  2483. BOOL
  2484. WINAPI
  2485. CharToOemBuffW(
  2486.     LPCWSTR lpszSrc,
  2487.     LPSTR lpszDst,
  2488.     DWORD cchDstLength);
  2489. #ifdef UNICODE
  2490. #define CharToOemBuff  CharToOemBuffW
  2491. #else
  2492. #define CharToOemBuff  CharToOemBuffA
  2493. #endif // !UNICODE
  2494.  
  2495. BOOL
  2496. WINAPI
  2497. OemToCharBuffA(
  2498.     LPCSTR lpszSrc,
  2499.     LPSTR lpszDst,
  2500.     DWORD cchDstLength);
  2501. BOOL
  2502. WINAPI
  2503. OemToCharBuffW(
  2504.     LPCSTR lpszSrc,
  2505.     LPWSTR lpszDst,
  2506.     DWORD cchDstLength);
  2507. #ifdef UNICODE
  2508. #define OemToCharBuff  OemToCharBuffW
  2509. #else
  2510. #define OemToCharBuff  OemToCharBuffA
  2511. #endif // !UNICODE
  2512.  
  2513. LPSTR
  2514. WINAPI
  2515. CharUpperA(
  2516.     LPSTR lpsz);
  2517. LPWSTR
  2518. WINAPI
  2519. CharUpperW(
  2520.     LPWSTR lpsz);
  2521. #ifdef UNICODE
  2522. #define CharUpper  CharUpperW
  2523. #else
  2524. #define CharUpper  CharUpperA
  2525. #endif // !UNICODE
  2526.  
  2527. DWORD
  2528. WINAPI
  2529. CharUpperBuffA(
  2530.     LPSTR lpsz,
  2531.     DWORD cchLength);
  2532. DWORD
  2533. WINAPI
  2534. CharUpperBuffW(
  2535.     LPWSTR lpsz,
  2536.     DWORD cchLength);
  2537. #ifdef UNICODE
  2538. #define CharUpperBuff  CharUpperBuffW
  2539. #else
  2540. #define CharUpperBuff  CharUpperBuffA
  2541. #endif // !UNICODE
  2542.  
  2543. LPSTR
  2544. WINAPI
  2545. CharLowerA(
  2546.     LPSTR lpsz);
  2547. LPWSTR
  2548. WINAPI
  2549. CharLowerW(
  2550.     LPWSTR lpsz);
  2551. #ifdef UNICODE
  2552. #define CharLower  CharLowerW
  2553. #else
  2554. #define CharLower  CharLowerA
  2555. #endif // !UNICODE
  2556.  
  2557. DWORD
  2558. WINAPI
  2559. CharLowerBuffA(
  2560.     LPSTR lpsz,
  2561.     DWORD cchLength);
  2562. DWORD
  2563. WINAPI
  2564. CharLowerBuffW(
  2565.     LPWSTR lpsz,
  2566.     DWORD cchLength);
  2567. #ifdef UNICODE
  2568. #define CharLowerBuff  CharLowerBuffW
  2569. #else
  2570. #define CharLowerBuff  CharLowerBuffA
  2571. #endif // !UNICODE
  2572.  
  2573. LPSTR
  2574. WINAPI
  2575. CharNextA(
  2576.     LPCSTR lpsz);
  2577. LPWSTR
  2578. WINAPI
  2579. CharNextW(
  2580.     LPCWSTR lpsz);
  2581. #ifdef UNICODE
  2582. #define CharNext  CharNextW
  2583. #else
  2584. #define CharNext  CharNextA
  2585. #endif // !UNICODE
  2586.  
  2587. LPSTR
  2588. WINAPI
  2589. CharPrevA(
  2590.     LPCSTR lpszStart,
  2591.     LPCSTR lpszCurrent);
  2592. LPWSTR
  2593. WINAPI
  2594. CharPrevW(
  2595.     LPCWSTR lpszStart,
  2596.     LPCWSTR lpszCurrent);
  2597. #ifdef UNICODE
  2598. #define CharPrev  CharPrevW
  2599. #else
  2600. #define CharPrev  CharPrevA
  2601. #endif // !UNICODE
  2602.  
  2603. /*
  2604.  * Compatibility defines for character translation routines
  2605.  */
  2606. #define AnsiToOem CharToOemA
  2607. #define OemToAnsi OemToCharA
  2608. #define AnsiToOemBuff CharToOemBuffA
  2609. #define OemToAnsiBuff OemToCharBuffA
  2610. #define AnsiUpper CharUpperA
  2611. #define AnsiUpperBuff CharUpperBuffA
  2612. #define AnsiLower CharLowerA
  2613. #define AnsiLowerBuff CharLowerBuffA
  2614. #define AnsiNext CharNextA
  2615. #define AnsiPrev CharPrevA
  2616.  
  2617. #ifndef  NOLANGUAGE
  2618. /*
  2619.  * Language dependent Routines
  2620.  */
  2621.  
  2622. BOOL
  2623. WINAPI
  2624. IsCharAlphaA(
  2625.     CHAR ch);
  2626. BOOL
  2627. WINAPI
  2628. IsCharAlphaW(
  2629.     WCHAR ch);
  2630. #ifdef UNICODE
  2631. #define IsCharAlpha  IsCharAlphaW
  2632. #else
  2633. #define IsCharAlpha  IsCharAlphaA
  2634. #endif // !UNICODE
  2635.  
  2636. BOOL
  2637. WINAPI
  2638. IsCharAlphaNumericA(
  2639.     CHAR ch);
  2640. BOOL
  2641. WINAPI
  2642. IsCharAlphaNumericW(
  2643.     WCHAR ch);
  2644. #ifdef UNICODE
  2645. #define IsCharAlphaNumeric  IsCharAlphaNumericW
  2646. #else
  2647. #define IsCharAlphaNumeric  IsCharAlphaNumericA
  2648. #endif // !UNICODE
  2649.  
  2650. BOOL
  2651. WINAPI
  2652. IsCharUpperA(
  2653.     CHAR ch);
  2654. BOOL
  2655. WINAPI
  2656. IsCharUpperW(
  2657.     WCHAR ch);
  2658. #ifdef UNICODE
  2659. #define IsCharUpper  IsCharUpperW
  2660. #else
  2661. #define IsCharUpper  IsCharUpperA
  2662. #endif // !UNICODE
  2663.  
  2664. BOOL
  2665. WINAPI
  2666. IsCharLowerA(
  2667.     CHAR ch);
  2668. BOOL
  2669. WINAPI
  2670. IsCharLowerW(
  2671.     WCHAR ch);
  2672. #ifdef UNICODE
  2673. #define IsCharLower  IsCharLowerW
  2674. #else
  2675. #define IsCharLower  IsCharLowerA
  2676. #endif // !UNICODE
  2677.  
  2678. #endif  /* !NOLANGUAGE */
  2679.  
  2680. HWND
  2681. WINAPI
  2682. SetFocus(
  2683.     HWND hWnd);
  2684.  
  2685. HWND
  2686. WINAPI
  2687. GetActiveWindow(
  2688.     VOID);
  2689.  
  2690. HWND
  2691. WINAPI
  2692. GetFocus(
  2693.     VOID);
  2694.  
  2695. UINT
  2696. WINAPI
  2697. GetKBCodePage(
  2698.     VOID);
  2699.  
  2700. SHORT
  2701. WINAPI
  2702. GetKeyState(
  2703.     int nVirtKey);
  2704.  
  2705. SHORT
  2706. WINAPI
  2707. GetAsyncKeyState(
  2708.     int vKey);
  2709.  
  2710. BOOL
  2711. WINAPI
  2712. GetKeyboardState(
  2713.     PBYTE lpKeyState);
  2714.  
  2715. BOOL
  2716. WINAPI
  2717. SetKeyboardState(
  2718.     LPBYTE lpKeyState);
  2719.  
  2720. int
  2721. WINAPI
  2722. GetKeyNameTextA(
  2723.     LONG lParam,
  2724.     LPSTR lpString,
  2725.     int nSize
  2726.     );
  2727. int
  2728. WINAPI
  2729. GetKeyNameTextW(
  2730.     LONG lParam,
  2731.     LPWSTR lpString,
  2732.     int nSize
  2733.     );
  2734. #ifdef UNICODE
  2735. #define GetKeyNameText  GetKeyNameTextW
  2736. #else
  2737. #define GetKeyNameText  GetKeyNameTextA
  2738. #endif // !UNICODE
  2739.  
  2740. int
  2741. WINAPI
  2742. GetKeyboardType(
  2743.     int nTypeFlag);
  2744.  
  2745. int
  2746. WINAPI
  2747. ToAscii(
  2748.     UINT uVirtKey,
  2749.     UINT uScanCode,
  2750.     PBYTE lpKeyState,
  2751.     LPWORD lpChar,
  2752.     UINT uFlags);
  2753.  
  2754. int
  2755. WINAPI
  2756. ToUnicode(
  2757.     UINT wVirtKey,
  2758.     UINT wScanCode,
  2759.     PBYTE lpKeyState,
  2760.     LPWSTR pwszBuff,
  2761.     int cchBuff,
  2762.     UINT wFlags);
  2763.  
  2764. DWORD
  2765. WINAPI
  2766. OemKeyScan(
  2767.     WORD wOemChar);
  2768.  
  2769. SHORT
  2770. WINAPI
  2771. VkKeyScanA(
  2772.     CHAR ch);
  2773. SHORT
  2774. WINAPI
  2775. VkKeyScanW(
  2776.     WCHAR ch);
  2777. #ifdef UNICODE
  2778. #define VkKeyScan  VkKeyScanW
  2779. #else
  2780. #define VkKeyScan  VkKeyScanA
  2781. #endif // !UNICODE
  2782.  
  2783. #define KEYEVENTF_EXTENDEDKEY 0x0001
  2784. #define KEYEVENTF_KEYUP       0x0002
  2785.  
  2786. VOID WINAPI
  2787. keybd_event(
  2788.     BYTE bVk,
  2789.     BYTE bScan,
  2790.     DWORD dwFlags,
  2791.     DWORD dwExtraInfo);
  2792.  
  2793. #define MOUSEEVENTF_MOVE        0x0001 /* mouse move */
  2794. #define MOUSEEVENTF_LEFTDOWN    0x0002 /* left button down */
  2795. #define MOUSEEVENTF_LEFTUP      0x0004 /* left button up */
  2796. #define MOUSEEVENTF_RIGHTDOWN   0x0008 /* right button down */
  2797. #define MOUSEEVENTF_RIGHTUP     0x0010 /* right button up */
  2798. #define MOUSEEVENTF_MIDDLEDOWN  0x0020 /* middle button down */
  2799. #define MOUSEEVENTF_MIDDLEUP    0x0040 /* middle button up */
  2800. #define MOUSEEVENTF_ABSOLUTE    0x8000 /* absolute move */
  2801.  
  2802. VOID WINAPI
  2803. mouse_event(
  2804.     DWORD dwFlags,
  2805.     DWORD dx,
  2806.     DWORD dy,
  2807.     DWORD cButtons,
  2808.     DWORD dwExtraInfo);
  2809.  
  2810. UINT
  2811. WINAPI
  2812. MapVirtualKeyA(
  2813.     UINT uCode,
  2814.     UINT uMapType);
  2815. UINT
  2816. WINAPI
  2817. MapVirtualKeyW(
  2818.     UINT uCode,
  2819.     UINT uMapType);
  2820. #ifdef UNICODE
  2821. #define MapVirtualKey  MapVirtualKeyW
  2822. #else
  2823. #define MapVirtualKey  MapVirtualKeyA
  2824. #endif // !UNICODE
  2825.  
  2826. BOOL
  2827. WINAPI
  2828. GetInputState(
  2829.     VOID);
  2830.  
  2831. DWORD
  2832. WINAPI
  2833. GetQueueStatus(
  2834.     UINT flags);
  2835.  
  2836. HWND
  2837. WINAPI
  2838. GetCapture(
  2839.     VOID);
  2840.  
  2841. HWND
  2842. WINAPI
  2843. SetCapture(
  2844.     HWND hWnd);
  2845.  
  2846. BOOL
  2847. WINAPI
  2848. ReleaseCapture(
  2849.     VOID);
  2850.  
  2851. DWORD
  2852. WINAPI
  2853. MsgWaitForMultipleObjects(
  2854.     DWORD nCount,
  2855.     LPHANDLE pHandles,
  2856.     BOOL fWaitAll,
  2857.     DWORD dwMilliseconds,
  2858.     DWORD dwWakeMask);
  2859.  
  2860. /*
  2861.  * Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
  2862.  */
  2863. #define QS_KEY           0x01
  2864. #define QS_MOUSEMOVE     0x02
  2865. #define QS_MOUSEBUTTON   0x04
  2866. #define QS_POSTMESSAGE   0x08
  2867. #define QS_TIMER         0x10
  2868. #define QS_PAINT         0x20
  2869. #define QS_SENDMESSAGE   0x40
  2870. #define QS_HOTKEY        0x80
  2871.  
  2872. #define QS_MOUSE        (QS_MOUSEMOVE     | \
  2873.                          QS_MOUSEBUTTON)
  2874.  
  2875. #define QS_INPUT        (QS_MOUSE         | \
  2876.                          QS_KEY)
  2877.  
  2878. #define QS_ALLEVENTS    (QS_INPUT         | \
  2879.                          QS_POSTMESSAGE   | \
  2880.                          QS_TIMER         | \
  2881.                          QS_PAINT         | \
  2882.                          QS_HOTKEY)
  2883.  
  2884. #define QS_ALLINPUT     (QS_SENDMESSAGE   | \
  2885.                          QS_PAINT         | \
  2886.                          QS_TIMER         | \
  2887.                          QS_POSTMESSAGE   | \
  2888.                          QS_MOUSEBUTTON   | \
  2889.                          QS_MOUSEMOVE     | \
  2890.                          QS_HOTKEY        | \
  2891.                          QS_KEY)
  2892.  
  2893.  
  2894. /*
  2895.  * Windows Functions
  2896.  */
  2897. UINT
  2898. WINAPI
  2899. SetTimer(
  2900.     HWND hWnd ,
  2901.     UINT nIDEvent,
  2902.     UINT uElapse,
  2903.     TIMERPROC lpTimerFunc);
  2904.  
  2905. BOOL
  2906. WINAPI
  2907. KillTimer(
  2908.     HWND hWnd,
  2909.     UINT uIDEvent);
  2910.  
  2911. BOOL
  2912. WINAPI
  2913. IsWindowUnicode(
  2914.     HWND hWnd);
  2915.  
  2916. BOOL
  2917. WINAPI
  2918. EnableWindow(
  2919.     HWND hWnd,
  2920.     BOOL bEnable);
  2921.  
  2922. BOOL
  2923. WINAPI
  2924. IsWindowEnabled(
  2925.     HWND hWnd);
  2926.  
  2927. HACCEL
  2928. WINAPI
  2929. LoadAcceleratorsA(
  2930.     HINSTANCE hInstance,
  2931.     LPCSTR lpTableName);
  2932. HACCEL
  2933. WINAPI
  2934. LoadAcceleratorsW(
  2935.     HINSTANCE hInstance,
  2936.     LPCWSTR lpTableName);
  2937. #ifdef UNICODE
  2938. #define LoadAccelerators  LoadAcceleratorsW
  2939. #else
  2940. #define LoadAccelerators  LoadAcceleratorsA
  2941. #endif // !UNICODE
  2942.  
  2943. HACCEL
  2944. WINAPI
  2945. CreateAcceleratorTableA(
  2946.     LPACCEL, int);
  2947. HACCEL
  2948. WINAPI
  2949. CreateAcceleratorTableW(
  2950.     LPACCEL, int);
  2951. #ifdef UNICODE
  2952. #define CreateAcceleratorTable  CreateAcceleratorTableW
  2953. #else
  2954. #define CreateAcceleratorTable  CreateAcceleratorTableA
  2955. #endif // !UNICODE
  2956.  
  2957. BOOL
  2958. WINAPI
  2959. DestroyAcceleratorTable(
  2960.     HACCEL hAccel);
  2961.  
  2962. int
  2963. WINAPI
  2964. CopyAcceleratorTableA(
  2965.     HACCEL hAccelSrc,
  2966.     LPACCEL lpAccelDst,
  2967.     int cAccelEntries);
  2968. int
  2969. WINAPI
  2970. CopyAcceleratorTableW(
  2971.     HACCEL hAccelSrc,
  2972.     LPACCEL lpAccelDst,
  2973.     int cAccelEntries);
  2974. #ifdef UNICODE
  2975. #define CopyAcceleratorTable  CopyAcceleratorTableW
  2976. #else
  2977. #define CopyAcceleratorTable  CopyAcceleratorTableA
  2978. #endif // !UNICODE
  2979.  
  2980. #ifndef NOMSG
  2981.  
  2982. int
  2983. WINAPI
  2984. TranslateAcceleratorA(
  2985.     HWND hWnd,
  2986.     HACCEL hAccTable,
  2987.     LPMSG lpMsg);
  2988. int
  2989. WINAPI
  2990. TranslateAcceleratorW(
  2991.     HWND hWnd,
  2992.     HACCEL hAccTable,
  2993.     LPMSG lpMsg);
  2994. #ifdef UNICODE
  2995. #define TranslateAccelerator  TranslateAcceleratorW
  2996. #else
  2997. #define TranslateAccelerator  TranslateAcceleratorA
  2998. #endif // !UNICODE
  2999.  
  3000. #endif /* !NOMSG */
  3001.  
  3002. #ifndef NOSYSMETRICS
  3003.  
  3004. /*
  3005.  * GetSystemMetrics() codes
  3006.  */
  3007. #define SM_CXSCREEN         0
  3008. #define SM_CYSCREEN         1
  3009. #define SM_CXVSCROLL        2
  3010. #define SM_CYHSCROLL        3
  3011. #define SM_CYCAPTION        4
  3012. #define SM_CXBORDER         5
  3013. #define SM_CYBORDER         6
  3014. #define SM_CXDLGFRAME       7
  3015. #define SM_CYDLGFRAME       8
  3016. #define SM_CYVTHUMB         9
  3017. #define SM_CXHTHUMB         10
  3018. #define SM_CXICON           11
  3019. #define SM_CYICON           12
  3020. #define SM_CXCURSOR         13
  3021. #define SM_CYCURSOR         14
  3022. #define SM_CYMENU           15
  3023. #define SM_CXFULLSCREEN     16
  3024. #define SM_CYFULLSCREEN     17
  3025. #define SM_CYKANJIWINDOW    18
  3026. #define SM_MOUSEPRESENT     19
  3027. #define SM_CYVSCROLL        20
  3028. #define SM_CXHSCROLL        21
  3029. #define SM_DEBUG            22
  3030. #define SM_SWAPBUTTON       23
  3031. #define SM_RESERVED1        24
  3032. #define SM_RESERVED2        25
  3033. #define SM_RESERVED3        26
  3034. #define SM_RESERVED4        27
  3035. #define SM_CXMIN            28
  3036. #define SM_CYMIN            29
  3037. #define SM_CXSIZE           30
  3038. #define SM_CYSIZE           31
  3039. #define SM_CXFRAME          32
  3040. #define SM_CYFRAME          33
  3041. #define SM_CXMINTRACK       34
  3042. #define SM_CYMINTRACK       35
  3043. #define SM_CXDOUBLECLK       36
  3044. #define SM_CYDOUBLECLK       37
  3045. #define SM_CXICONSPACING     38
  3046. #define SM_CYICONSPACING     39
  3047. #define SM_MENUDROPALIGNMENT 40
  3048. #define SM_PENWINDOWS        41
  3049. #define SM_DBCSENABLED       42
  3050. #define SM_CMOUSEBUTTONS     43
  3051. #define SM_CMETRICS          44
  3052.  
  3053. int
  3054. WINAPI
  3055. GetSystemMetrics(
  3056.     int nIndex);
  3057.  
  3058. #endif /* !NOSYSMETRICS */
  3059.  
  3060. #ifndef NOMENUS
  3061.  
  3062. HMENU
  3063. WINAPI
  3064. LoadMenuA(
  3065.     HINSTANCE hInstance,
  3066.     LPCSTR lpMenuName);
  3067. HMENU
  3068. WINAPI
  3069. LoadMenuW(
  3070.     HINSTANCE hInstance,
  3071.     LPCWSTR lpMenuName);
  3072. #ifdef UNICODE
  3073. #define LoadMenu  LoadMenuW
  3074. #else
  3075. #define LoadMenu  LoadMenuA
  3076. #endif // !UNICODE
  3077.  
  3078. HMENU
  3079. WINAPI
  3080. LoadMenuIndirectA(
  3081.     CONST MENUTEMPLATEA *lpMenuTemplate);
  3082. HMENU
  3083. WINAPI
  3084. LoadMenuIndirectW(
  3085.     CONST MENUTEMPLATEW *lpMenuTemplate);
  3086. #ifdef UNICODE
  3087. #define LoadMenuIndirect  LoadMenuIndirectW
  3088. #else
  3089. #define LoadMenuIndirect  LoadMenuIndirectA
  3090. #endif // !UNICODE
  3091.  
  3092. HMENU
  3093. WINAPI
  3094. GetMenu(
  3095.     HWND hWnd);
  3096.  
  3097. BOOL
  3098. WINAPI
  3099. SetMenu(
  3100.     HWND hWnd,
  3101.     HMENU hMenu);
  3102.  
  3103. BOOL
  3104. WINAPI
  3105. ChangeMenuA(
  3106.     HMENU hMenu,
  3107.     UINT cmd,
  3108.     LPCSTR lpszNewItem,
  3109.     UINT cmdInsert,
  3110.     UINT flags);
  3111. BOOL
  3112. WINAPI
  3113. ChangeMenuW(
  3114.     HMENU hMenu,
  3115.     UINT cmd,
  3116.     LPCWSTR lpszNewItem,
  3117.     UINT cmdInsert,
  3118.     UINT flags);
  3119. #ifdef UNICODE
  3120. #define ChangeMenu  ChangeMenuW
  3121. #else
  3122. #define ChangeMenu  ChangeMenuA
  3123. #endif // !UNICODE
  3124.  
  3125. BOOL
  3126. WINAPI
  3127. HiliteMenuItem(
  3128.     HWND hWnd,
  3129.     HMENU hMenu,
  3130.     UINT uIDHiliteItem,
  3131.     UINT uHilite);
  3132.  
  3133. int
  3134. WINAPI
  3135. GetMenuStringA(
  3136.     HMENU hMenu,
  3137.     UINT uIDItem,
  3138.     LPSTR lpString,
  3139.     int nMaxCount,
  3140.     UINT uFlag);
  3141. int
  3142. WINAPI
  3143. GetMenuStringW(
  3144.     HMENU hMenu,
  3145.     UINT uIDItem,
  3146.     LPWSTR lpString,
  3147.     int nMaxCount,
  3148.     UINT uFlag);
  3149. #ifdef UNICODE
  3150. #define GetMenuString  GetMenuStringW
  3151. #else
  3152. #define GetMenuString  GetMenuStringA
  3153. #endif // !UNICODE
  3154.  
  3155. UINT
  3156. WINAPI
  3157. GetMenuState(
  3158.     HMENU hMenu,
  3159.     UINT uId,
  3160.     UINT uFlags);
  3161.  
  3162. BOOL
  3163. WINAPI
  3164. DrawMenuBar(
  3165.     HWND hWnd);
  3166.  
  3167. HMENU
  3168. WINAPI
  3169. GetSystemMenu(
  3170.     HWND hWnd,
  3171.     BOOL bRevert);
  3172.  
  3173. HMENU
  3174. WINAPI
  3175. CreateMenu(
  3176.     VOID);
  3177.  
  3178. HMENU
  3179. WINAPI
  3180. CreatePopupMenu(
  3181.     VOID);
  3182.  
  3183. BOOL
  3184. WINAPI
  3185. DestroyMenu(
  3186.     HMENU hMenu);
  3187.  
  3188. DWORD
  3189. WINAPI
  3190. CheckMenuItem(
  3191.     HMENU hMenu,
  3192.     UINT uIDCheckItem,
  3193.     UINT uCheck);
  3194.  
  3195. BOOL
  3196. WINAPI
  3197. EnableMenuItem(
  3198.     HMENU hMenu,
  3199.     UINT uIDEnableItem,
  3200.     UINT uEnable);
  3201.  
  3202. HMENU
  3203. WINAPI
  3204. GetSubMenu(
  3205.     HMENU hMenu,
  3206.     int nPos);
  3207.  
  3208. UINT
  3209. WINAPI
  3210. GetMenuItemID(
  3211.     HMENU hMenu,
  3212.     int nPos);
  3213.  
  3214. int
  3215. WINAPI
  3216. GetMenuItemCount(
  3217.     HMENU hMenu);
  3218.  
  3219. BOOL
  3220. WINAPI
  3221. InsertMenuA(
  3222.     HMENU hMenu,
  3223.     UINT uPosition,
  3224.     UINT uFlags,
  3225.     UINT uIDNewItem,
  3226.     LPCSTR lpNewItem
  3227.     );
  3228. BOOL
  3229. WINAPI
  3230. InsertMenuW(
  3231.     HMENU hMenu,
  3232.     UINT uPosition,
  3233.     UINT uFlags,
  3234.     UINT uIDNewItem,
  3235.     LPCWSTR lpNewItem
  3236.     );
  3237. #ifdef UNICODE
  3238. #define InsertMenu  InsertMenuW
  3239. #else
  3240. #define InsertMenu  InsertMenuA
  3241. #endif // !UNICODE
  3242.  
  3243. BOOL
  3244. WINAPI
  3245. AppendMenuA(
  3246.     HMENU hMenu,
  3247.     UINT uFlags,
  3248.     UINT uIDNewItem,
  3249.     LPCSTR lpNewItem
  3250.     );
  3251. BOOL
  3252. WINAPI
  3253. AppendMenuW(
  3254.     HMENU hMenu,
  3255.     UINT uFlags,
  3256.     UINT uIDNewItem,
  3257.     LPCWSTR lpNewItem
  3258.     );
  3259. #ifdef UNICODE
  3260. #define AppendMenu  AppendMenuW
  3261. #else
  3262. #define AppendMenu  AppendMenuA
  3263. #endif // !UNICODE
  3264.  
  3265. BOOL
  3266. WINAPI
  3267. ModifyMenuA(
  3268.     HMENU hMnu,
  3269.     UINT uPosition,
  3270.     UINT uFlags,
  3271.     UINT uIDNewItem,
  3272.     LPCSTR lpNewItem
  3273.     );
  3274. BOOL
  3275. WINAPI
  3276. ModifyMenuW(
  3277.     HMENU hMnu,
  3278.     UINT uPosition,
  3279.     UINT uFlags,
  3280.     UINT uIDNewItem,
  3281.     LPCWSTR lpNewItem
  3282.     );
  3283. #ifdef UNICODE
  3284. #define ModifyMenu  ModifyMenuW
  3285. #else
  3286. #define ModifyMenu  ModifyMenuA
  3287. #endif // !UNICODE
  3288.  
  3289. BOOL
  3290. WINAPI RemoveMenu(
  3291.     HMENU hMenu,
  3292.     UINT uPosition,
  3293.     UINT uFlags);
  3294.  
  3295. BOOL
  3296. WINAPI
  3297. DeleteMenu(
  3298.     HMENU hMenu,
  3299.     UINT uPosition,
  3300.     UINT uFlags);
  3301.  
  3302. BOOL
  3303. WINAPI
  3304. SetMenuItemBitmaps(
  3305.     HMENU hMenu,
  3306.     UINT uPosition,
  3307.     UINT uFlags,
  3308.     HBITMAP hBitmapUnchecked,
  3309.     HBITMAP hBitmapChecked);
  3310.  
  3311. LONG
  3312. WINAPI
  3313. GetMenuCheckMarkDimensions(
  3314.     VOID);
  3315.  
  3316. BOOL
  3317. WINAPI
  3318. TrackPopupMenu(
  3319.     HMENU hMenu,
  3320.     UINT uFlags,
  3321.     int x,
  3322.     int y,
  3323.     int nReserved,
  3324.     HWND hWnd,
  3325.     CONST RECT *prcRect);
  3326.  
  3327. /*
  3328.  * Flags for TrackPopupMenu
  3329.  */
  3330. #define TPM_LEFTBUTTON  0x0000L
  3331. #define TPM_RIGHTBUTTON 0x0002L
  3332. #define TPM_LEFTALIGN   0x0000L
  3333. #define TPM_CENTERALIGN 0x0004L
  3334. #define TPM_RIGHTALIGN  0x0008L
  3335.  
  3336. #endif /* !NOMENUS */
  3337.  
  3338. BOOL
  3339. WINAPI
  3340. DrawIcon(
  3341.     HDC hDC,
  3342.     int X,
  3343.     int Y,
  3344.     HICON hIcon);
  3345.  
  3346. #ifndef NODRAWTEXT
  3347.  
  3348. /*
  3349.  * DrawText() Format Flags
  3350.  */
  3351. #define DT_TOP              0x0000
  3352. #define DT_LEFT             0x0000
  3353. #define DT_CENTER           0x0001
  3354. #define DT_RIGHT            0x0002
  3355. #define DT_VCENTER          0x0004
  3356. #define DT_BOTTOM           0x0008
  3357. #define DT_WORDBREAK        0x0010
  3358. #define DT_SINGLELINE       0x0020
  3359. #define DT_EXPANDTABS       0x0040
  3360. #define DT_TABSTOP          0x0080
  3361. #define DT_NOCLIP           0x0100
  3362. #define DT_EXTERNALLEADING  0x0200
  3363. #define DT_CALCRECT         0x0400
  3364. #define DT_NOPREFIX         0x0800
  3365. #define DT_INTERNAL         0x1000
  3366.  
  3367. #endif /* !NODRAWTEXT */
  3368.  
  3369. int
  3370. WINAPI DrawTextA(
  3371.     HDC hDC,
  3372.     LPCSTR lpString,
  3373.     int nCount,
  3374.     LPRECT lpRect,
  3375.     UINT uFormat);
  3376. int
  3377. WINAPI DrawTextW(
  3378.     HDC hDC,
  3379.     LPCWSTR lpString,
  3380.     int nCount,
  3381.     LPRECT lpRect,
  3382.     UINT uFormat);
  3383. #ifdef UNICODE
  3384. #define DrawText  DrawTextW
  3385. #else
  3386. #define DrawText  DrawTextA
  3387. #endif // !UNICODE
  3388.  
  3389. BOOL
  3390. WINAPI
  3391. GrayStringA(
  3392.     HDC hDC,
  3393.     HBRUSH hBrush,
  3394.     GRAYSTRINGPROC lpOutputFunc,
  3395.     LPARAM lpData,
  3396.     int nCount,
  3397.     int X,
  3398.     int Y,
  3399.     int nWidth,
  3400.     int nHeight);
  3401. BOOL
  3402. WINAPI
  3403. GrayStringW(
  3404.     HDC hDC,
  3405.     HBRUSH hBrush,
  3406.     GRAYSTRINGPROC lpOutputFunc,
  3407.     LPARAM lpData,
  3408.     int nCount,
  3409.     int X,
  3410.     int Y,
  3411.     int nWidth,
  3412.     int nHeight);
  3413. #ifdef UNICODE
  3414. #define GrayString  GrayStringW
  3415. #else
  3416. #define GrayString  GrayStringA
  3417. #endif // !UNICODE
  3418.  
  3419. LONG
  3420. WINAPI
  3421. TabbedTextOutA(
  3422.     HDC hDC,
  3423.     int X,
  3424.     int Y,
  3425.     LPCSTR lpString,
  3426.     int nCount,
  3427.     int nTabPositions,
  3428.     LPINT lpnTabStopPositions,
  3429.     int nTabOrigin);
  3430. LONG
  3431. WINAPI
  3432. TabbedTextOutW(
  3433.     HDC hDC,
  3434.     int X,
  3435.     int Y,
  3436.     LPCWSTR lpString,
  3437.     int nCount,
  3438.     int nTabPositions,
  3439.     LPINT lpnTabStopPositions,
  3440.     int nTabOrigin);
  3441. #ifdef UNICODE
  3442. #define TabbedTextOut  TabbedTextOutW
  3443. #else
  3444. #define TabbedTextOut  TabbedTextOutA
  3445. #endif // !UNICODE
  3446.  
  3447. DWORD
  3448. WINAPI
  3449. GetTabbedTextExtentA(
  3450.     HDC hDC,
  3451.     LPCSTR lpString,
  3452.     int nCount,
  3453.     int nTabPositions,
  3454.     LPINT lpnTabStopPositions);
  3455. DWORD
  3456. WINAPI
  3457. GetTabbedTextExtentW(
  3458.     HDC hDC,
  3459.     LPCWSTR lpString,
  3460.     int nCount,
  3461.     int nTabPositions,
  3462.     LPINT lpnTabStopPositions);
  3463. #ifdef UNICODE
  3464. #define GetTabbedTextExtent  GetTabbedTextExtentW
  3465. #else
  3466. #define GetTabbedTextExtent  GetTabbedTextExtentA
  3467. #endif // !UNICODE
  3468.  
  3469. BOOL
  3470. WINAPI
  3471. UpdateWindow(
  3472.     HWND hWnd);
  3473.  
  3474. HWND
  3475. WINAPI
  3476. SetActiveWindow(
  3477.     HWND hWnd);
  3478.  
  3479. HWND
  3480. WINAPI
  3481. GetForegroundWindow(
  3482.     VOID);
  3483.  
  3484. BOOL
  3485. WINAPI
  3486. SetForegroundWindow(
  3487.     HWND hWnd);
  3488.  
  3489. HWND
  3490. WINAPI
  3491. WindowFromDC(
  3492.     HDC hDC);
  3493.  
  3494. HDC
  3495. WINAPI
  3496. GetDC(
  3497.     HWND hWnd);
  3498.  
  3499. HDC
  3500. WINAPI
  3501. GetDCEx(
  3502.     HWND hWnd ,
  3503.     HRGN hrgnClip,
  3504.     DWORD flags);
  3505.  
  3506. /*
  3507.  * GetDCEx() flags
  3508.  */
  3509. #define DCX_WINDOW           0x00000001L
  3510. #define DCX_CACHE            0x00000002L
  3511. #define DCX_NORESETATTRS     0x00000004L
  3512. #define DCX_CLIPCHILDREN     0x00000008L
  3513. #define DCX_CLIPSIBLINGS     0x00000010L
  3514. #define DCX_PARENTCLIP       0x00000020L
  3515.  
  3516. #define DCX_EXCLUDERGN       0x00000040L
  3517. #define DCX_INTERSECTRGN     0x00000080L
  3518.  
  3519. #define DCX_EXCLUDEUPDATE    0x00000100L
  3520. #define DCX_INTERSECTUPDATE  0x00000200L
  3521.  
  3522. #define DCX_LOCKWINDOWUPDATE 0x00000400L
  3523.  
  3524. #define DCX_NORECOMPUTE      0x00100000L
  3525. #define DCX_VALIDATE         0x00200000L
  3526.  
  3527.  
  3528. HDC
  3529. WINAPI
  3530. GetWindowDC(
  3531.     HWND hWnd);
  3532.  
  3533. int
  3534. WINAPI
  3535. ReleaseDC(
  3536.     HWND hWnd,
  3537.     HDC hDC);
  3538.  
  3539. HDC
  3540. WINAPI
  3541. BeginPaint(
  3542.     HWND hWnd,
  3543.     LPPAINTSTRUCT lpPaint);
  3544.  
  3545. BOOL
  3546. WINAPI
  3547. EndPaint(
  3548.     HWND hWnd,
  3549.     CONST PAINTSTRUCT *lpPaint);
  3550.  
  3551. BOOL
  3552. WINAPI
  3553. GetUpdateRect(
  3554.     HWND hWnd,
  3555.     LPRECT lpRect,
  3556.     BOOL bErase);
  3557.  
  3558. int
  3559. WINAPI
  3560. GetUpdateRgn(
  3561.     HWND hWnd,
  3562.     HRGN hRgn,
  3563.     BOOL bErase);
  3564.  
  3565. int
  3566. WINAPI
  3567. ExcludeUpdateRgn(
  3568.     HDC hDC,
  3569.     HWND hWnd);
  3570.  
  3571. BOOL
  3572. WINAPI
  3573. InvalidateRect(
  3574.     HWND hWnd ,
  3575.     CONST RECT *lpRect,
  3576.     BOOL bErase);
  3577.  
  3578. BOOL
  3579. WINAPI
  3580. ValidateRect(
  3581.     HWND hWnd ,
  3582.     CONST RECT *lpRect);
  3583.  
  3584. BOOL
  3585. WINAPI
  3586. InvalidateRgn(
  3587.     HWND hWnd,
  3588.     HRGN hRgn,
  3589.     BOOL bErase);
  3590.  
  3591. BOOL
  3592. WINAPI
  3593. ValidateRgn(
  3594.     HWND hWnd,
  3595.     HRGN hRgn);
  3596.  
  3597.  
  3598. BOOL WINAPI RedrawWindow(
  3599.     HWND hWnd,
  3600.     CONST RECT *lprcUpdate,
  3601.     HRGN hrgnUpdate,
  3602.     UINT flags);
  3603.  
  3604. /*
  3605.  * RedrawWindow() flags
  3606.  */
  3607. #define RDW_INVALIDATE          0x0001
  3608. #define RDW_INTERNALPAINT       0x0002
  3609. #define RDW_ERASE               0x0004
  3610.  
  3611. #define RDW_VALIDATE            0x0008
  3612. #define RDW_NOINTERNALPAINT     0x0010
  3613. #define RDW_NOERASE             0x0020
  3614.  
  3615. #define RDW_NOCHILDREN          0x0040
  3616. #define RDW_ALLCHILDREN         0x0080
  3617.  
  3618. #define RDW_UPDATENOW           0x0100
  3619. #define RDW_ERASENOW            0x0200
  3620.  
  3621. #define RDW_FRAME               0x0400
  3622. #define RDW_NOFRAME             0x0800
  3623.  
  3624.  
  3625. /*
  3626.  * LockWindowUpdate API
  3627.  */
  3628. BOOL
  3629. WINAPI
  3630. LockWindowUpdate(
  3631.     HWND hWndLock);
  3632.  
  3633. BOOL
  3634. WINAPI
  3635. ScrollWindow(
  3636.     HWND hWnd,
  3637.     int XAmount,
  3638.     int YAmount,
  3639.     CONST RECT *lpRect,
  3640.     CONST RECT *lpClipRect);
  3641.  
  3642. BOOL
  3643. WINAPI
  3644. ScrollDC(
  3645.     HDC hDC,
  3646.     int dx,
  3647.     int dy,
  3648.     CONST RECT *lprcScroll,
  3649.     CONST RECT *lprcClip ,
  3650.     HRGN hrgnUpdate,
  3651.     LPRECT lprcUpdate);
  3652.  
  3653. int
  3654. WINAPI
  3655. ScrollWindowEx(
  3656.     HWND hWnd,
  3657.     int dx,
  3658.     int dy,
  3659.     CONST RECT *prcScroll,
  3660.     CONST RECT *prcClip ,
  3661.     HRGN hrgnUpdate,
  3662.     LPRECT prcUpdate,
  3663.     UINT flags);
  3664.  
  3665. #define SW_SCROLLCHILDREN   0x0001  /* Scroll children within *lprcScroll. */
  3666. #define SW_INVALIDATE       0x0002  /* Invalidate after scrolling */
  3667. #define SW_ERASE            0x0004  /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  3668.  
  3669.  
  3670. #ifndef NOSCROLL
  3671. int
  3672. WINAPI
  3673. SetScrollPos(
  3674.     HWND hWnd,
  3675.     int nBar,
  3676.     int nPos,
  3677.     BOOL bRedraw);
  3678.  
  3679. int
  3680. WINAPI
  3681. GetScrollPos(
  3682.     HWND hWnd,
  3683.     int nBar);
  3684.  
  3685. BOOL
  3686. WINAPI
  3687. SetScrollRange(
  3688.     HWND hWnd,
  3689.     int nBar,
  3690.     int nMinPos,
  3691.     int nMaxPos,
  3692.     BOOL bRedraw);
  3693.  
  3694. BOOL
  3695. WINAPI
  3696. GetScrollRange(
  3697.     HWND hWnd,
  3698.     int nBar,
  3699.     LPINT lpMinPos,
  3700.     LPINT lpMaxPos);
  3701.  
  3702. BOOL
  3703. WINAPI
  3704. ShowScrollBar(
  3705.     HWND hWnd,
  3706.     int wBar,
  3707.     BOOL bShow);
  3708.  
  3709. BOOL
  3710. WINAPI
  3711. EnableScrollBar(
  3712.     HWND hWnd,
  3713.     UINT wSBflags,
  3714.     UINT wArrows);
  3715.  
  3716.  
  3717. /*
  3718.  * EnableScrollBar() flags
  3719.  */
  3720. #define ESB_ENABLE_BOTH     0x0000
  3721. #define ESB_DISABLE_BOTH    0x0003
  3722.  
  3723. #define ESB_DISABLE_LEFT    0x0001
  3724. #define ESB_DISABLE_RIGHT   0x0002
  3725.  
  3726. #define ESB_DISABLE_UP      0x0001
  3727. #define ESB_DISABLE_DOWN    0x0002
  3728.  
  3729. #define ESB_DISABLE_LTUP    ESB_DISABLE_LEFT
  3730. #define ESB_DISABLE_RTDN    ESB_DISABLE_RIGHT
  3731.  
  3732.  
  3733. #endif  /* !NOSCROLL */
  3734.  
  3735. BOOL
  3736. WINAPI
  3737. SetPropA(
  3738.     HWND hWnd,
  3739.     LPCSTR lpString,
  3740.     HANDLE hData);
  3741. BOOL
  3742. WINAPI
  3743. SetPropW(
  3744.     HWND hWnd,
  3745.     LPCWSTR lpString,
  3746.     HANDLE hData);
  3747. #ifdef UNICODE
  3748. #define SetProp  SetPropW
  3749. #else
  3750. #define SetProp  SetPropA
  3751. #endif // !UNICODE
  3752.  
  3753. HANDLE
  3754. WINAPI
  3755. GetPropA(
  3756.     HWND hWnd,
  3757.     LPCSTR lpString);
  3758. HANDLE
  3759. WINAPI
  3760. GetPropW(
  3761.     HWND hWnd,
  3762.     LPCWSTR lpString);
  3763. #ifdef UNICODE
  3764. #define GetProp  GetPropW
  3765. #else
  3766. #define GetProp  GetPropA
  3767. #endif // !UNICODE
  3768.  
  3769. HANDLE
  3770. WINAPI
  3771. RemovePropA(
  3772.     HWND hWnd,
  3773.     LPCSTR lpString);
  3774. HANDLE
  3775. WINAPI
  3776. RemovePropW(
  3777.     HWND hWnd,
  3778.     LPCWSTR lpString);
  3779. #ifdef UNICODE
  3780. #define RemoveProp  RemovePropW
  3781. #else
  3782. #define RemoveProp  RemovePropA
  3783. #endif // !UNICODE
  3784.  
  3785. int
  3786. WINAPI
  3787. EnumPropsExA(
  3788.     HWND hWnd,
  3789.     PROPENUMPROCEXA lpEnumFunc,
  3790.     LPARAM lParam);
  3791. int
  3792. WINAPI
  3793. EnumPropsExW(
  3794.     HWND hWnd,
  3795.     PROPENUMPROCEXW lpEnumFunc,
  3796.     LPARAM lParam);
  3797. #ifdef UNICODE
  3798. #define EnumPropsEx  EnumPropsExW
  3799. #else
  3800. #define EnumPropsEx  EnumPropsExA
  3801. #endif // !UNICODE
  3802.  
  3803. int
  3804. WINAPI
  3805. EnumPropsA(
  3806.     HWND hWnd,
  3807.     PROPENUMPROCA lpEnumFunc);
  3808. int
  3809. WINAPI
  3810. EnumPropsW(
  3811.     HWND hWnd,
  3812.     PROPENUMPROCW lpEnumFunc);
  3813. #ifdef UNICODE
  3814. #define EnumProps  EnumPropsW
  3815. #else
  3816. #define EnumProps  EnumPropsA
  3817. #endif // !UNICODE
  3818.  
  3819. BOOL
  3820. WINAPI
  3821. SetWindowTextA(
  3822.     HWND hWnd,
  3823.     LPCSTR lpString);
  3824. BOOL
  3825. WINAPI
  3826. SetWindowTextW(
  3827.     HWND hWnd,
  3828.     LPCWSTR lpString);
  3829. #ifdef UNICODE
  3830. #define SetWindowText  SetWindowTextW
  3831. #else
  3832. #define SetWindowText  SetWindowTextA
  3833. #endif // !UNICODE
  3834.  
  3835. int
  3836. WINAPI
  3837. GetWindowTextA(
  3838.     HWND hWnd,
  3839.     LPSTR lpString,
  3840.     int nMaxCount);
  3841. int
  3842. WINAPI
  3843. GetWindowTextW(
  3844.     HWND hWnd,
  3845.     LPWSTR lpString,
  3846.     int nMaxCount);
  3847. #ifdef UNICODE
  3848. #define GetWindowText  GetWindowTextW
  3849. #else
  3850. #define GetWindowText  GetWindowTextA
  3851. #endif // !UNICODE
  3852.  
  3853. int
  3854. WINAPI
  3855. GetWindowTextLengthA(
  3856.     HWND hWnd);
  3857. int
  3858. WINAPI
  3859. GetWindowTextLengthW(
  3860.     HWND hWnd);
  3861. #ifdef UNICODE
  3862. #define GetWindowTextLength  GetWindowTextLengthW
  3863. #else
  3864. #define GetWindowTextLength  GetWindowTextLengthA
  3865. #endif // !UNICODE
  3866.  
  3867. BOOL
  3868. WINAPI
  3869. GetClientRect(
  3870.     HWND hWnd,
  3871.     LPRECT lpRect);
  3872.  
  3873. BOOL
  3874. WINAPI
  3875. GetWindowRect(
  3876.     HWND hWnd,
  3877.     LPRECT lpRect);
  3878.  
  3879. BOOL
  3880. WINAPI
  3881. AdjustWindowRect(
  3882.     LPRECT lpRect,
  3883.     DWORD dwStyle,
  3884.     BOOL bMenu);
  3885.  
  3886. BOOL
  3887. WINAPI
  3888. AdjustWindowRectEx(
  3889.     LPRECT lpRect,
  3890.     DWORD dwStyle,
  3891.     BOOL bMenu,
  3892.     DWORD dwExStyle);
  3893.  
  3894. #ifndef NOMB
  3895.  
  3896. /*
  3897.  * MessageBox() Flags
  3898.  */
  3899. #define MB_OK                       0x00000000L
  3900. #define MB_OKCANCEL                 0x00000001L
  3901. #define MB_ABORTRETRYIGNORE         0x00000002L
  3902. #define MB_YESNOCANCEL              0x00000003L
  3903. #define MB_YESNO                    0x00000004L
  3904. #define MB_RETRYCANCEL              0x00000005L
  3905.  
  3906. #define MB_ICONHAND                 0x00000010L
  3907. #define MB_ICONQUESTION             0x00000020L
  3908. #define MB_ICONEXCLAMATION          0x00000030L
  3909. #define MB_ICONASTERISK             0x00000040L
  3910.  
  3911. #define MB_ICONINFORMATION          MB_ICONASTERISK
  3912. #define MB_ICONSTOP                 MB_ICONHAND
  3913.  
  3914. #define MB_DEFBUTTON1               0x00000000L
  3915. #define MB_DEFBUTTON2               0x00000100L
  3916. #define MB_DEFBUTTON3               0x00000200L
  3917.  
  3918. #define MB_APPLMODAL                0x00000000L
  3919. #define MB_SYSTEMMODAL              0x00001000L
  3920. #define MB_TASKMODAL                0x00002000L
  3921.  
  3922. #define MB_NOFOCUS                  0x00008000L
  3923. #define MB_SETFOREGROUND            0x00010000L
  3924. #define MB_DEFAULT_DESKTOP_ONLY     0x00020000L
  3925.  
  3926. #define MB_TYPEMASK                 0x0000000FL
  3927. #define MB_ICONMASK                 0x000000F0L
  3928. #define MB_DEFMASK                  0x00000F00L
  3929. #define MB_MODEMASK                 0x00003000L
  3930. #define MB_MISCMASK                 0x0000C000L
  3931.  
  3932. int
  3933. WINAPI
  3934. MessageBoxA(
  3935.     HWND hWnd ,
  3936.     LPCSTR lpText,
  3937.     LPCSTR lpCaption ,
  3938.     UINT uType);
  3939. int
  3940. WINAPI
  3941. MessageBoxW(
  3942.     HWND hWnd ,
  3943.     LPCWSTR lpText,
  3944.     LPCWSTR lpCaption ,
  3945.     UINT uType);
  3946. #ifdef UNICODE
  3947. #define MessageBox  MessageBoxW
  3948. #else
  3949. #define MessageBox  MessageBoxA
  3950. #endif // !UNICODE
  3951.  
  3952. int
  3953. WINAPI
  3954. MessageBoxExA(
  3955.     HWND hWnd ,
  3956.     LPCSTR lpText,
  3957.     LPCSTR lpCaption ,
  3958.     UINT uType,
  3959.     WORD wLanguageId);
  3960. int
  3961. WINAPI
  3962. MessageBoxExW(
  3963.     HWND hWnd ,
  3964.     LPCWSTR lpText,
  3965.     LPCWSTR lpCaption ,
  3966.     UINT uType,
  3967.     WORD wLanguageId);
  3968. #ifdef UNICODE
  3969. #define MessageBoxEx  MessageBoxExW
  3970. #else
  3971. #define MessageBoxEx  MessageBoxExA
  3972. #endif // !UNICODE
  3973.  
  3974. BOOL
  3975. WINAPI
  3976. MessageBeep(
  3977.     UINT uType);
  3978.  
  3979. #endif /* !NOMB */
  3980.  
  3981. int
  3982. WINAPI
  3983. ShowCursor(
  3984.     BOOL bShow);
  3985.  
  3986. BOOL
  3987. WINAPI
  3988. SetCursorPos(
  3989.     int X,
  3990.     int Y);
  3991.  
  3992. HCURSOR
  3993. WINAPI
  3994. SetCursor(
  3995.     HCURSOR hCursor);
  3996.  
  3997. BOOL
  3998. WINAPI
  3999. GetCursorPos(
  4000.     LPPOINT lpPoint);
  4001.  
  4002. BOOL
  4003. WINAPI
  4004. ClipCursor(
  4005.     CONST RECT *lpRect);
  4006.  
  4007. BOOL
  4008. WINAPI
  4009. GetClipCursor(
  4010.     LPRECT lpRect);
  4011.  
  4012. HCURSOR
  4013. WINAPI
  4014. GetCursor(
  4015.     VOID);
  4016.  
  4017. BOOL
  4018. WINAPI
  4019. CreateCaret(
  4020.     HWND hWnd,
  4021.     HBITMAP hBitmap ,
  4022.     int nWidth,
  4023.     int nHeight);
  4024.  
  4025. UINT
  4026. WINAPI
  4027. GetCaretBlinkTime(
  4028.     VOID);
  4029.  
  4030. BOOL
  4031. WINAPI
  4032. SetCaretBlinkTime(
  4033.     UINT uMSeconds);
  4034.  
  4035. BOOL
  4036. WINAPI
  4037. DestroyCaret(
  4038.     VOID);
  4039.  
  4040. BOOL
  4041. WINAPI
  4042. HideCaret(
  4043.     HWND hWnd);
  4044.  
  4045. BOOL
  4046. WINAPI
  4047. ShowCaret(
  4048.     HWND hWnd);
  4049.  
  4050. BOOL
  4051. WINAPI
  4052. SetCaretPos(
  4053.     int X,
  4054.     int Y);
  4055.  
  4056. BOOL
  4057. WINAPI
  4058. GetCaretPos(
  4059.     LPPOINT lpPoint);
  4060.  
  4061. BOOL
  4062. WINAPI
  4063. ClientToScreen(
  4064.     HWND hWnd,
  4065.     LPPOINT lpPoint);
  4066.  
  4067. BOOL
  4068. WINAPI
  4069. ScreenToClient(
  4070.     HWND hWnd,
  4071.     LPPOINT lpPoint);
  4072.  
  4073. int
  4074. WINAPI
  4075. MapWindowPoints(
  4076.     HWND hWndFrom,
  4077.     HWND hWndTo,
  4078.     LPPOINT lpPoints,
  4079.     UINT cPoints);
  4080.  
  4081. HWND
  4082. WINAPI
  4083. WindowFromPoint(
  4084.     POINT Point);
  4085.  
  4086. HWND
  4087. WINAPI
  4088. ChildWindowFromPoint(
  4089.     HWND hWndParent,
  4090.     POINT Point);
  4091.  
  4092. #ifndef NOCOLOR
  4093.  
  4094. /*
  4095.  * Color Types
  4096.  */
  4097. #define CTLCOLOR_MSGBOX         0
  4098. #define CTLCOLOR_EDIT           1
  4099. #define CTLCOLOR_LISTBOX        2
  4100. #define CTLCOLOR_BTN            3
  4101. #define CTLCOLOR_DLG            4
  4102. #define CTLCOLOR_SCROLLBAR      5
  4103. #define CTLCOLOR_STATIC         6
  4104. #define CTLCOLOR_MAX            8     /* three bits max */
  4105.  
  4106. #define COLOR_SCROLLBAR         0
  4107. #define COLOR_BACKGROUND        1
  4108. #define COLOR_ACTIVECAPTION     2
  4109. #define COLOR_INACTIVECAPTION   3
  4110. #define COLOR_MENU              4
  4111. #define COLOR_WINDOW            5
  4112. #define COLOR_WINDOWFRAME       6
  4113. #define COLOR_MENUTEXT          7
  4114. #define COLOR_WINDOWTEXT        8
  4115. #define COLOR_CAPTIONTEXT       9
  4116. #define COLOR_ACTIVEBORDER      10
  4117. #define COLOR_INACTIVEBORDER    11
  4118. #define COLOR_APPWORKSPACE      12
  4119. #define COLOR_HIGHLIGHT         13
  4120. #define COLOR_HIGHLIGHTTEXT     14
  4121. #define COLOR_BTNFACE           15
  4122. #define COLOR_BTNSHADOW         16
  4123. #define COLOR_GRAYTEXT          17
  4124. #define COLOR_BTNTEXT           18
  4125. #define COLOR_INACTIVECAPTIONTEXT 19
  4126. #define COLOR_BTNHIGHLIGHT      20
  4127.  
  4128. DWORD
  4129. WINAPI
  4130. GetSysColor(
  4131.     int nIndex);
  4132.  
  4133. BOOL
  4134. WINAPI
  4135. SetSysColors(
  4136.     int cElements,
  4137.     CONST INT * lpaElements,
  4138.     CONST COLORREF * lpaRgbValues);
  4139.  
  4140. #endif /* !NOCOLOR */
  4141.  
  4142. BOOL
  4143. WINAPI
  4144. DrawFocusRect(
  4145.     HDC hDC,
  4146.     CONST RECT * lprc);
  4147.  
  4148. int
  4149. WINAPI
  4150. FillRect(
  4151.     HDC hDC,
  4152.     CONST RECT *lprc,
  4153.     HBRUSH hbr);
  4154.  
  4155. int
  4156. WINAPI
  4157. FrameRect(
  4158.     HDC hDC,
  4159.     CONST RECT *lprc,
  4160.     HBRUSH hbr);
  4161.  
  4162. BOOL
  4163. WINAPI
  4164. InvertRect(
  4165.     HDC hDC,
  4166.     CONST RECT *lprc);
  4167.  
  4168. BOOL
  4169. WINAPI
  4170. SetRect(
  4171.     LPRECT lprc,
  4172.     int xLeft,
  4173.     int yTop,
  4174.     int xRight,
  4175.     int yBottom);
  4176.  
  4177. BOOL
  4178. WINAPI
  4179.     SetRectEmpty(
  4180.     LPRECT lprc);
  4181.  
  4182. BOOL
  4183. WINAPI
  4184. CopyRect(
  4185.     LPRECT lprcDst,
  4186.     CONST RECT *lprcSrc);
  4187.  
  4188. BOOL
  4189. WINAPI
  4190. InflateRect(
  4191.     LPRECT lprc,
  4192.     int dx,
  4193.     int dy);
  4194.  
  4195. BOOL
  4196. WINAPI
  4197. IntersectRect(
  4198.     LPRECT lprcDst,
  4199.     CONST RECT *lprcSrc1,
  4200.     CONST RECT *lprcSrc2);
  4201.  
  4202. BOOL
  4203. WINAPI
  4204. UnionRect(
  4205.     LPRECT lprcDst,
  4206.     CONST RECT *lprcSrc1,
  4207.     CONST RECT *lprcSrc2);
  4208.  
  4209. BOOL
  4210. WINAPI
  4211. SubtractRect(
  4212.     LPRECT lprcDst,
  4213.     CONST RECT *lprcSrc1,
  4214.     CONST RECT *lprcSrc2);
  4215.  
  4216. BOOL
  4217. WINAPI
  4218. OffsetRect(
  4219.     LPRECT lprc,
  4220.     int dx,
  4221.     int dy);
  4222.  
  4223. BOOL
  4224. WINAPI
  4225. IsRectEmpty(
  4226.     CONST RECT *lprc);
  4227.  
  4228. BOOL
  4229. WINAPI
  4230. EqualRect(
  4231.     CONST RECT *lprc1,
  4232.     CONST RECT *lprc2);
  4233.  
  4234. BOOL
  4235. WINAPI
  4236. PtInRect(
  4237.     CONST RECT *lprc,
  4238.     POINT pt);
  4239.  
  4240. #ifndef NOWINOFFSETS
  4241.  
  4242. WORD
  4243. WINAPI
  4244. GetWindowWord(
  4245.     HWND hWnd,
  4246.     int nIndex);
  4247.  
  4248. WORD
  4249. WINAPI
  4250. SetWindowWord(
  4251.     HWND hWnd,
  4252.     int nIndex,
  4253.     WORD wNewWord);
  4254.  
  4255. LONG
  4256. WINAPI
  4257. GetWindowLongA(
  4258.     HWND hWnd,
  4259.     int nIndex);
  4260. LONG
  4261. WINAPI
  4262. GetWindowLongW(
  4263.     HWND hWnd,
  4264.     int nIndex);
  4265. #ifdef UNICODE
  4266. #define GetWindowLong  GetWindowLongW
  4267. #else
  4268. #define GetWindowLong  GetWindowLongA
  4269. #endif // !UNICODE
  4270.  
  4271. LONG
  4272. WINAPI
  4273. SetWindowLongA(
  4274.     HWND hWnd,
  4275.     int nIndex,
  4276.     LONG dwNewLong);
  4277. LONG
  4278. WINAPI
  4279. SetWindowLongW(
  4280.     HWND hWnd,
  4281.     int nIndex,
  4282.     LONG dwNewLong);
  4283. #ifdef UNICODE
  4284. #define SetWindowLong  SetWindowLongW
  4285. #else
  4286. #define SetWindowLong  SetWindowLongA
  4287. #endif // !UNICODE
  4288.  
  4289. WORD
  4290. WINAPI
  4291. GetClassWord(
  4292.     HWND hWnd,
  4293.     int nIndex);
  4294.  
  4295. WORD
  4296. WINAPI
  4297. SetClassWord(
  4298.     HWND hWnd,
  4299.     int nIndex,
  4300.     WORD wNewWord);
  4301.  
  4302. DWORD
  4303. WINAPI
  4304. GetClassLongA(
  4305.     HWND hWnd,
  4306.     int nIndex);
  4307. DWORD
  4308. WINAPI
  4309. GetClassLongW(
  4310.     HWND hWnd,
  4311.     int nIndex);
  4312. #ifdef UNICODE
  4313. #define GetClassLong  GetClassLongW
  4314. #else
  4315. #define GetClassLong  GetClassLongA
  4316. #endif // !UNICODE
  4317.  
  4318. DWORD
  4319. WINAPI
  4320. SetClassLongA(
  4321.     HWND hWnd,
  4322.     int nIndex,
  4323.     LONG dwNewLong);
  4324. DWORD
  4325. WINAPI
  4326. SetClassLongW(
  4327.     HWND hWnd,
  4328.     int nIndex,
  4329.     LONG dwNewLong);
  4330. #ifdef UNICODE
  4331. #define SetClassLong  SetClassLongW
  4332. #else
  4333. #define SetClassLong  SetClassLongA
  4334. #endif // !UNICODE
  4335.  
  4336. #endif /* !NOWINOFFSETS */
  4337.  
  4338. HWND
  4339. WINAPI
  4340. GetDesktopWindow(
  4341.     VOID);
  4342.  
  4343. HWND
  4344. WINAPI
  4345. GetParent(
  4346.     HWND hWnd);
  4347.  
  4348. HWND
  4349. WINAPI
  4350. SetParent(
  4351.     HWND hWndChild,
  4352.     HWND hWndNewParent);
  4353.  
  4354. BOOL
  4355. WINAPI
  4356. EnumChildWindows(
  4357.     HWND hWndParent,
  4358.     WNDENUMPROC lpEnumFunc,
  4359.     LPARAM lParam);
  4360.  
  4361. HWND
  4362. WINAPI
  4363. FindWindowA(
  4364.     LPCSTR lpClassName ,
  4365.     LPCSTR lpWindowName);
  4366. HWND
  4367. WINAPI
  4368. FindWindowW(
  4369.     LPCWSTR lpClassName ,
  4370.     LPCWSTR lpWindowName);
  4371. #ifdef UNICODE
  4372. #define FindWindow  FindWindowW
  4373. #else
  4374. #define FindWindow  FindWindowA
  4375. #endif // !UNICODE
  4376.  
  4377. BOOL
  4378. WINAPI
  4379. EnumWindows(
  4380.     WNDENUMPROC lpEnumFunc,
  4381.     LPARAM lParam);
  4382.  
  4383. BOOL
  4384. WINAPI
  4385. EnumThreadWindows(
  4386.     DWORD dwThreadId,
  4387.     WNDENUMPROC lpfn,
  4388.     LPARAM lParam);
  4389.  
  4390. #define EnumTaskWindows(hTask, lpfn, lParam) EnumThreadWindows((DWORD)hTask, lpfn, lParam)
  4391.  
  4392. int
  4393. WINAPI
  4394. GetClassNameA(
  4395.     HWND hWnd,
  4396.     LPSTR lpClassName,
  4397.     int nMaxCount);
  4398. int
  4399. WINAPI
  4400. GetClassNameW(
  4401.     HWND hWnd,
  4402.     LPWSTR lpClassName,
  4403.     int nMaxCount);
  4404. #ifdef UNICODE
  4405. #define GetClassName  GetClassNameW
  4406. #else
  4407. #define GetClassName  GetClassNameA
  4408. #endif // !UNICODE
  4409.  
  4410. HWND
  4411. WINAPI
  4412. GetTopWindow(
  4413.     HWND hWnd);
  4414.  
  4415. #define GetNextWindow(hWnd, wCmd) GetWindow(hWnd, wCmd)
  4416. #define GetSysModalWindow() (NULL)
  4417. #define SetSysModalWindow(hWnd) (NULL)
  4418.  
  4419. DWORD
  4420. WINAPI
  4421. GetWindowThreadProcessId(
  4422.     HWND hWnd,
  4423.     LPDWORD lpdwProcessId);
  4424.  
  4425. #define GetWindowTask(hWnd) \
  4426.         ((HANDLE)GetWindowThreadProcessId(hWnd, NULL))
  4427.  
  4428. HWND
  4429. WINAPI
  4430. GetLastActivePopup(
  4431.     HWND hWnd);
  4432.  
  4433. /*
  4434.  * GetWindow() Constants
  4435.  */
  4436. #define GW_HWNDFIRST        0
  4437. #define GW_HWNDLAST         1
  4438. #define GW_HWNDNEXT         2
  4439. #define GW_HWNDPREV         3
  4440. #define GW_OWNER            4
  4441. #define GW_CHILD            5
  4442. #define GW_MAX              5
  4443.  
  4444. HWND
  4445. WINAPI
  4446. GetWindow(
  4447.     HWND hWnd,
  4448.     UINT uCmd);
  4449.  
  4450. #ifndef NOWH
  4451.  
  4452. #ifdef STRICT
  4453.  
  4454. HHOOK
  4455. WINAPI
  4456. SetWindowsHookA(
  4457.     int nFilterType,
  4458.     HOOKPROC pfnFilterProc);
  4459. HHOOK
  4460. WINAPI
  4461. SetWindowsHookW(
  4462.     int nFilterType,
  4463.     HOOKPROC pfnFilterProc);
  4464. #ifdef UNICODE
  4465. #define SetWindowsHook  SetWindowsHookW
  4466. #else
  4467. #define SetWindowsHook  SetWindowsHookA
  4468. #endif // !UNICODE
  4469.  
  4470. #else /* !STRICT */
  4471.  
  4472. HOOKPROC
  4473. WINAPI
  4474. SetWindowsHookA(
  4475.     int nFilterType,
  4476.     HOOKPROC pfnFilterProc);
  4477. HOOKPROC
  4478. WINAPI
  4479. SetWindowsHookW(
  4480.     int nFilterType,
  4481.     HOOKPROC pfnFilterProc);
  4482. #ifdef UNICODE
  4483. #define SetWindowsHook  SetWindowsHookW
  4484. #else
  4485. #define SetWindowsHook  SetWindowsHookA
  4486. #endif // !UNICODE
  4487.  
  4488. #endif /* !STRICT */
  4489.  
  4490. BOOL
  4491. WINAPI
  4492. UnhookWindowsHook(
  4493.     int nCode,
  4494.     HOOKPROC pfnFilterProc);
  4495.  
  4496. HHOOK
  4497. WINAPI
  4498. SetWindowsHookExA(
  4499.     int idHook,
  4500.     HOOKPROC lpfn,
  4501.     HINSTANCE hmod,
  4502.     DWORD dwThreadId);
  4503. HHOOK
  4504. WINAPI
  4505. SetWindowsHookExW(
  4506.     int idHook,
  4507.     HOOKPROC lpfn,
  4508.     HINSTANCE hmod,
  4509.     DWORD dwThreadId);
  4510. #ifdef UNICODE
  4511. #define SetWindowsHookEx  SetWindowsHookExW
  4512. #else
  4513. #define SetWindowsHookEx  SetWindowsHookExA
  4514. #endif // !UNICODE
  4515.  
  4516. BOOL
  4517. WINAPI
  4518. UnhookWindowsHookEx(
  4519.     HHOOK hhk);
  4520.  
  4521. LRESULT
  4522. WINAPI CallNextHookEx(
  4523.     HHOOK hhk,
  4524.     int nCode,
  4525.     WPARAM wParam,
  4526.     LPARAM lParam);
  4527.  
  4528. /*
  4529.  * Macros for source-level compatibility with old functions.
  4530.  */
  4531. #ifdef STRICT
  4532. #define DefHookProc(nCode, wParam, lParam, phhk)\
  4533.         CallNextHookEx(*phhk, nCode, wParam, lParam)
  4534. #else
  4535. #define DefHookProc(nCode, wParam, lParam, phhk)\
  4536.         CallNextHookEx((HHOOK)*phhk, nCode, wParam, lParam)
  4537. #endif /* STRICT */
  4538.  
  4539. #endif /* !NOWH */
  4540.  
  4541. #ifndef NOMENUS
  4542.  
  4543. /*
  4544.  * Menu flags for Add/Check/EnableMenuItem()
  4545.  */
  4546. #define MF_INSERT          0x00000000L
  4547. #define MF_CHANGE          0x00000080L
  4548. #define MF_APPEND          0x00000100L
  4549. #define MF_DELETE          0x00000200L
  4550. #define MF_REMOVE          0x00001000L
  4551.  
  4552. #define MF_BYCOMMAND       0x00000000L
  4553. #define MF_BYPOSITION      0x00000400L
  4554.  
  4555. #define MF_SEPARATOR       0x00000800L
  4556.  
  4557. #define MF_ENABLED         0x00000000L
  4558. #define MF_GRAYED          0x00000001L
  4559. #define MF_DISABLED        0x00000002L
  4560.  
  4561. #define MF_UNCHECKED       0x00000000L
  4562. #define MF_CHECKED         0x00000008L
  4563. #define MF_USECHECKBITMAPS 0x00000200L
  4564.  
  4565. #define MF_STRING          0x00000000L
  4566. #define MF_BITMAP          0x00000004L
  4567. #define MF_OWNERDRAW       0x00000100L
  4568.  
  4569. #define MF_POPUP           0x00000010L
  4570. #define MF_MENUBARBREAK    0x00000020L
  4571. #define MF_MENUBREAK       0x00000040L
  4572.  
  4573. #define MF_UNHILITE        0x00000000L
  4574. #define MF_HILITE          0x00000080L
  4575.  
  4576. #define MF_SYSMENU         0x00002000L
  4577. #define MF_HELP            0x00004000L
  4578. #define MF_MOUSESELECT     0x00008000L
  4579.  
  4580.  
  4581. /*
  4582.  * Menu item resource format
  4583.  */
  4584. typedef struct {
  4585.     WORD versionNumber;
  4586.     WORD offset;
  4587. } MENUITEMTEMPLATEHEADER;
  4588.  
  4589. typedef struct {
  4590.     WORD mtOption;
  4591.     WORD mtID;
  4592.     WCHAR mtString[1];
  4593. } MENUITEMTEMPLATE;
  4594.  
  4595. #define MF_END             0x00000080L
  4596.  
  4597. #endif /* !NOMENUS */
  4598.  
  4599. #ifndef NOSYSCOMMANDS
  4600.  
  4601. /*
  4602.  * System Menu Command Values
  4603.  */
  4604. #define SC_SIZE         0xF000
  4605. #define SC_MOVE         0xF010
  4606. #define SC_MINIMIZE     0xF020
  4607. #define SC_MAXIMIZE     0xF030
  4608. #define SC_NEXTWINDOW   0xF040
  4609. #define SC_PREVWINDOW   0xF050
  4610. #define SC_CLOSE        0xF060
  4611. #define SC_VSCROLL      0xF070
  4612. #define SC_HSCROLL      0xF080
  4613. #define SC_MOUSEMENU    0xF090
  4614. #define SC_KEYMENU      0xF100
  4615. #define SC_ARRANGE      0xF110
  4616. #define SC_RESTORE      0xF120
  4617. #define SC_TASKLIST     0xF130
  4618. #define SC_SCREENSAVE   0xF140
  4619. #define SC_HOTKEY       0xF150
  4620.  
  4621. /*
  4622.  * Obsolete names
  4623.  */
  4624. #define SC_ICON         SC_MINIMIZE
  4625. #define SC_ZOOM         SC_MAXIMIZE
  4626.  
  4627. #endif /* !NOSYSCOMMANDS */
  4628.  
  4629. /*
  4630.  * Resource Loading Routines
  4631.  */
  4632.  
  4633. HBITMAP
  4634. WINAPI
  4635. LoadBitmapA(
  4636.     HINSTANCE hInstance,
  4637.     LPCSTR lpBitmapName);
  4638. HBITMAP
  4639. WINAPI
  4640. LoadBitmapW(
  4641.     HINSTANCE hInstance,
  4642.     LPCWSTR lpBitmapName);
  4643. #ifdef UNICODE
  4644. #define LoadBitmap  LoadBitmapW
  4645. #else
  4646. #define LoadBitmap  LoadBitmapA
  4647. #endif // !UNICODE
  4648.  
  4649. HCURSOR
  4650. WINAPI
  4651. LoadCursorA(
  4652.     HINSTANCE hInstance,
  4653.     LPCSTR lpCursorName);
  4654. HCURSOR
  4655. WINAPI
  4656. LoadCursorW(
  4657.     HINSTANCE hInstance,
  4658.     LPCWSTR lpCursorName);
  4659. #ifdef UNICODE
  4660. #define LoadCursor  LoadCursorW
  4661. #else
  4662. #define LoadCursor  LoadCursorA
  4663. #endif // !UNICODE
  4664.  
  4665. HCURSOR
  4666. WINAPI
  4667. CreateCursor(
  4668.     HINSTANCE hInst,
  4669.     int xHotSpot,
  4670.     int yHotSpot,
  4671.     int nWidth,
  4672.     int nHeight,
  4673.     CONST VOID *pvANDPlane,
  4674.     CONST VOID *pvXORPlane);
  4675.  
  4676. BOOL
  4677. WINAPI
  4678. DestroyCursor(
  4679.     HCURSOR hCursor);
  4680.  
  4681. #define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
  4682.  
  4683. /*
  4684.  * Standard Cursor IDs
  4685.  */
  4686. #define IDC_ARROW           MAKEINTRESOURCE(32512)
  4687. #define IDC_IBEAM           MAKEINTRESOURCE(32513)
  4688. #define IDC_WAIT            MAKEINTRESOURCE(32514)
  4689. #define IDC_CROSS           MAKEINTRESOURCE(32515)
  4690. #define IDC_UPARROW         MAKEINTRESOURCE(32516)
  4691. #define IDC_SIZE            MAKEINTRESOURCE(32640)
  4692. #define IDC_ICON            MAKEINTRESOURCE(32641)
  4693. #define IDC_SIZENWSE        MAKEINTRESOURCE(32642)
  4694. #define IDC_SIZENESW        MAKEINTRESOURCE(32643)
  4695. #define IDC_SIZEWE          MAKEINTRESOURCE(32644)
  4696. #define IDC_SIZENS          MAKEINTRESOURCE(32645)
  4697. #define IDC_SIZEALL         MAKEINTRESOURCE(32646) /*not in win3.1 */
  4698. #define IDC_NO              MAKEINTRESOURCE(32648) /*not in win3.1 */
  4699. #define IDC_APPSTARTING     MAKEINTRESOURCE(32650) /*not in win3.1 */
  4700.  
  4701. typedef struct _ICONINFO {
  4702.     BOOL    fIcon;
  4703.     DWORD   xHotspot;
  4704.     DWORD   yHotspot;
  4705.     HBITMAP hbmMask;
  4706.     HBITMAP hbmColor;
  4707. } ICONINFO;
  4708. typedef ICONINFO *PICONINFO;
  4709.  
  4710. HICON
  4711. WINAPI
  4712. LoadIconA(
  4713.     HINSTANCE hInstance,
  4714.     LPCSTR lpIconName);
  4715. HICON
  4716. WINAPI
  4717. LoadIconW(
  4718.     HINSTANCE hInstance,
  4719.     LPCWSTR lpIconName);
  4720. #ifdef UNICODE
  4721. #define LoadIcon  LoadIconW
  4722. #else
  4723. #define LoadIcon  LoadIconA
  4724. #endif // !UNICODE
  4725.  
  4726. HICON
  4727. WINAPI
  4728. CreateIcon(
  4729.     HINSTANCE hInstance,
  4730.     int nWidth,
  4731.     int nHeight,
  4732.     BYTE cPlanes,
  4733.     BYTE cBitsPixel,
  4734.     CONST BYTE *lpbANDbits,
  4735.     CONST BYTE *lpbXORbits);
  4736.  
  4737. BOOL
  4738. WINAPI
  4739. DestroyIcon(
  4740.     HICON hIcon);
  4741.  
  4742. int
  4743. WINAPI
  4744. LookupIconIdFromDirectory(
  4745.     PBYTE presbits,
  4746.     BOOL fIcon);
  4747.  
  4748. HICON
  4749. WINAPI
  4750. CreateIconFromResource(
  4751.     PBYTE presbits,
  4752.     DWORD dwResSize,
  4753.     BOOL fIcon,
  4754.     DWORD dwVer);
  4755.  
  4756. HICON
  4757. WINAPI
  4758. CreateIconIndirect(
  4759.     PICONINFO piconinfo);
  4760.  
  4761. HICON
  4762. WINAPI
  4763. CopyIcon(
  4764.     HICON hIcon);
  4765.  
  4766. BOOL
  4767. WINAPI
  4768. GetIconInfo(
  4769.     HICON hIcon,
  4770.     PICONINFO piconinfo);
  4771.  
  4772. #ifdef OEMRESOURCE
  4773.  
  4774. /*
  4775.  * OEM Resource Ordinal Numbers
  4776.  */
  4777. #define OBM_CLOSE           32754
  4778. #define OBM_UPARROW         32753
  4779. #define OBM_DNARROW         32752
  4780. #define OBM_RGARROW         32751
  4781. #define OBM_LFARROW         32750
  4782. #define OBM_REDUCE          32749
  4783. #define OBM_ZOOM            32748
  4784. #define OBM_RESTORE         32747
  4785. #define OBM_REDUCED         32746
  4786. #define OBM_ZOOMD           32745
  4787. #define OBM_RESTORED        32744
  4788. #define OBM_UPARROWD        32743
  4789. #define OBM_DNARROWD        32742
  4790. #define OBM_RGARROWD        32741
  4791. #define OBM_LFARROWD        32740
  4792. #define OBM_MNARROW         32739
  4793. #define OBM_COMBO           32738
  4794. #define OBM_UPARROWI        32737
  4795. #define OBM_DNARROWI        32736
  4796. #define OBM_RGARROWI        32735
  4797. #define OBM_LFARROWI        32734
  4798.  
  4799. #define OBM_OLD_CLOSE       32767
  4800. #define OBM_SIZE            32766
  4801. #define OBM_OLD_UPARROW     32765
  4802. #define OBM_OLD_DNARROW     32764
  4803. #define OBM_OLD_RGARROW     32763
  4804. #define OBM_OLD_LFARROW     32762
  4805. #define OBM_BTSIZE          32761
  4806. #define OBM_CHECK           32760
  4807. #define OBM_CHECKBOXES      32759
  4808. #define OBM_BTNCORNERS      32758
  4809. #define OBM_OLD_REDUCE      32757
  4810. #define OBM_OLD_ZOOM        32756
  4811. #define OBM_OLD_RESTORE     32755
  4812.  
  4813. #define OCR_NORMAL          32512
  4814. #define OCR_IBEAM           32513
  4815. #define OCR_WAIT            32514
  4816. #define OCR_CROSS           32515
  4817. #define OCR_UP              32516
  4818. #define OCR_SIZE            32640
  4819. #define OCR_ICON            32641
  4820. #define OCR_SIZENWSE        32642
  4821. #define OCR_SIZENESW        32643
  4822. #define OCR_SIZEWE          32644
  4823. #define OCR_SIZENS          32645
  4824. #define OCR_SIZEALL         32646
  4825. #define OCR_ICOCUR          32647
  4826. #define OCR_NO              32648 /*not in win3.1 */
  4827.  
  4828. #define OIC_SAMPLE          32512
  4829. #define OIC_HAND            32513
  4830. #define OIC_QUES            32514
  4831. #define OIC_BANG            32515
  4832. #define OIC_NOTE            32516
  4833.  
  4834. #endif /* OEMRESOURCE */
  4835.  
  4836. #define ORD_LANGDRIVER    1     /* The ordinal number for the entry point of
  4837.                                 ** language drivers.
  4838.                                 */
  4839.  
  4840. #ifndef NOICONS
  4841.  
  4842. /*
  4843.  * Standard Icon IDs
  4844.  */
  4845. #define IDI_APPLICATION   MAKEINTRESOURCE(32512)
  4846. #define IDI_HAND          MAKEINTRESOURCE(32513)
  4847. #define IDI_QUESTION      MAKEINTRESOURCE(32514)
  4848. #define IDI_EXCLAMATION   MAKEINTRESOURCE(32515)
  4849. #define IDI_ASTERISK      MAKEINTRESOURCE(32516)
  4850.  
  4851. #endif /* !NOICONS */
  4852.  
  4853. int
  4854. WINAPI
  4855. LoadStringA(
  4856.     HINSTANCE hInstance,
  4857.     UINT uID,
  4858.     LPSTR lpBuffer,
  4859.     int nBufferMax);
  4860. int
  4861. WINAPI
  4862. LoadStringW(
  4863.     HINSTANCE hInstance,
  4864.     UINT uID,
  4865.     LPWSTR lpBuffer,
  4866.     int nBufferMax);
  4867. #ifdef UNICODE
  4868. #define LoadString  LoadStringW
  4869. #else
  4870. #define LoadString  LoadStringA
  4871. #endif // !UNICODE
  4872.  
  4873. /*
  4874.  * Dialog Box Command IDs
  4875.  */
  4876. #define IDOK                1
  4877. #define IDCANCEL            2
  4878. #define IDABORT             3
  4879. #define IDRETRY             4
  4880. #define IDIGNORE            5
  4881. #define IDYES               6
  4882. #define IDNO                7
  4883.  
  4884. #ifndef NOCTLMGR
  4885.  
  4886. /*
  4887.  * Control Manager Structures and Definitions
  4888.  */
  4889.  
  4890. #ifndef NOWINSTYLES
  4891.  
  4892. /*
  4893.  * Edit Control Styles
  4894.  */
  4895. #define ES_LEFT             0x0000L
  4896. #define ES_CENTER           0x0001L
  4897. #define ES_RIGHT            0x0002L
  4898. #define ES_MULTILINE        0x0004L
  4899. #define ES_UPPERCASE        0x0008L
  4900. #define ES_LOWERCASE        0x0010L
  4901. #define ES_PASSWORD         0x0020L
  4902. #define ES_AUTOVSCROLL      0x0040L
  4903. #define ES_AUTOHSCROLL      0x0080L
  4904. #define ES_NOHIDESEL        0x0100L
  4905. #define ES_OEMCONVERT       0x0400L
  4906. #define ES_READONLY         0x0800L
  4907. #define ES_WANTRETURN       0x1000L
  4908.  
  4909.  
  4910. #endif /* !NOWINSTYLES */
  4911.  
  4912. /*
  4913.  * Edit Control Notification Codes
  4914.  */
  4915. #define EN_SETFOCUS         0x0100
  4916. #define EN_KILLFOCUS        0x0200
  4917. #define EN_CHANGE           0x0300
  4918. #define EN_UPDATE           0x0400
  4919. #define EN_ERRSPACE         0x0500
  4920. #define EN_MAXTEXT          0x0501
  4921. #define EN_HSCROLL          0x0601
  4922. #define EN_VSCROLL          0x0602
  4923.  
  4924. #ifndef NOWINMESSAGES
  4925.  
  4926. /*
  4927.  * Edit Control Messages
  4928.  */
  4929. #define EM_GETSEL               0x00B0
  4930. #define EM_SETSEL               0x00B1
  4931. #define EM_GETRECT              0x00B2
  4932. #define EM_SETRECT              0x00B3
  4933. #define EM_SETRECTNP            0x00B4
  4934. #define EM_SCROLL               0x00B5
  4935. #define EM_LINESCROLL           0x00B6
  4936. #define EM_SCROLLCARET          0x00B7
  4937. #define EM_GETMODIFY            0x00B8
  4938. #define EM_SETMODIFY            0x00B9
  4939. #define EM_GETLINECOUNT         0x00BA
  4940. #define EM_LINEINDEX            0x00BB
  4941. #define EM_SETHANDLE            0x00BC
  4942. #define EM_GETHANDLE            0x00BD
  4943. #define EM_GETTHUMB             0x00BE
  4944. #define EM_LINELENGTH           0x00C1
  4945. #define EM_REPLACESEL           0x00C2
  4946. #define EM_GETLINE              0x00C4
  4947. #define EM_LIMITTEXT            0x00C5
  4948. #define EM_CANUNDO              0x00C6
  4949. #define EM_UNDO                 0x00C7
  4950. #define EM_FMTLINES             0x00C8
  4951. #define EM_LINEFROMCHAR         0x00C9
  4952. #define EM_SETTABSTOPS          0x00CB
  4953. #define EM_SETPASSWORDCHAR      0x00CC
  4954. #define EM_EMPTYUNDOBUFFER      0x00CD
  4955. #define EM_GETFIRSTVISIBLELINE  0x00CE
  4956. #define EM_SETREADONLY          0x00CF
  4957. #define EM_SETWORDBREAKPROC     0x00D0
  4958. #define EM_GETWORDBREAKPROC     0x00D1
  4959. #define EM_GETPASSWORDCHAR      0x00D2
  4960.  
  4961. #endif /* !NOWINMESSAGES */
  4962.  
  4963. /*
  4964.  * EDITWORDBREAKPROC code values
  4965.  */
  4966. #define WB_LEFT            0
  4967. #define WB_RIGHT           1
  4968. #define WB_ISDELIMITER     2
  4969.  
  4970. /*
  4971.  * Button Control Styles
  4972.  */
  4973. #define BS_PUSHBUTTON      0x00L
  4974. #define BS_DEFPUSHBUTTON   0x01L
  4975. #define BS_CHECKBOX        0x02L
  4976. #define BS_AUTOCHECKBOX    0x03L
  4977. #define BS_RADIOBUTTON     0x04L
  4978. #define BS_3STATE          0x05L
  4979. #define BS_AUTO3STATE      0x06L
  4980. #define BS_GROUPBOX        0x07L
  4981. #define BS_USERBUTTON      0x08L
  4982. #define BS_AUTORADIOBUTTON 0x09L
  4983. #define BS_OWNERDRAW       0x0BL
  4984. #define BS_LEFTTEXT        0x20L
  4985.  
  4986.  
  4987. /*
  4988.  * User Button Notification Codes
  4989.  */
  4990. #define BN_CLICKED         0
  4991. #define BN_PAINT           1
  4992. #define BN_HILITE          2
  4993. #define BN_UNHILITE        3
  4994. #define BN_DISABLE         4
  4995. #define BN_DOUBLECLICKED   5
  4996.  
  4997. /*
  4998.  * Button Control Messages
  4999.  */
  5000. #define BM_GETCHECK        0x00F0
  5001. #define BM_SETCHECK        0x00F1
  5002. #define BM_GETSTATE        0x00F2
  5003. #define BM_SETSTATE        0x00F3
  5004. #define BM_SETSTYLE        0x00F4
  5005.  
  5006. /*
  5007.  * Static Control Constants
  5008.  */
  5009. #define SS_LEFT            0x00L
  5010. #define SS_CENTER          0x01L
  5011. #define SS_RIGHT           0x02L
  5012. #define SS_ICON            0x03L
  5013. #define SS_BLACKRECT       0x04L
  5014. #define SS_GRAYRECT        0x05L
  5015. #define SS_WHITERECT       0x06L
  5016. #define SS_BLACKFRAME      0x07L
  5017. #define SS_GRAYFRAME       0x08L
  5018. #define SS_WHITEFRAME      0x09L
  5019. #define SS_USERITEM        0x0AL
  5020. #define SS_SIMPLE          0x0BL
  5021. #define SS_LEFTNOWORDWRAP  0x0CL
  5022. #define SS_NOPREFIX        0x80L    /* Don't do "&" character translation */
  5023.  
  5024. #ifndef NOWINMESSAGES
  5025. /*
  5026.  * Static Control Mesages
  5027.  */
  5028. #define STM_SETICON        0x170
  5029. #define STM_GETICON        0x171
  5030. #define STM_MSGMAX         0x172
  5031. #endif /* !NOWINMESSAGES */
  5032.  
  5033. /*
  5034.  * Dialog window class
  5035.  */
  5036. #define WC_DIALOG       (MAKEINTATOM(0x8002))
  5037.  
  5038. /*
  5039.  * Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  5040.  */
  5041. #define DWL_MSGRESULT   0
  5042. #define DWL_DLGPROC     4
  5043. #define DWL_USER        8
  5044.  
  5045. /*
  5046.  * Dialog Manager Routines
  5047.  */
  5048.  
  5049. #ifndef NOMSG
  5050.  
  5051. BOOL
  5052. WINAPI
  5053. IsDialogMessageA(
  5054.     HWND hDlg,
  5055.     LPMSG lpMsg);
  5056. BOOL
  5057. WINAPI
  5058. IsDialogMessageW(
  5059.     HWND hDlg,
  5060.     LPMSG lpMsg);
  5061. #ifdef UNICODE
  5062. #define IsDialogMessage  IsDialogMessageW
  5063. #else
  5064. #define IsDialogMessage  IsDialogMessageA
  5065. #endif // !UNICODE
  5066.  
  5067. #endif /* !NOMSG */
  5068.  
  5069. BOOL
  5070. WINAPI
  5071. MapDialogRect(
  5072.     HWND hDlg,
  5073.     LPRECT lpRect);
  5074.  
  5075. int
  5076. WINAPI
  5077. DlgDirListA(
  5078.     HWND hDlg,
  5079.     LPSTR lpPathSpec,
  5080.     int nIDListBox,
  5081.     int nIDStaticPath,
  5082.     UINT uFileType);
  5083. int
  5084. WINAPI
  5085. DlgDirListW(
  5086.     HWND hDlg,
  5087.     LPWSTR lpPathSpec,
  5088.     int nIDListBox,
  5089.     int nIDStaticPath,
  5090.     UINT uFileType);
  5091. #ifdef UNICODE
  5092. #define DlgDirList  DlgDirListW
  5093. #else
  5094. #define DlgDirList  DlgDirListA
  5095. #endif // !UNICODE
  5096.  
  5097. /*
  5098.  * DlgDirList, DlgDirListComboBox flags values
  5099.  */
  5100. #define DDL_READWRITE       0x0000
  5101. #define DDL_READONLY        0x0001
  5102. #define DDL_HIDDEN          0x0002
  5103. #define DDL_SYSTEM          0x0004
  5104. #define DDL_DIRECTORY       0x0010
  5105. #define DDL_ARCHIVE         0x0020
  5106.  
  5107. #define DDL_POSTMSGS        0x2000
  5108. #define DDL_DRIVES          0x4000
  5109. #define DDL_EXCLUSIVE       0x8000
  5110.  
  5111.  
  5112. BOOL
  5113. WINAPI
  5114. DlgDirSelectExA(
  5115.     HWND hDlg,
  5116.     LPSTR lpString,
  5117.     int nCount,
  5118.     int nIDListBox);
  5119. BOOL
  5120. WINAPI
  5121. DlgDirSelectExW(
  5122.     HWND hDlg,
  5123.     LPWSTR lpString,
  5124.     int nCount,
  5125.     int nIDListBox);
  5126. #ifdef UNICODE
  5127. #define DlgDirSelectEx  DlgDirSelectExW
  5128. #else
  5129. #define DlgDirSelectEx  DlgDirSelectExA
  5130. #endif // !UNICODE
  5131.  
  5132. int
  5133. WINAPI
  5134. DlgDirListComboBoxA(
  5135.     HWND hDlg,
  5136.     LPSTR lpPathSpec,
  5137.     int nIDComboBox,
  5138.     int nIDStaticPath,
  5139.     UINT uFiletype);
  5140. int
  5141. WINAPI
  5142. DlgDirListComboBoxW(
  5143.     HWND hDlg,
  5144.     LPWSTR lpPathSpec,
  5145.     int nIDComboBox,
  5146.     int nIDStaticPath,
  5147.     UINT uFiletype);
  5148. #ifdef UNICODE
  5149. #define DlgDirListComboBox  DlgDirListComboBoxW
  5150. #else
  5151. #define DlgDirListComboBox  DlgDirListComboBoxA
  5152. #endif // !UNICODE
  5153.  
  5154. BOOL
  5155. WINAPI
  5156. DlgDirSelectComboBoxExA(
  5157.     HWND hDlg,
  5158.     LPSTR lpString,
  5159.     int nCount,
  5160.     int nIDComboBox);
  5161. BOOL
  5162. WINAPI
  5163. DlgDirSelectComboBoxExW(
  5164.     HWND hDlg,
  5165.     LPWSTR lpString,
  5166.     int nCount,
  5167.     int nIDComboBox);
  5168. #ifdef UNICODE
  5169. #define DlgDirSelectComboBoxEx  DlgDirSelectComboBoxExW
  5170. #else
  5171. #define DlgDirSelectComboBoxEx  DlgDirSelectComboBoxExA
  5172. #endif // !UNICODE
  5173.  
  5174. /*
  5175.  * Dialog Styles
  5176.  */
  5177. #define DS_ABSALIGN         0x01L
  5178. #define DS_SYSMODAL         0x02L
  5179. #define DS_LOCALEDIT        0x20L   /* Edit items get Local storage. */
  5180. #define DS_SETFONT          0x40L   /* User specified font for Dlg controls */
  5181. #define DS_MODALFRAME       0x80L   /* Can be combined with WS_CAPTION  */
  5182. #define DS_NOIDLEMSG        0x100L  /* WM_ENTERIDLE message will not be sent */
  5183. #define DS_SETFOREGROUND    0x200L  /* not in win3.1 */
  5184.  
  5185. #define DM_GETDEFID         (WM_USER+0)
  5186. #define DM_SETDEFID         (WM_USER+1)
  5187.  
  5188. /*
  5189.  * Returned in HIWORD() of DM_GETDEFID result if msg is supported
  5190.  */
  5191. #define DC_HASDEFID         0x534B
  5192.  
  5193. /*
  5194.  * Dialog Codes
  5195.  */
  5196. #define DLGC_WANTARROWS     0x0001      /* Control wants arrow keys         */
  5197. #define DLGC_WANTTAB        0x0002      /* Control wants tab keys           */
  5198. #define DLGC_WANTALLKEYS    0x0004      /* Control wants all keys           */
  5199. #define DLGC_WANTMESSAGE    0x0004      /* Pass message to control          */
  5200. #define DLGC_HASSETSEL      0x0008      /* Understands EM_SETSEL message    */
  5201. #define DLGC_DEFPUSHBUTTON  0x0010      /* Default pushbutton               */
  5202. #define DLGC_UNDEFPUSHBUTTON 0x0020     /* Non-default pushbutton           */
  5203. #define DLGC_RADIOBUTTON    0x0040      /* Radio button                     */
  5204. #define DLGC_WANTCHARS      0x0080      /* Want WM_CHAR messages            */
  5205. #define DLGC_STATIC         0x0100      /* Static item: don't include       */
  5206. #define DLGC_BUTTON         0x2000      /* Button item: can be checked      */
  5207.  
  5208. #define LB_CTLCODE          0L
  5209.  
  5210. /*
  5211.  * Listbox Return Values
  5212.  */
  5213. #define LB_OKAY             0
  5214. #define LB_ERR              (-1)
  5215. #define LB_ERRSPACE         (-2)
  5216.  
  5217. /*
  5218. **  The idStaticPath parameter to DlgDirList can have the following values
  5219. **  ORed if the list box should show other details of the files along with
  5220. **  the name of the files;
  5221. */
  5222.                                   /* all other details also will be returned */
  5223.  
  5224.  
  5225. /*
  5226.  * Listbox Notification Codes
  5227.  */
  5228. #define LBN_ERRSPACE        (-2)
  5229. #define LBN_SELCHANGE       1
  5230. #define LBN_DBLCLK          2
  5231. #define LBN_SELCANCEL       3
  5232. #define LBN_SETFOCUS        4
  5233. #define LBN_KILLFOCUS       5
  5234.  
  5235.  
  5236.  
  5237. #ifndef NOWINMESSAGES
  5238.  
  5239. /*
  5240.  * Listbox messages
  5241.  */
  5242. #define LB_ADDSTRING            0x0180
  5243. #define LB_INSERTSTRING         0x0181
  5244. #define LB_DELETESTRING         0x0182
  5245. #define LB_SELITEMRANGEEX       0x0183
  5246. #define LB_RESETCONTENT         0x0184
  5247. #define LB_SETSEL               0x0185
  5248. #define LB_SETCURSEL            0x0186
  5249. #define LB_GETSEL               0x0187
  5250. #define LB_GETCURSEL            0x0188
  5251. #define LB_GETTEXT              0x0189
  5252. #define LB_GETTEXTLEN           0x018A
  5253. #define LB_GETCOUNT             0x018B
  5254. #define LB_SELECTSTRING         0x018C
  5255. #define LB_DIR                  0x018D
  5256. #define LB_GETTOPINDEX          0x018E
  5257. #define LB_FINDSTRING           0x018F
  5258. #define LB_GETSELCOUNT          0x0190
  5259. #define LB_GETSELITEMS          0x0191
  5260. #define LB_SETTABSTOPS          0x0192
  5261. #define LB_GETHORIZONTALEXTENT  0x0193
  5262. #define LB_SETHORIZONTALEXTENT  0x0194
  5263. #define LB_SETCOLUMNWIDTH       0x0195
  5264. #define LB_ADDFILE              0x0196
  5265. #define LB_SETTOPINDEX          0x0197
  5266. #define LB_GETITEMRECT          0x0198
  5267. #define LB_GETITEMDATA          0x0199
  5268. #define LB_SETITEMDATA          0x019A
  5269. #define LB_SELITEMRANGE         0x019B
  5270. #define LB_SETANCHORINDEX       0x019C
  5271. #define LB_GETANCHORINDEX       0x019D
  5272. #define LB_SETCARETINDEX        0x019E
  5273. #define LB_GETCARETINDEX        0x019F
  5274. #define LB_SETITEMHEIGHT        0x01A0
  5275. #define LB_GETITEMHEIGHT        0x01A1
  5276. #define LB_FINDSTRINGEXACT      0x01A2
  5277. #define LB_SETLOCALE            0x01A5
  5278. #define LB_GETLOCALE            0x01A6
  5279. #define LB_SETCOUNT             0x01A7
  5280. #define LB_MSGMAX               0x01A8
  5281.  
  5282. #endif /* !NOWINMESSAGES */
  5283.  
  5284. #ifndef NOWINSTYLES
  5285.  
  5286. /*
  5287.  * Listbox Styles
  5288.  */
  5289. #define LBS_NOTIFY            0x0001L
  5290. #define LBS_SORT              0x0002L
  5291. #define LBS_NOREDRAW          0x0004L
  5292. #define LBS_MULTIPLESEL       0x0008L
  5293. #define LBS_OWNERDRAWFIXED    0x0010L
  5294. #define LBS_OWNERDRAWVARIABLE 0x0020L
  5295. #define LBS_HASSTRINGS        0x0040L
  5296. #define LBS_USETABSTOPS       0x0080L
  5297. #define LBS_NOINTEGRALHEIGHT  0x0100L
  5298. #define LBS_MULTICOLUMN       0x0200L
  5299. #define LBS_WANTKEYBOARDINPUT 0x0400L
  5300. #define LBS_EXTENDEDSEL       0x0800L
  5301. #define LBS_DISABLENOSCROLL   0x1000L
  5302. #define LBS_NODATA            0x2000L
  5303. #define LBS_STANDARD          (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  5304.  
  5305. #endif /* !NOWINSTYLES */
  5306.  
  5307.  
  5308. /*
  5309.  * Combo Box return Values
  5310.  */
  5311. #define CB_OKAY             0
  5312. #define CB_ERR              (-1)
  5313. #define CB_ERRSPACE         (-2)
  5314.  
  5315.  
  5316. /*
  5317.  * Combo Box Notification Codes
  5318.  */
  5319. #define CBN_ERRSPACE        (-1)
  5320. #define CBN_SELCHANGE       1
  5321. #define CBN_DBLCLK          2
  5322. #define CBN_SETFOCUS        3
  5323. #define CBN_KILLFOCUS       4
  5324. #define CBN_EDITCHANGE      5
  5325. #define CBN_EDITUPDATE      6
  5326. #define CBN_DROPDOWN        7
  5327. #define CBN_CLOSEUP         8
  5328. #define CBN_SELENDOK        9
  5329. #define CBN_SELENDCANCEL    10
  5330.  
  5331. /*
  5332.  * Combo Box styles
  5333.  */
  5334. #ifndef NOWINSTYLES
  5335. #define CBS_SIMPLE            0x0001L
  5336. #define CBS_DROPDOWN          0x0002L
  5337. #define CBS_DROPDOWNLIST      0x0003L
  5338. #define CBS_OWNERDRAWFIXED    0x0010L
  5339. #define CBS_OWNERDRAWVARIABLE 0x0020L
  5340. #define CBS_AUTOHSCROLL       0x0040L
  5341. #define CBS_OEMCONVERT        0x0080L
  5342. #define CBS_SORT              0x0100L
  5343. #define CBS_HASSTRINGS        0x0200L
  5344. #define CBS_NOINTEGRALHEIGHT  0x0400L
  5345. #define CBS_DISABLENOSCROLL   0x0800L
  5346. #endif  /* !NOWINSTYLES */
  5347.  
  5348.  
  5349. /*
  5350.  * Combo Box messages
  5351.  */
  5352. #ifndef NOWINMESSAGES
  5353. #define CB_GETEDITSEL               0x0140
  5354. #define CB_LIMITTEXT                0x0141
  5355. #define CB_SETEDITSEL               0x0142
  5356. #define CB_ADDSTRING                0x0143
  5357. #define CB_DELETESTRING             0x0144
  5358. #define CB_DIR                      0x0145
  5359. #define CB_GETCOUNT                 0x0146
  5360. #define CB_GETCURSEL                0x0147
  5361. #define CB_GETLBTEXT                0x0148
  5362. #define CB_GETLBTEXTLEN             0x0149
  5363. #define CB_INSERTSTRING             0x014A
  5364. #define CB_RESETCONTENT             0x014B
  5365. #define CB_FINDSTRING               0x014C
  5366. #define CB_SELECTSTRING             0x014D
  5367. #define CB_SETCURSEL                0x014E
  5368. #define CB_SHOWDROPDOWN             0x014F
  5369. #define CB_GETITEMDATA              0x0150
  5370. #define CB_SETITEMDATA              0x0151
  5371. #define CB_GETDROPPEDCONTROLRECT    0x0152
  5372. #define CB_SETITEMHEIGHT            0x0153
  5373. #define CB_GETITEMHEIGHT            0x0154
  5374. #define CB_SETEXTENDEDUI            0x0155
  5375. #define CB_GETEXTENDEDUI            0x0156
  5376. #define CB_GETDROPPEDSTATE          0x0157
  5377. #define CB_FINDSTRINGEXACT          0x0158
  5378. #define CB_SETLOCALE                0x0159
  5379. #define CB_GETLOCALE                0x015a
  5380. #define CB_MSGMAX                   0x015b
  5381. #endif  /* !NOWINMESSAGES */
  5382.  
  5383.  
  5384.  
  5385. #ifndef NOWINSTYLES
  5386.  
  5387. /*
  5388.  * Scroll Bar Styles
  5389.  */
  5390. #define SBS_HORZ                    0x0000L
  5391. #define SBS_VERT                    0x0001L
  5392. #define SBS_TOPALIGN                0x0002L
  5393. #define SBS_LEFTALIGN               0x0002L
  5394. #define SBS_BOTTOMALIGN             0x0004L
  5395. #define SBS_RIGHTALIGN              0x0004L
  5396. #define SBS_SIZEBOXTOPLEFTALIGN     0x0002L
  5397. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  5398. #define SBS_SIZEBOX                 0x0008L
  5399. #endif /* !NOWINSTYLES */
  5400.  
  5401. /*
  5402.  * Scroll bar messages
  5403.  */
  5404. #ifndef NOWINMESSAGES
  5405. #define SBM_SETPOS                  0x00E0 /*not in win3.1 */
  5406. #define SBM_GETPOS                  0x00E1 /*not in win3.1 */
  5407. #define SBM_SETRANGE                0x00E2 /*not in win3.1 */
  5408. #define SBM_SETRANGEREDRAW          0x00E6 /*not in win3.1 */
  5409. #define SBM_GETRANGE                0x00E3 /*not in win3.1 */
  5410. #define SBM_ENABLE_ARROWS           0x00E4 /*not in win3.1 */
  5411. #endif /* !NOWINMESSAGES */
  5412. #endif /* !NOCTLMGR */
  5413.  
  5414. #ifndef NOMDI
  5415.  
  5416. /*
  5417.  * MDI client style bits
  5418.  */
  5419. #define MDIS_ALLCHILDSTYLES    0x0001
  5420.  
  5421. /*
  5422.  * wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
  5423.  */
  5424. #define MDITILE_VERTICAL       0x0000 /*not in win3.1 */
  5425. #define MDITILE_HORIZONTAL     0x0001 /*not in win3.1 */
  5426. #define MDITILE_SKIPDISABLED   0x0002 /*not in win3.1 */
  5427.  
  5428. typedef struct tagMDICREATESTRUCTA {
  5429.     LPCSTR   szClass;
  5430.     LPCSTR   szTitle;
  5431.     HANDLE hOwner;
  5432.     int x;
  5433.     int y;
  5434.     int cx;
  5435.     int cy;
  5436.     DWORD style;
  5437.     LPARAM lParam;        /* app-defined stuff */
  5438. } MDICREATESTRUCTA, *LPMDICREATESTRUCTA;
  5439. typedef struct tagMDICREATESTRUCTW {
  5440.     LPCWSTR  szClass;
  5441.     LPCWSTR  szTitle;
  5442.     HANDLE hOwner;
  5443.     int x;
  5444.     int y;
  5445.     int cx;
  5446.     int cy;
  5447.     DWORD style;
  5448.     LPARAM lParam;        /* app-defined stuff */
  5449. } MDICREATESTRUCTW, *LPMDICREATESTRUCTW;
  5450. #ifdef UNICODE
  5451. typedef MDICREATESTRUCTW MDICREATESTRUCT;
  5452. typedef LPMDICREATESTRUCTW LPMDICREATESTRUCT;
  5453. #else
  5454. typedef MDICREATESTRUCTA MDICREATESTRUCT;
  5455. typedef LPMDICREATESTRUCTA LPMDICREATESTRUCT;
  5456. #endif // UNICODE
  5457.  
  5458. typedef struct tagCLIENTCREATESTRUCT {
  5459.     HANDLE hWindowMenu;
  5460.     UINT idFirstChild;
  5461. } CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
  5462.  
  5463. LRESULT
  5464. WINAPI
  5465. DefFrameProcA(
  5466.     HWND hWnd,
  5467.     HWND hWndMDIClient ,
  5468.     UINT uMsg,
  5469.     WPARAM wParam,
  5470.     LPARAM lParam);
  5471. LRESULT
  5472. WINAPI
  5473. DefFrameProcW(
  5474.     HWND hWnd,
  5475.     HWND hWndMDIClient ,
  5476.     UINT uMsg,
  5477.     WPARAM wParam,
  5478.     LPARAM lParam);
  5479. #ifdef UNICODE
  5480. #define DefFrameProc  DefFrameProcW
  5481. #else
  5482. #define DefFrameProc  DefFrameProcA
  5483. #endif // !UNICODE
  5484.  
  5485. LRESULT
  5486. WINAPI
  5487. DefMDIChildProcA(
  5488.     HWND hWnd,
  5489.     UINT uMsg,
  5490.     WPARAM wParam,
  5491.     LPARAM lParam);
  5492. LRESULT
  5493. WINAPI
  5494. DefMDIChildProcW(
  5495.     HWND hWnd,
  5496.     UINT uMsg,
  5497.     WPARAM wParam,
  5498.     LPARAM lParam);
  5499. #ifdef UNICODE
  5500. #define DefMDIChildProc  DefMDIChildProcW
  5501. #else
  5502. #define DefMDIChildProc  DefMDIChildProcA
  5503. #endif // !UNICODE
  5504.  
  5505. #ifndef NOMSG
  5506.  
  5507. BOOL
  5508. WINAPI
  5509. TranslateMDISysAccel(
  5510.     HWND hWndClient,
  5511.     LPMSG lpMsg);
  5512.  
  5513. #endif /* !NOMSG */
  5514.  
  5515. UINT
  5516. WINAPI
  5517. ArrangeIconicWindows(
  5518.     HWND hWnd);
  5519.  
  5520. HWND
  5521. WINAPI
  5522. CreateMDIWindowA(
  5523.     LPSTR lpClassName,
  5524.     LPSTR lpWindowName,
  5525.     DWORD dwStyle,
  5526.     int X,
  5527.     int Y,
  5528.     int nWidth,
  5529.     int nHeight,
  5530.     HWND hWndParent,
  5531.     HINSTANCE hInstance,
  5532.     LPARAM lParam
  5533.     );
  5534. HWND
  5535. WINAPI
  5536. CreateMDIWindowW(
  5537.     LPWSTR lpClassName,
  5538.     LPWSTR lpWindowName,
  5539.     DWORD dwStyle,
  5540.     int X,
  5541.     int Y,
  5542.     int nWidth,
  5543.     int nHeight,
  5544.     HWND hWndParent,
  5545.     HINSTANCE hInstance,
  5546.     LPARAM lParam
  5547.     );
  5548. #ifdef UNICODE
  5549. #define CreateMDIWindow  CreateMDIWindowW
  5550. #else
  5551. #define CreateMDIWindow  CreateMDIWindowA
  5552. #endif // !UNICODE
  5553.  
  5554. #endif /* !NOMDI */
  5555. #endif /* !NOUSER */
  5556.  
  5557. /****** Help support ********************************************************/
  5558.  
  5559. #ifndef NOHELP
  5560.  
  5561. typedef DWORD HELPPOLY;
  5562. typedef struct tagMULTIKEYHELPA {
  5563.     DWORD mkSize;
  5564.     CHAR   mkKeylist;
  5565.     CHAR   szKeyphrase[1];
  5566. } MULTIKEYHELPA, *PMULTIKEYHELPA, *LPMULTIKEYHELPA;
  5567. typedef struct tagMULTIKEYHELPW {
  5568.     DWORD mkSize;
  5569.     WCHAR  mkKeylist;
  5570.     WCHAR  szKeyphrase[1];
  5571. } MULTIKEYHELPW, *PMULTIKEYHELPW, *LPMULTIKEYHELPW;
  5572. #ifdef UNICODE
  5573. typedef MULTIKEYHELPW MULTIKEYHELP;
  5574. typedef PMULTIKEYHELPW PMULTIKEYHELP;
  5575. typedef LPMULTIKEYHELPW LPMULTIKEYHELP;
  5576. #else
  5577. typedef MULTIKEYHELPA MULTIKEYHELP;
  5578. typedef PMULTIKEYHELPA PMULTIKEYHELP;
  5579. typedef LPMULTIKEYHELPA LPMULTIKEYHELP;
  5580. #endif // UNICODE
  5581.  
  5582. typedef struct tagHELPWININFOA {
  5583.     int  wStructSize;
  5584.     int  x;
  5585.     int  y;
  5586.     int  dx;
  5587.     int  dy;
  5588.     int  wMax;
  5589.     CHAR   rgchMember[2];
  5590. } HELPWININFOA, *PHELPWININFOA, *LPHELPWININFOA;
  5591. typedef struct tagHELPWININFOW {
  5592.     int  wStructSize;
  5593.     int  x;
  5594.     int  y;
  5595.     int  dx;
  5596.     int  dy;
  5597.     int  wMax;
  5598.     WCHAR  rgchMember[2];
  5599. } HELPWININFOW, *PHELPWININFOW, *LPHELPWININFOW;
  5600. #ifdef UNICODE
  5601. typedef HELPWININFOW HELPWININFO;
  5602. typedef PHELPWININFOW PHELPWININFO;
  5603. typedef LPHELPWININFOW LPHELPWININFO;
  5604. #else
  5605. typedef HELPWININFOA HELPWININFO;
  5606. typedef PHELPWININFOA PHELPWININFO;
  5607. typedef LPHELPWININFOA LPHELPWININFO;
  5608. #endif // UNICODE
  5609.  
  5610. /*
  5611.  * Commands to pass to WinHelp()
  5612.  */
  5613. #define HELP_CONTEXT      0x0001L  /* Display topic in ulTopic */
  5614. #define HELP_QUIT         0x0002L  /* Terminate help */
  5615. #define HELP_INDEX        0x0003L  /* Display index */
  5616. #define HELP_CONTENTS     0x0003L
  5617. #define HELP_HELPONHELP   0x0004L  /* Display help on using help */
  5618. #define HELP_SETINDEX     0x0005L  /* Set current Index for multi index help */
  5619. #define HELP_SETCONTENTS  0x0005L
  5620. #define HELP_CONTEXTPOPUP 0x0008L
  5621. #define HELP_FORCEFILE    0x0009L
  5622. #define HELP_KEY          0x0101L  /* Display topic for keyword in offabData */
  5623. #define HELP_COMMAND      0x0102L
  5624. #define HELP_PARTIALKEY   0x0105L
  5625. #define HELP_MULTIKEY     0x0201L
  5626. #define HELP_SETWINPOS    0x0203L
  5627.  
  5628.  
  5629. BOOL
  5630. WINAPI
  5631. WinHelpA(
  5632.     HWND hWndMain,
  5633.     LPCSTR lpszHelp,
  5634.     UINT uCommand,
  5635.     DWORD dwData
  5636.     );
  5637. BOOL
  5638. WINAPI
  5639. WinHelpW(
  5640.     HWND hWndMain,
  5641.     LPCWSTR lpszHelp,
  5642.     UINT uCommand,
  5643.     DWORD dwData
  5644.     );
  5645. #ifdef UNICODE
  5646. #define WinHelp  WinHelpW
  5647. #else
  5648. #define WinHelp  WinHelpA
  5649. #endif // !UNICODE
  5650.  
  5651. #endif /* !NOHELP */
  5652.  
  5653. #ifndef NOSYSPARAMSINFO
  5654. /*
  5655.  * Parameter for SystemParametersInfo()
  5656.  */
  5657.  
  5658. #define SPI_GETBEEP                 1
  5659. #define SPI_SETBEEP                 2
  5660. #define SPI_GETMOUSE                3
  5661. #define SPI_SETMOUSE                4
  5662. #define SPI_GETBORDER               5
  5663. #define SPI_SETBORDER               6
  5664. #define SPI_GETKEYBOARDSPEED       10
  5665. #define SPI_SETKEYBOARDSPEED       11
  5666. #define SPI_LANGDRIVER             12
  5667. #define SPI_ICONHORIZONTALSPACING  13
  5668. #define SPI_GETSCREENSAVETIMEOUT   14
  5669. #define SPI_SETSCREENSAVETIMEOUT   15
  5670. #define SPI_GETSCREENSAVEACTIVE    16
  5671. #define SPI_SETSCREENSAVEACTIVE    17
  5672. #define SPI_GETGRIDGRANULARITY     18
  5673. #define SPI_SETGRIDGRANULARITY     19
  5674. #define SPI_SETDESKWALLPAPER       20
  5675. #define SPI_SETDESKPATTERN         21
  5676. #define SPI_GETKEYBOARDDELAY       22
  5677. #define SPI_SETKEYBOARDDELAY       23
  5678. #define SPI_ICONVERTICALSPACING    24
  5679. #define SPI_GETICONTITLEWRAP       25
  5680. #define SPI_SETICONTITLEWRAP       26
  5681. #define SPI_GETMENUDROPALIGNMENT   27
  5682. #define SPI_SETMENUDROPALIGNMENT   28
  5683. #define SPI_SETDOUBLECLKWIDTH      29
  5684. #define SPI_SETDOUBLECLKHEIGHT     30
  5685. #define SPI_GETICONTITLELOGFONT    31
  5686. #define SPI_SETDOUBLECLICKTIME     32
  5687. #define SPI_SETMOUSEBUTTONSWAP     33
  5688. #define SPI_SETICONTITLELOGFONT    34
  5689. #define SPI_GETFASTTASKSWITCH      35
  5690. #define SPI_SETFASTTASKSWITCH      36
  5691.  
  5692. /*
  5693.  * Flags
  5694.  */
  5695. #define SPIF_UPDATEINIFILE    0x0001
  5696. #define SPIF_SENDWININICHANGE 0x0002
  5697.  
  5698.  
  5699. BOOL
  5700. WINAPI
  5701. SystemParametersInfoA(
  5702.     UINT uiAction,
  5703.     UINT uiParam,
  5704.     PVOID pvParam,
  5705.     UINT fWinIni);
  5706. BOOL
  5707. WINAPI
  5708. SystemParametersInfoW(
  5709.     UINT uiAction,
  5710.     UINT uiParam,
  5711.     PVOID pvParam,
  5712.     UINT fWinIni);
  5713. #ifdef UNICODE
  5714. #define SystemParametersInfo  SystemParametersInfoW
  5715. #else
  5716. #define SystemParametersInfo  SystemParametersInfoA
  5717. #endif // !UNICODE
  5718.  
  5719. #endif  /* !NOSYSPARAMSINFO  */
  5720.  
  5721.  
  5722. #ifdef __cplusplus
  5723. }
  5724. #endif  /* __cplusplus */
  5725.  
  5726. #endif /* !_WINUSER_ */
  5727.