Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9152 lines
380 KiB

  1. /*****************************************************************************\
  2. * *
  3. * windows.h - Windows functions, types, and definitions *
  4. * *
  5. * Version 4.00 *
  6. * *
  7. * Copyright (c) 1985-1997, Microsoft Corp. All rights reserved. *
  8. * *
  9. *******************************************************************************
  10. *
  11. * The following symbols control inclusion of various parts of this file:
  12. *
  13. * WINVER Windows version number (0x040A). To exclude
  14. * definitions introduced in version 4.1 (or above)
  15. * #define WINVER 0x0300
  16. * 0x0310 or 0x0400 before #including <windows.h>
  17. *
  18. * #define: To prevent inclusion of:
  19. *
  20. * NOKERNEL KERNEL APIs and definitions
  21. * NOGDI GDI APIs and definitions
  22. * NOUSER USER APIs and definitions
  23. * NOSOUND Sound APIs and definitions
  24. * NOCOMM Comm driver APIs and definitions
  25. * NODRIVERS Installable driver APIs and definitions
  26. * NOIMT Installable messge thunk APIs and definitions
  27. * NOMINMAX min() and max() macros
  28. * NOLOGERROR LogError() and related definitions
  29. * NOPROFILER Profiler APIs
  30. * NOMEMMGR Local and global memory management
  31. * NOLFILEIO _l* file I/O routines
  32. * NOOPENFILE OpenFile and related definitions
  33. * NORESOURCE Resource management
  34. * NOATOM Atom management
  35. * NOLANGUAGE Character test routines
  36. * NOLSTRING lstr* string management routines
  37. * NODBCS Double-byte character set routines
  38. * NOKEYBOARDINFO Keyboard driver routines
  39. * NOGDICAPMASKS GDI device capability constants
  40. * NOCOLOR COLOR_* color values
  41. * NOGDIOBJ GDI pens, brushes, fonts
  42. * NODRAWTEXT DrawText() and related definitions
  43. * NOTEXTMETRIC TEXTMETRIC and related APIs
  44. * NOSCALABLEFONT Truetype scalable font support
  45. * NOBITMAP Bitmap support
  46. * NORASTEROPS GDI Raster operation definitions
  47. * NOMETAFILE Metafile support
  48. * NOSYSMETRICS GetSystemMetrics() and related SM_* definitions
  49. * NOSYSTEMPARAMSINFO SystemParametersInfo() and SPI_* definitions
  50. * NOMSG APIs and definitions that use MSG structure
  51. * NOWINSTYLES Window style definitions
  52. * NOWINOFFSETS Get/SetWindowWord/Long offset definitions
  53. * NOSHOWWINDOW ShowWindow and related definitions
  54. * NODEFERWINDOWPOS DeferWindowPos and related definitions
  55. * NOVIRTUALKEYCODES VK_* virtual key codes
  56. * NOKEYSTATES MK_* message key state flags
  57. * NOWH SetWindowsHook and related WH_* definitions
  58. * NOMENUS Menu APIs
  59. * NOSCROLL Scrolling APIs and scroll bar control
  60. * NOCLIPBOARD Clipboard APIs and definitions
  61. * NOICONS IDI_* icon IDs
  62. * NOMB MessageBox and related definitions
  63. * NOSYSCOMMANDS WM_SYSCOMMAND SC_* definitions
  64. * NOMDI MDI support
  65. * NOCTLMGR Control management and controls
  66. * NOWINMESSAGES WM_* window messages
  67. * NOHELP Help support
  68. *
  69. \****************************************************************************/
  70. #ifndef _INC_WINDOWS
  71. #define _INC_WINDOWS /* #defined if windows.h has been included */
  72. #ifndef RC_INVOKED
  73. #pragma pack(1) /* Assume byte packing throughout */
  74. #endif /* RC_INVOKED */
  75. #ifdef __cplusplus
  76. extern "C" { /* Assume C declarations for C++ */
  77. #endif /* __cplusplus */
  78. #ifdef NOWIN31 /* ;Internal */
  79. #define WINVER 0x0300 /* ;Internal */
  80. #endif /* ;Internal */
  81. /* ;Internal */
  82. /* If WINVER is not defined, assume version 4.1 */
  83. #ifndef WINVER
  84. #define WINVER 0x040A
  85. #endif
  86. #ifdef RC_INVOKED
  87. /* Don't include definitions that RC.EXE can't parse */
  88. #define NOATOM
  89. #define NOGDICAPMASKS
  90. #define NOMETAFILE
  91. #define NOMINMAX
  92. #define NOMSG
  93. #define NOOPENFILE
  94. #define NORASTEROPS
  95. #define NOSCROLL
  96. #define NOSOUND
  97. #define NOSYSMETRICS
  98. #define NOTEXTMETRIC
  99. #define NOWH
  100. #define NODBCS
  101. #define NOSYSTEMPARAMSINFO
  102. //#define NOCOMM
  103. #define NOOEMRESOURCE
  104. #endif /* RC_INVOKED */
  105. /* Temp internal compatibility hacks */ /* ;Internal */
  106. #define NOOEMRESOURCE /* ;Internal */
  107. #ifdef OEMRESOURCE /* ;Internal */
  108. #undef NOOEMRESOURCE /* ;Internal */
  109. #endif /* ;Internal */
  110. #ifndef NOCOMM
  111. #define NOCOMM /* ;Internal */
  112. #endif
  113. #ifdef USECOMM /* ;Internal */
  114. #undef NOCOMM /* ;Internal */
  115. #endif /* ;Internal */
  116. /* ;Internal */
  117. /* Handle OEMRESOURCE for 3.0 compatibility */
  118. #if (WINVER < 0x030a)
  119. #define NOOEMRESOURCE
  120. #ifdef OEMRESOURCE
  121. #undef NOOEMRESOURCE
  122. #endif
  123. #endif
  124. /******* Common definitions and typedefs ***********************************/
  125. #define VOID void
  126. #define FAR _far
  127. #define NEAR _near
  128. #define PASCAL _pascal
  129. #define CDECL _cdecl
  130. #define CONST const /* ;Internal */
  131. /* ;Internal */
  132. #ifdef BUILDDLL /* ;Internal */
  133. #define WINAPI _loadds _far _pascal /* ;Internal */
  134. #define CALLBACK _loadds _far _pascal /* ;Internal */
  135. /* Note that to use the BUILDDLL version of */ /* ;Internal */
  136. /* WINCAPI, you must compile with -GD */ /* ;Internal */
  137. #define WINCAPI _export _far _cdecl /* ;Internal */
  138. #else /* ;Internal */
  139. #define WINAPI _far _pascal
  140. #define CALLBACK _far _pascal
  141. #define WINCAPI _far _cdecl
  142. #endif /* ;Internal */
  143. /* ;Internal */
  144. #define API WINAPI /* ;Internal */
  145. /****** Simple types & common helper macros *********************************/
  146. typedef int BOOL;
  147. #define FALSE 0
  148. #define TRUE 1
  149. typedef unsigned char BYTE;
  150. typedef unsigned short WORD;
  151. typedef unsigned long DWORD;
  152. typedef WORD WCHAR;
  153. typedef unsigned int UINT;
  154. #ifdef STRICT
  155. typedef signed long LONG;
  156. #else
  157. #define LONG long
  158. #endif
  159. typedef short SHORT;
  160. typedef unsigned long ULONG;
  161. #define LOBYTE(w) ((BYTE)(w))
  162. #define HIBYTE(w) ((BYTE)(((UINT)(w) >> 8) & 0xFF))
  163. #define LOWORD(l) ((WORD)(DWORD)(l))
  164. #define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF))
  165. #define MAKELONG(low, high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))
  166. #ifndef NOMINMAX
  167. #ifndef max
  168. #define max(a,b) (((a) > (b)) ? (a) : (b))
  169. #endif
  170. #ifndef min
  171. #define min(a,b) (((a) < (b)) ? (a) : (b))
  172. #endif
  173. #endif /* NOMINMAX */
  174. /* Types use for passing & returning polymorphic values */
  175. typedef UINT WPARAM;
  176. typedef LONG LPARAM;
  177. typedef LONG LRESULT;
  178. #define MAKELPARAM(low, high) ((LPARAM)MAKELONG(low, high))
  179. #define MAKELRESULT(low, high) ((LRESULT)MAKELONG(low, high))
  180. /****** Common pointer types ************************************************/
  181. #ifndef NULL
  182. #define NULL 0
  183. #endif
  184. typedef char NEAR* PSTR;
  185. typedef char NEAR* NPSTR;
  186. #define SZ char /* ;Internal */
  187. /* ;Internal */
  188. typedef char FAR* LPSTR;
  189. typedef const char FAR* LPCSTR;
  190. typedef BYTE NEAR* PBYTE;
  191. typedef BYTE FAR* LPBYTE;
  192. typedef const BYTE FAR* LPCBYTE;
  193. typedef int NEAR* PINT;
  194. typedef int FAR* LPINT;
  195. typedef WORD NEAR* PWORD;
  196. typedef WORD FAR* LPWORD;
  197. typedef long NEAR* PLONG;
  198. typedef long FAR* LPLONG;
  199. typedef DWORD NEAR* PDWORD;
  200. typedef DWORD FAR* LPDWORD;
  201. typedef void FAR* LPVOID;
  202. #define MAKELP(sel, off) ((void FAR*)MAKELONG((off), (sel)))
  203. #define SELECTOROF(lp) HIWORD(lp)
  204. #define OFFSETOF(lp) LOWORD(lp)
  205. #define FIELDOFFSET(type, field) ((int)(&((type NEAR*)1)->field)-1)
  206. /****** Common handle types *************************************************/
  207. #ifdef STRICT
  208. typedef const void NEAR* HANDLE;
  209. #define DECLARE_HANDLE(name) struct name##__ { int unused; }; \
  210. typedef const struct name##__ NEAR* name
  211. #define DECLARE_HANDLE32(name) struct name##__ { int unused; }; \
  212. typedef const struct name##__ FAR* name
  213. #else /* STRICT */
  214. typedef UINT HANDLE;
  215. #define DECLARE_HANDLE(name) typedef UINT name
  216. #define DECLARE_HANDLE32(name) typedef DWORD name
  217. #endif /* !STRICT */
  218. typedef HANDLE* PHANDLE;
  219. typedef HANDLE NEAR* SPHANDLE;
  220. typedef HANDLE FAR* LPHANDLE;
  221. typedef HANDLE HGLOBAL;
  222. typedef HANDLE HLOCAL;
  223. typedef HANDLE GLOBALHANDLE;
  224. typedef HANDLE LOCALHANDLE;
  225. typedef UINT ATOM;
  226. #ifdef STRICT
  227. typedef void (CALLBACK* FARPROC)(void);
  228. typedef void (NEAR PASCAL* NEARPROC)(void);
  229. #else
  230. typedef int (CALLBACK* FARPROC)();
  231. typedef int (NEAR PASCAL* NEARPROC)();
  232. #endif
  233. DECLARE_HANDLE(HSTR);
  234. /****** KERNEL typedefs, structures, and functions **************************/
  235. DECLARE_HANDLE(HINSTANCE);
  236. typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */
  237. typedef DWORD HKL;
  238. #ifndef NOKERNEL
  239. /****** Application entry point function ************************************/
  240. #ifdef STRICT
  241. int PASCAL WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
  242. #endif
  243. /****** System Information **************************************************/
  244. DWORD WINAPI GetVersion(void);
  245. #if (WINVER >= 0x0400)
  246. typedef struct tagOSVERSIONINFO {
  247. DWORD dwOSVersionInfoSize;
  248. DWORD dwMajorVersion;
  249. DWORD dwMinorVersion;
  250. DWORD dwBuildNumber;
  251. DWORD dwPlatformId;
  252. char szCSDVersion[128];
  253. } OSVERSIONINFO, NEAR *POSVERSIONINFO, FAR *LPOSVERSIONINFO;
  254. #define VER_PLATFORM_WIN32s 0
  255. #define VER_PLATFORM_WIN32_WINDOWS 1
  256. #define VER_PLATFORM_WIN32_NT 2
  257. BOOL WINAPI GetVersionEx(LPOSVERSIONINFO lpBuffer);
  258. UINT WINAPI GetProductName(LPSTR, UINT);
  259. #endif /* WINVER >= 0x0400 */
  260. #if (WINVER >= 0x0400)
  261. #define GFS_PHYSICALRAMSIZE 0x1793
  262. #define GFS_NEARESTMEGRAMSIZE 0x1794
  263. #endif /* WINVER >= 0x0400 */
  264. DWORD WINAPI GetFreeSpace(UINT);
  265. UINT WINAPI GetCurrentPDB(void);
  266. UINT WINAPI GetWindowsDirectory(LPSTR, UINT);
  267. UINT WINAPI GetSystemDirectory(LPSTR, UINT);
  268. #if (WINVER >= 0x030a)
  269. UINT WINAPI GetFreeSystemResources(UINT);
  270. #define GFSR_SYSTEMRESOURCES 0x0000
  271. #define GFSR_GDIRESOURCES 0x0001
  272. #define GFSR_USERRESOURCES 0x0002
  273. #define GFSR_VALID 0x0002 /* ;Internal */
  274. #endif /* WINVER >= 0x030a */
  275. DWORD WINAPI GetWinFlags(void);
  276. #define WF_PMODE 0x0001
  277. #define WF_CPU286 0x0002
  278. #define WF_CPU386 0x0004
  279. #define WF_CPU486 0x0008
  280. #define WF_STANDARD 0x0010
  281. #define WF_WIN286 0x0010
  282. #define WF_ENHANCED 0x0020
  283. #define WF_WIN386 0x0020
  284. #define WF_CPU086 0x0040
  285. #define WF_CPU186 0x0080
  286. #if (WINVER < 0x030a)
  287. #define WF_LARGEFRAME 0x0100
  288. #define WF_SMALLFRAME 0x0200
  289. #endif
  290. #define WF_80x87 0x0400
  291. #define WF_PAGING 0x0800
  292. #define WF_DOSPAGING 0x1000
  293. #define WF_HASCPUID 0x2000
  294. #define WF_WINNT 0x4000
  295. #define WF_WLO 0x8000
  296. #define WF_CPUMASK 0xFC000000
  297. #define WF_CPU_X86 0
  298. #define WF_CPU_R4000 1
  299. #define WF_CPU_ALPHA 2
  300. #define WF_CPU_CLIPPER 3
  301. LPSTR WINAPI GetDOSEnvironment(void);
  302. DWORD WINAPI GetCurrentTime(void);
  303. DWORD WINAPI GetTickCount(void);
  304. DWORD WINAPI GetTimerResolution(void);
  305. /****** Error handling ******************************************************/
  306. #if (WINVER >= 0x030a)
  307. #ifndef NOLOGERROR
  308. void WINAPI LogError(UINT err, void FAR* lpInfo);
  309. void WINAPI LogParamError(UINT err, FARPROC lpfn, void FAR* param);
  310. /****** LogParamError/LogError values */
  311. /* Error modifier bits */
  312. #define ERR_WARNING 0x8000
  313. #define ERR_PARAM 0x4000
  314. /* Internal error value masks */ /* ;Internal */
  315. #define ERR_TYPE_MASK 0x0fff /* ;Internal */
  316. #define ERR_FLAGS_MASK 0xc000 /* ;Internal */
  317. /* ;Internal */
  318. #define ERR_SIZE_MASK 0x3000
  319. #define ERR_SIZE_SHIFT 12 /* ;Internal */
  320. #define ERR_BYTE 0x1000
  321. #define ERR_WORD 0x2000
  322. #define ERR_DWORD 0x3000
  323. /* ;Internal */
  324. // Error option flags (set by [kernel] ErrorOptions win.ini variable) /* ;Internal */
  325. /* ;Internal */
  326. #define ERO_PARAM_ERROR_BREAK 0x0001 /* ;Internal */
  327. #define ERO_BUFFER_FILL 0x0002 /* ;Internal */
  328. /****** LogParamError() values */
  329. /* Generic parameter values */
  330. #define ERR_BAD_VALUE 0x6001
  331. #define ERR_BAD_FLAGS 0x6002
  332. #define ERR_BAD_INDEX 0x6003
  333. #define ERR_BAD_DVALUE 0x7004
  334. #define ERR_BAD_DFLAGS 0x7005
  335. #define ERR_BAD_DINDEX 0x7006
  336. #define ERR_BAD_PTR 0x7007
  337. #define ERR_BAD_FUNC_PTR 0x7008
  338. #define ERR_BAD_SELECTOR 0x6009
  339. #define ERR_BAD_STRING_PTR 0x700a
  340. #define ERR_BAD_HANDLE 0x600b
  341. /* KERNEL parameter errors */
  342. #define ERR_BAD_HINSTANCE 0x6020
  343. #define ERR_BAD_HMODULE 0x6021
  344. #define ERR_BAD_GLOBAL_HANDLE 0x6022
  345. #define ERR_BAD_LOCAL_HANDLE 0x6023
  346. #define ERR_BAD_ATOM 0x6024
  347. #define ERR_BAD_HFILE 0x6025
  348. /* USER parameter errors */
  349. #define ERR_BAD_HWND 0x6040
  350. #define ERR_BAD_HMENU 0x6041
  351. #define ERR_BAD_HCURSOR 0x6042
  352. #define ERR_BAD_HICON 0x6043
  353. #define ERR_BAD_HDWP 0x6044
  354. #define ERR_BAD_CID 0x6045
  355. #define ERR_BAD_HDRVR 0x6046
  356. /* GDI parameter errors */
  357. #define ERR_BAD_COORDS 0x7060
  358. #define ERR_BAD_GDI_OBJECT 0x6061
  359. #define ERR_BAD_HDC 0x6062
  360. #define ERR_BAD_HPEN 0x6063
  361. #define ERR_BAD_HFONT 0x6064
  362. #define ERR_BAD_HBRUSH 0x6065
  363. #define ERR_BAD_HBITMAP 0x6066
  364. #define ERR_BAD_HRGN 0x6067
  365. #define ERR_BAD_HPALETTE 0x6068
  366. #define ERR_BAD_HMETAFILE 0x6069
  367. #define ERR_BAD_HDCEMF 0x606A /* ;Internal */
  368. #define ERR_BAD_HEMF 0x606B /* ;Internal */
  369. /* ;Internal */
  370. /* Debug fill constants */ /* ;Internal */
  371. /* ;Internal */
  372. #define DBGFILL_ALLOC 0xfd /* ;Internal */
  373. #define DBGFILL_FREE 0xfb /* ;Internal */
  374. #define DBGFILL_BUFFER 0xf9 /* ;Internal */
  375. #define DBGFILL_STACK 0xf7 /* ;Internal */
  376. /**** LogError() values */
  377. /* KERNEL errors */
  378. #define ERR_GALLOC 0x0001
  379. #define ERR_GREALLOC 0x0002
  380. #define ERR_GLOCK 0x0003
  381. #define ERR_LALLOC 0x0004
  382. #define ERR_LREALLOC 0x0005
  383. #define ERR_LLOCK 0x0006
  384. #define ERR_ALLOCRES 0x0007
  385. #define ERR_LOCKRES 0x0008
  386. #define ERR_LOADMODULE 0x0009
  387. /* USER errors */
  388. #define ERR_CREATEDLG 0x0040
  389. #define ERR_CREATEDLG2 0x0041
  390. #define ERR_REGISTERCLASS 0x0042
  391. #define ERR_DCBUSY 0x0043
  392. #define ERR_CREATEWND 0x0044
  393. #define ERR_STRUCEXTRA 0x0045
  394. #define ERR_LOADSTR 0x0046
  395. #define ERR_LOADMENU 0x0047
  396. #define ERR_NESTEDBEGINPAINT 0x0048
  397. #define ERR_BADINDEX 0x0049
  398. #define ERR_CREATEMENU 0x004a
  399. /* GDI errors */
  400. #define ERR_CREATEDC 0x0080
  401. #define ERR_CREATEMETA 0x0081
  402. #define ERR_DELOBJSELECTED 0x0082
  403. #define ERR_SELBITMAP 0x0083
  404. /* Debugging support (DEBUG SYSTEM ONLY) */
  405. typedef struct tagWINDEBUGINFO
  406. {
  407. UINT flags;
  408. DWORD dwOptions;
  409. DWORD dwFilter;
  410. char achAllocModule[8];
  411. DWORD dwAllocBreak;
  412. DWORD dwAllocCount;
  413. #if (WINVER >= 0x0400)
  414. WORD chDefRIP;
  415. #endif /* WINVER >= 0x0400 */
  416. } WINDEBUGINFO;
  417. BOOL WINAPI GetWinDebugInfo(WINDEBUGINFO FAR* lpwdi, UINT flags);
  418. BOOL WINAPI SetWinDebugInfo(const WINDEBUGINFO FAR* lpwdi);
  419. void FAR _cdecl DebugOutput(UINT flags, LPCSTR lpsz, ...);
  420. void WINAPI DebugFillBuffer(void FAR* lpb, UINT cb); /* ;Internal */
  421. /* WINDEBUGINFO flags values */
  422. #define WDI_OPTIONS 0x0001
  423. #define WDI_FILTER 0x0002
  424. #define WDI_ALLOCBREAK 0x0004
  425. #define WDI_DEFRIP 0x0008
  426. #define WDI_VALID 0x00015 /* ;Internal */
  427. /* dwOptions values */
  428. #define DBO_CHECKHEAP 0x0001
  429. #define DBO_BUFFERFILL 0x0004
  430. #define DBO_DISABLEGPTRAPPING 0x0010
  431. #define DBO_CHECKFREE 0x0020
  432. #define DBO_SILENT 0x8000
  433. #define DBO_TRACEBREAK 0x2000
  434. #define DBO_WARNINGBREAK 0x1000
  435. #define DBO_NOERRORBREAK 0x0800
  436. #define DBO_NOFATALBREAK 0x0400
  437. #define DBO_INT3BREAK 0x0100
  438. /* DebugOutput flags values */
  439. #define DBF_TRACE 0x0000
  440. #define DBF_WARNING 0x4000
  441. #define DBF_ERROR 0x8000
  442. #define DBF_FATAL 0xc000
  443. #define DBF_SEVMASK 0xc000 /* ;Internal */
  444. #define DBF_FILTERMASK 0x3fff /* ;Internal */
  445. /* dwFilter values */
  446. #define DBF_KERNEL 0x1000
  447. #define DBF_KRN_MEMMAN 0x0001
  448. #define DBF_KRN_LOADMODULE 0x0002
  449. #define DBF_KRN_SEGMENTLOAD 0x0004
  450. #define DBF_USER 0x0800
  451. #define DBF_GDI 0x0400
  452. #define DBF_MMSYSTEM 0x0040
  453. #define DBF_PENWIN 0x0020
  454. #define DBF_APPLICATION 0x0008
  455. #define DBF_DRIVER 0x0010
  456. #endif /* NOLOGERROR */
  457. #endif /* WINVER >= 0x030a */
  458. void WINAPI FatalExit(int);
  459. void WINAPI FatalAppExit(UINT, LPCSTR);
  460. BOOL WINAPI ExitWindows(DWORD dwReturnCode, UINT wReserved);
  461. #define EW_RESTARTWINDOWS 0x42
  462. #if (WINVER >= 0x030a)
  463. #define EW_REBOOTSYSTEM 0x43
  464. #define EW_EXITANDEXECAPP 0x44 /* ;Internal */
  465. BOOL WINAPI ExitWindowsExec(LPCSTR, LPCSTR);
  466. #endif /* WINVER >= 0x030a */
  467. #define EWX_LOGOFF 0 // ;Internal 4.0
  468. #define EWX_SHUTDOWN 1 // ;Internal 4.0
  469. #define EWX_REBOOT 2 // ;Internal 4.0
  470. #define EWX_FORCE 4 // ;Internal 4.0
  471. #define EWX_POWEROFF 8 // ;Internal 4.0
  472. #define EWX_REALLYLOGOFF 0x80000000 // ;Internal 4.0
  473. #if (WINVER >= 0x0400) // ;Internal
  474. BOOL SaveDesktopState(DWORD, DWORD, DWORD); // ;Internal
  475. #define SAVEDESKTOPSTATEN_EXITWINDOWS 1 // ;Internal
  476. #define SAVEDESKTOPSTATEN_SHUTDOWN 2 // ;Internal
  477. #define SAVEDESKTOPSTATEN_SUSPEND 3 // ;Internal
  478. // ;Internal
  479. #define SAVEDESKTOPSTATEF_NOPROMPT 1 // ;Internal
  480. #endif /* WINVER >= 0x0400 */ // ;Internal
  481. // ;Internal
  482. void WINAPI DebugBreak(void);
  483. void WINAPI OutputDebugString(LPCSTR);
  484. /* SetErrorMode() constants */
  485. #define SEM_FAILCRITICALERRORS 0x0001
  486. #define SEM_NOGPFAULTERRORBOX 0x0002
  487. #define SEM_NOALIGNMENTFAULTEXCEPT 0x0004 // ;Internal NT only
  488. #define SEM_NOOPENFILEERRORBOX 0x8000
  489. UINT WINAPI SetErrorMode(UINT);
  490. #if (WINVER >= 0x0400)
  491. void WINAPI SetLastError(DWORD);
  492. DWORD WINAPI GetLastError(void);
  493. #endif /* WINVER >= 0x0400 */
  494. /****** Pointer validation **************************************************/
  495. #if (WINVER >= 0x030a)
  496. BOOL WINAPI IsBadReadPtr(const void FAR* lp, UINT cb);
  497. BOOL WINAPI IsBadWritePtr(void FAR* lp, UINT cb);
  498. BOOL WINAPI IsBadHugeReadPtr(const void _huge* lp, DWORD cb);
  499. BOOL WINAPI IsBadHugeWritePtr(void _huge* lp, DWORD cb);
  500. BOOL WINAPI IsBadCodePtr(FARPROC lpfn);
  501. BOOL WINAPI IsBadStringPtr(const void FAR* lpsz, UINT cchMax);
  502. #endif /* WINVER >= 0x030a */
  503. /****** Profiling support ***************************************************/
  504. #ifndef NOPROFILER
  505. int WINAPI ProfInsChk(void);
  506. void WINAPI ProfSetup(int,int);
  507. void WINAPI ProfSampRate(int,int);
  508. void WINAPI ProfStart(void);
  509. void WINAPI ProfStop(void);
  510. void WINAPI ProfClear(void);
  511. void WINAPI ProfFlush(void);
  512. void WINAPI ProfFinish(void);
  513. #if (WINVER >= 0x0400)
  514. void WINAPI ProfStart32(void);
  515. void WINAPI ProfStop32(void);
  516. void WINAPI ProfClear32(void);
  517. void WINAPI ProfFlush32(void);
  518. void WINAPI ProfFinish32(void);
  519. #endif /* WINVER >= 0x0400) */
  520. #endif /* NOPROFILER */
  521. /****** Catch/Throw and stack management ************************************/
  522. typedef int CATCHBUF[9];
  523. typedef int FAR* LPCATCHBUF;
  524. int WINAPI Catch(int FAR*);
  525. void WINAPI Throw(const int FAR*, int);
  526. void WINAPI SwitchStackBack(void);
  527. void WINAPI SwitchStackTo(UINT, UINT, UINT);
  528. /****** Module Management ***************************************************/
  529. #define HINSTANCE_ERROR ((HINSTANCE)32)
  530. LONG WINAPI GetExpWinVer(HINSTANCE); /* ;Internal */
  531. /* ;Internal */
  532. HINSTANCE WINAPI LoadModule(LPCSTR, LPVOID);
  533. BOOL WINAPI FreeModule(HINSTANCE);
  534. HINSTANCE WINAPI LoadLibrary(LPCSTR);
  535. void WINAPI FreeLibrary(HINSTANCE);
  536. UINT WINAPI WinExec(LPCSTR, UINT);
  537. HMODULE WINAPI GetModuleHandle(LPCSTR);
  538. int WINAPI GetModuleUsage(HINSTANCE);
  539. int WINAPI GetModuleFileName(HINSTANCE, LPSTR, int);
  540. #if (WINVER >= 0x0400) /* ;Internal */
  541. BOOL WINAPI GetModuleName(HINSTANCE, LPSTR, int); /* ;Internal */
  542. #endif /* WINVER >= 0x0400 */ /* ;Internal */
  543. /* ;Internal */
  544. FARPROC WINAPI GetProcAddress(HINSTANCE, LPCSTR);
  545. int WINAPI GetInstanceData(HINSTANCE, BYTE NEAR *, int);
  546. HGLOBAL WINAPI GetCodeHandle(FARPROC);
  547. typedef struct tagSEGINFO
  548. {
  549. UINT offSegment;
  550. UINT cbSegment;
  551. UINT flags;
  552. UINT cbAlloc;
  553. HGLOBAL h;
  554. UINT alignShift;
  555. UINT reserved[2];
  556. } SEGINFO;
  557. typedef SEGINFO FAR* LPSEGINFO;
  558. void WINAPI GetCodeInfo(FARPROC lpProc, SEGINFO FAR* lpSegInfo);
  559. FARPROC WINAPI MakeProcInstance(FARPROC, HINSTANCE);
  560. void WINAPI FreeProcInstance(FARPROC);
  561. LONG WINAPI SetSwapAreaSize(UINT);
  562. void WINAPI SwapRecording(UINT);
  563. void WINAPI ValidateCodeSegments(void);
  564. /* Windows Exit Procedure flag values */
  565. #define WEP_SYSTEM_EXIT 1
  566. #define WEP_FREE_DLL 0
  567. /****** Task Management *****************************************************/
  568. #endif /* NOKERNEL */
  569. DECLARE_HANDLE(HTASK);
  570. #ifndef NOKERNEL
  571. UINT WINAPI GetNumTasks(void);
  572. #if (WINVER >= 0x030a)
  573. BOOL WINAPI IsTask(HTASK);
  574. #endif /* WINVER >= 0x030a */
  575. HTASK WINAPI GetCurrentTask(void);
  576. int WINAPI SetPriority(HTASK, int); /* ;Internal */
  577. void WINAPI Yield(void);
  578. void WINAPI DirectedYield(HTASK);
  579. DWORD WINAPI GetAppCompatFlags(HTASK); // ;Internal
  580. // ;Internal
  581. /* GetAppCompatFlags flag values */ // ;Internal
  582. #define GACF_IGNORENODISCARD 0x00000001 // ;Internal
  583. #define GACF_FORCETEXTBAND 0x00000002 // ;Internal
  584. #define GACF_ONELANDGRXBAND 0x00000004 // ;Internal
  585. #define GACF_DISABLEWIDEFONT 0x00000008 // ;Internal new bit for PSCRIPT
  586. #define GACF_CALLTTDEVICE 0x00000010 // ;Internal
  587. #define GACF_MULTIPLEBANDS 0x00000020 // ;Internal
  588. #define GACF_ALWAYSSENDNCPAINT 0x00000040 // ;Internal
  589. #define GACF_PALETTEAPP 0x00000080 // ;Internal
  590. #define GACF_MOREEXTRAWNDWORDS 0x00000100 // ;Internal
  591. #define GACF_TTIGNORERASTERDUPE 0x00000200 // ;Internal
  592. #define GACF_GLOBALHOOKSONLY16 0x00000400 // ;Internal
  593. #define GACF_DELAYHWHNDSHAKECHK 0x00000800 // ;Internal
  594. #define GACF_ENUMHELVNTMSRMN 0x00001000 // ;Internal
  595. #define GACF_ENUMTTNOTDEVICE 0x00002000 // ;Internal
  596. #define GACF_SUBTRACTCLIPSIBS 0x00004000 // ;Internal
  597. #define GACF_FORCETTGRAPHICS 0x00008000 // ;Internal
  598. #define GACF_NOHRGN1 0x00010000 // ;Internal
  599. #define GACF_NCCALCSIZEONMOVE 0x00020000 // ;Internal
  600. #define GACF_SENDMENUDBLCLK 0x00040000 // ;Internal not needed anymore
  601. #define GACF_MODULESPECIFIC 0x00040000 // ;Internal replaces sendmenudblclk
  602. #define GACF_30AVGWIDTH 0x00080000 // ;Internal
  603. #define GACF_GETDEVCAPSNUMLIE 0x00100000 // ;Internal NT only
  604. /* New flags for Win 4.0. */ // ;Internal
  605. #define GACF_IGNOREDIBWIDTH 0x00100000 // ;Internal re-use GACF_DEVCAPSNUMLIE
  606. #define GACF_WINVER31 0x00200000 // ;Internal
  607. #define GACF_INCREASESTACK 0x00400000 // ;Internal
  608. #define GACF_HEAPSLACK 0x00400000 // ;Internal
  609. #define GACF_FAFORCEDRAWBG 0x00400000 // ;Internal Used in FE only
  610. #define GACF_FORCEWIN31DEVMODESIZE 0x00800000 // ;Internal (replaces PEEKMESSAGEIDLE)
  611. #define GACF_31VALIDMASK 0xFFE484AF // ;Internal
  612. #define GACF_DISABLEFONTASSOC 0x01000000 // ;Internal Used in FE only
  613. #define GACF_JAPANESCAPEMENT 0x01000000 // ;Internal Used in FE only
  614. #define GACF_IGNOREFAULTS 0x02000000 // ;Internal
  615. #define GACF_DEQUOTIFYCMDLINE 0x02000000 // ;Internal
  616. #define GACF_NOEMFSPOOLING 0x04000000 // ;Internal
  617. #define GACF_RANDOM3XUI 0x08000000 // ;Internal
  618. #define GACF_USEPRINTINGESCAPES 0x00000004 // ;Internal re-use GACF_ONELANDGRXBAND
  619. #define GACF_FORCERASTERMODE 0x00008000 // ;Internal re-use GACF_FORCETTGRAPHICS
  620. #define GACF_FORCEREGPASSTHRU 0x00008000 // ;Internal re-use GACF_FORCERASTERMODE
  621. #define GACF_DONTJOURNALATTACH 0x10000000 // ;Internal
  622. #define GACF_DISABLEDBCSPROPTT 0x20000000 // ;Internal Used in FE only
  623. #define GACF_NOBRUSHCACHE 0x20000000 // ;Internal re-use GACF_DISABLEDBCSPROPTT
  624. #define GACF_55MSSYSTEMTIMER 0x20000000 // ;Internal re-use GACF_NOBRUSHCACHE since this is just used for some games and is system wide too
  625. #define GACF_MIRRORREGFONTS 0x40000000 // ;Internal
  626. #define GACF_UNUSED3 0x80000000 // ;Internal
  627. /* Module Compatibility flag values */ // ;Internal
  628. #define MCF_FIXEDSEGLOW 0x0001 // ;Internal Win31 behaviour for FIXED segs
  629. #define MCF_MODPATCH 0x0002 // ;Internal has module patches
  630. #define MCF_NODISCARD 0x0004 // ;Internal make all segments in the module not discardable
  631. /****** Global memory management ********************************************/
  632. #ifndef NOMEMMGR
  633. /* Global Memory Flags */
  634. #define GMEM_FIXED 0x0000
  635. #define GMEM_MOVEABLE 0x0002
  636. #define GMEM_NOCOMPACT 0x0010
  637. #define GMEM_NODISCARD 0x0020
  638. #define GMEM_ZEROINIT 0x0040
  639. #define GMEM_MODIFY 0x0080
  640. #define GMEM_DISCARDABLE 0x0100
  641. #define GMEM_NOT_BANKED 0x1000
  642. #define GMEM_SHARE 0x2000
  643. #define GMEM_DDESHARE 0x2000
  644. #define GMEM_NOTIFY 0x4000
  645. #define GMEM_LOWER GMEM_NOT_BANKED
  646. #define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT)
  647. #define GPTR (GMEM_FIXED | GMEM_ZEROINIT)
  648. #define GlobalDiscard(h) GlobalReAlloc(h, 0L, GMEM_MOVEABLE)
  649. HGLOBAL WINAPI GlobalAlloc(UINT, DWORD);
  650. HGLOBAL WINAPI GlobalReAlloc(HGLOBAL, DWORD, UINT);
  651. HGLOBAL WINAPI GlobalFree(HGLOBAL);
  652. DWORD WINAPI GlobalDosAlloc(DWORD);
  653. UINT WINAPI GlobalDosFree(UINT);
  654. #ifdef STRICT
  655. void FAR* WINAPI GlobalLock(HGLOBAL);
  656. #else
  657. char FAR* WINAPI GlobalLock(HGLOBAL);
  658. #endif
  659. BOOL WINAPI GlobalUnlock(HGLOBAL);
  660. DWORD WINAPI GlobalSize(HGLOBAL);
  661. DWORD WINAPI GlobalHandle(UINT);
  662. /* GlobalFlags return flags (in addition to GMEM_DISCARDABLE) */
  663. #define GMEM_DISCARDED 0x4000
  664. #define GMEM_LOCKCOUNT 0x00FF
  665. UINT WINAPI GlobalFlags(HGLOBAL);
  666. #ifdef STRICT
  667. void FAR* WINAPI GlobalWire(HGLOBAL);
  668. #else
  669. char FAR* WINAPI GlobalWire(HGLOBAL);
  670. #endif
  671. BOOL WINAPI GlobalUnWire(HGLOBAL);
  672. UINT WINAPI GlobalPageLock(HGLOBAL);
  673. UINT WINAPI GlobalPageUnlock(HGLOBAL);
  674. #if (WINVER >= 0x0400)
  675. UINT WINAPI GlobalSmartPageLock(HGLOBAL);
  676. UINT WINAPI GlobalSmartPageUnlock(HGLOBAL);
  677. #endif /* WINVER >= 0x0400 */
  678. void WINAPI GlobalFix(HGLOBAL);
  679. void WINAPI GlobalUnfix(HGLOBAL);
  680. HGLOBAL WINAPI GlobalLRUNewest(HGLOBAL);
  681. HGLOBAL WINAPI GlobalLRUOldest(HGLOBAL);
  682. DWORD WINAPI GlobalCompact(DWORD);
  683. #ifdef STRICT
  684. typedef BOOL (CALLBACK* GNOTIFYPROC)(HGLOBAL);
  685. #else
  686. typedef FARPROC GNOTIFYPROC;
  687. #endif
  688. void WINAPI GlobalNotify(GNOTIFYPROC);
  689. HGLOBAL WINAPI LockSegment(UINT);
  690. void WINAPI UnlockSegment(UINT);
  691. #define LockData(dummy) LockSegment((UINT)-1)
  692. #define UnlockData(dummy) UnlockSegment((UINT)-1)
  693. UINT WINAPI AllocSelector(UINT);
  694. UINT WINAPI FreeSelector(UINT);
  695. UINT WINAPI AllocDStoCSAlias(UINT);
  696. UINT WINAPI PrestoChangoSelector(UINT sourceSel, UINT destSel);
  697. DWORD WINAPI GetSelectorBase(UINT);
  698. UINT WINAPI SetSelectorBase(UINT, DWORD);
  699. DWORD WINAPI GetSelectorLimit(UINT);
  700. UINT WINAPI SetSelectorLimit(UINT, DWORD);
  701. void WINAPI LimitEmsPages(DWORD);
  702. void WINAPI ValidateFreeSpaces(void);
  703. /***** Local Memory Management */
  704. /* Local Memory Flags */
  705. #define LMEM_FIXED 0x0000
  706. #define LMEM_MOVEABLE 0x0002
  707. #define LMEM_NOCOMPACT 0x0010
  708. #define LMEM_NODISCARD 0x0020
  709. #define LMEM_ZEROINIT 0x0040
  710. #define LMEM_MODIFY 0x0080
  711. #define LMEM_DISCARDABLE 0x0F00
  712. #define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT)
  713. #define LPTR (LMEM_FIXED | LMEM_ZEROINIT)
  714. #define NONZEROLHND (LMEM_MOVEABLE)
  715. #define NONZEROLPTR (LMEM_FIXED)
  716. extern UINT NEAR* PASCAL pLocalHeap; /* ;Internal */
  717. #define LocalFreeze(dummy) (*(pLocalHeap+1) += 1) /* ;Internal */
  718. #define LocalMelt(dummy) (*(pLocalHeap+1) -= 1) /* ;Internal */
  719. /* ;Internal */
  720. #define LocalDiscard(h) LocalReAlloc(h, 0, LMEM_MOVEABLE)
  721. HLOCAL WINAPI LocalAlloc(UINT, UINT);
  722. HLOCAL WINAPI LocalReAlloc(HLOCAL, UINT, UINT);
  723. HLOCAL WINAPI LocalFree(HLOCAL);
  724. #ifdef STRICT
  725. void NEAR* WINAPI LocalLock(HLOCAL);
  726. #else
  727. char NEAR* WINAPI LocalLock(HLOCAL);
  728. #endif
  729. BOOL WINAPI LocalUnlock(HLOCAL);
  730. UINT WINAPI LocalSize(HLOCAL);
  731. #ifdef STRICT
  732. HLOCAL WINAPI LocalHandle(void NEAR*);
  733. #else
  734. HLOCAL WINAPI LocalHandle(UINT);
  735. #endif
  736. UINT WINAPI LocalHandleDelta(UINT); /* ;Internal */
  737. /* LocalFlags return flags (in addition to LMEM_DISCARDABLE) */
  738. #define LMEM_DISCARDED 0x4000
  739. #define LMEM_LOCKCOUNT 0x00FF
  740. UINT WINAPI LocalFlags(HLOCAL);
  741. BOOL WINAPI LocalInit(UINT, UINT, UINT);
  742. UINT WINAPI LocalCompact(UINT);
  743. UINT WINAPI LocalShrink(HLOCAL, UINT);
  744. /* ;Internal */
  745. /* LocalNotify callback */ /* ;Internal */
  746. #ifdef STRICT /* ;Internal */
  747. typedef BOOL (CALLBACK* LNOTIFYPROC)(UINT, HLOCAL, void NEAR*); /* ;Internal */
  748. #else /* ;Internal */
  749. typedef FARPROC LNOTIFYPROC; /* ;Internal */
  750. #endif /* ;Internal */
  751. /* ;Internal */
  752. #define LNOTIFY_OUTOFMEM 0 /* ;Internal */
  753. #define LNOTIFY_MOVE 1 /* ;Internal */
  754. #define LNOTIFY_DISCARD 2 /* ;Internal */
  755. /* ;Internal */
  756. LNOTIFYPROC WINAPI LocalNotify(LNOTIFYPROC); /* ;Internal */
  757. /* ;Internal */
  758. #endif /* NOMEMMGR */
  759. /****** File I/O ************************************************************/
  760. #ifndef NOLFILEIO
  761. typedef int HFILE; /* Polymorphic with C runtime file handle type */
  762. #define HFILE_ERROR ((HFILE)-1)
  763. #ifndef NOOPENFILE
  764. /* OpenFile() Structure */
  765. typedef struct tagOFSTRUCT
  766. {
  767. BYTE cBytes;
  768. BYTE fFixedDisk;
  769. UINT nErrCode;
  770. BYTE reserved[4];
  771. char szPathName[128];
  772. } OFSTRUCT;
  773. typedef OFSTRUCT* POFSTRUCT;
  774. typedef OFSTRUCT NEAR* NPOFSTRUCT;
  775. typedef OFSTRUCT FAR* LPOFSTRUCT;
  776. #if (WINVER >= 0x0400)
  777. /* OpenFileEx() Structure */
  778. typedef struct tagOFSTRUCTEX
  779. {
  780. WORD nBytes;
  781. BYTE fFixedDisk;
  782. UINT nErrCode;
  783. BYTE reserved[4];
  784. char szPathName[260];
  785. } OFSTRUCTEX;
  786. typedef OFSTRUCTEX* POFSTRUCTEX;
  787. typedef OFSTRUCTEX NEAR* NPOFSTRUCTEX;
  788. typedef OFSTRUCTEX FAR* LPOFSTRUCTEX;
  789. #endif /* WINVER >= 0x0400 */
  790. /* OpenFile() Flags */
  791. #define OF_READ 0x0000
  792. #define OF_WRITE 0x0001
  793. #define OF_READWRITE 0x0002
  794. #define OF_SHARE_COMPAT 0x0000
  795. #define OF_SHARE_EXCLUSIVE 0x0010
  796. #define OF_SHARE_DENY_WRITE 0x0020
  797. #define OF_SHARE_DENY_READ 0x0030
  798. #define OF_SHARE_DENY_NONE 0x0040
  799. #define OF_PARSE 0x0100
  800. #define OF_DELETE 0x0200
  801. #define OF_VERIFY 0x0400 /* Used with OF_REOPEN */
  802. #define OF_SEARCH 0x0400 /* Used without OF_REOPEN */
  803. #define OF_CANCEL 0x0800
  804. #define OF_CREATE 0x1000
  805. #define OF_PROMPT 0x2000
  806. #define OF_EXIST 0x4000
  807. #define OF_REOPEN 0x8000
  808. HFILE WINAPI OpenFile(LPCSTR, OFSTRUCT FAR*, UINT);
  809. #if (WINVER >= 0x0400)
  810. HFILE WINAPI OpenFileEx(LPCSTR, OFSTRUCTEX FAR*, UINT);
  811. #endif /* WINVER >= 0x0400 */
  812. #endif /* NOOPENFILE */
  813. /* _lopen() flags */
  814. #define READ 0
  815. #define WRITE 1
  816. #define READ_WRITE 2
  817. HFILE WINAPI _lopen(LPCSTR, int);
  818. HFILE WINAPI _lcreat(LPCSTR, int);
  819. HFILE WINAPI _lclose(HFILE);
  820. LONG WINAPI _llseek(HFILE, LONG, int);
  821. /* _llseek origin values */
  822. #define SEEK_SET 0
  823. #define SEEK_CUR 1
  824. #define SEEK_END 2
  825. UINT WINAPI _lread(HFILE, void _huge*, UINT);
  826. UINT WINAPI _lwrite(HFILE, const void _huge*, UINT);
  827. #if (WINVER >= 0x030a)
  828. long WINAPI _hread(HFILE, void _huge*, long);
  829. long WINAPI _hwrite(HFILE, const void _huge*, long);
  830. #endif /* WINVER >= 0x030a */
  831. UINT WINAPI DeletePathname(LPCSTR); /* ;Internal */
  832. /* ;Internal */
  833. #endif /* NOLFILEIO */
  834. #if (WINVER >= 0x0400)
  835. DWORD WINAPI GetCurrentDirectory(DWORD, LPSTR);
  836. BOOL WINAPI SetCurrentDirectory(LPCSTR);
  837. #define MAX_PATH 260
  838. #define _FILETIME_
  839. typedef struct _FILETIME {
  840. DWORD dwLowDateTime;
  841. DWORD dwHighDateTime;
  842. } FILETIME, NEAR *PFILETIME, FAR *LPFILETIME;
  843. typedef struct _WIN32_FIND_DATA {
  844. DWORD dwFileAttributes;
  845. FILETIME ftCreationTime;
  846. FILETIME ftLastAccessTime;
  847. FILETIME ftLastWriteTime;
  848. DWORD nFileSizeHigh;
  849. DWORD nFileSizeLow;
  850. DWORD dwReserved0;
  851. DWORD dwReserved1;
  852. char cFileName[ MAX_PATH ];
  853. char cAlternateFileName[ 14 ];
  854. } WIN32_FIND_DATA, NEAR *PWIN32_FIND_DATA, FAR *LPWIN32_FIND_DATA;
  855. #define FILE_ATTRIBUTE_READONLY 0x00000001
  856. #define FILE_ATTRIBUTE_HIDDEN 0x00000002
  857. #define FILE_ATTRIBUTE_SYSTEM 0x00000004
  858. #define FILE_ATTRIBUTE_DIRECTORY 0x00000010
  859. #define FILE_ATTRIBUTE_ARCHIVE 0x00000020
  860. #define FILE_ATTRIBUTE_NORMAL 0x00000080
  861. #define FILE_ATTRIBUTE_TEMPORARY 0x00000100
  862. #define FILE_ATTRIBUTE_ATOMIC_WRITE 0x00000200
  863. #define FILE_ATTRIBUTE_XACTION_WRITE 0x00000400
  864. DECLARE_HANDLE32(HFINDFILE);
  865. #define INVALID_HFINDFILE ((HFINDFILE)-1)
  866. HFINDFILE WINAPI FindFirstFile(LPCSTR, LPWIN32_FIND_DATA);
  867. BOOL WINAPI FindNextFile(HFINDFILE, LPWIN32_FIND_DATA);
  868. BOOL WINAPI FindClose(HFINDFILE);
  869. DWORD WINAPI GetFileAttributes(LPCSTR);
  870. BOOL WINAPI SetFileAttributes(LPCSTR, DWORD);
  871. BOOL WINAPI GetDiskFreeSpace(LPCSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD);
  872. BOOL WINAPI CreateDirectory(LPCSTR, LPVOID);
  873. BOOL WINAPI RemoveDirectory(LPCSTR);
  874. BOOL WINAPI DeleteFile(LPCSTR);
  875. #endif /* WINVER >= 0x0400 */
  876. /* GetTempFileName() Flags */
  877. #define TF_FORCEDRIVE (BYTE)0x80
  878. int WINAPI GetTempFileName(BYTE, LPCSTR, UINT, LPSTR);
  879. BYTE WINAPI GetTempDrive(char);
  880. /* GetDriveType return values */
  881. #define DRIVE_REMOVABLE 2
  882. #define DRIVE_FIXED 3
  883. #define DRIVE_REMOTE 4
  884. UINT WINAPI GetDriveType(int);
  885. UINT WINAPI SetHandleCount(UINT);
  886. /****** Network support *****************************************************/
  887. UINT WINAPI WNetAddConnection(LPSTR, LPSTR, LPSTR);
  888. UINT WINAPI WNetGetConnection(LPSTR, LPSTR, UINT FAR*);
  889. UINT WINAPI WNetCancelConnection(LPSTR, BOOL);
  890. /* Errors */
  891. #define WN_SUCCESS 0x0000
  892. #define WN_NOT_SUPPORTED 0x0001
  893. #define WN_NET_ERROR 0x0002
  894. #define WN_MORE_DATA 0x0003
  895. #define WN_BAD_POINTER 0x0004
  896. #define WN_BAD_VALUE 0x0005
  897. #define WN_BAD_PASSWORD 0x0006
  898. #define WN_ACCESS_DENIED 0x0007
  899. #define WN_FUNCTION_BUSY 0x0008
  900. #define WN_WINDOWS_ERROR 0x0009
  901. #define WN_BAD_USER 0x000A
  902. #define WN_OUT_OF_MEMORY 0x000B
  903. #define WN_CANCEL 0x000C
  904. #define WN_CONTINUE 0x000D
  905. /* Connection errors */
  906. #define WN_NOT_CONNECTED 0x0030
  907. #define WN_OPEN_FILES 0x0031
  908. #define WN_BAD_NETNAME 0x0032
  909. #define WN_BAD_LOCALNAME 0x0033
  910. #define WN_ALREADY_CONNECTED 0x0034
  911. #define WN_DEVICE_ERROR 0x0035
  912. #define WN_CONNECTION_CLOSED 0x0036
  913. /****** Resource Management *************************************************/
  914. DECLARE_HANDLE(HRSRC);
  915. HRSRC WINAPI FindResource(HINSTANCE, LPCSTR, LPCSTR);
  916. HGLOBAL WINAPI LoadResource(HINSTANCE, HRSRC);
  917. BOOL WINAPI FreeResource(HGLOBAL);
  918. #ifdef STRICT
  919. void FAR* WINAPI LockResource(HGLOBAL);
  920. #else
  921. char FAR* WINAPI LockResource(HGLOBAL);
  922. #endif
  923. #define UnlockResource(h) GlobalUnlock(h)
  924. DWORD WINAPI SizeofResource(HINSTANCE, HRSRC);
  925. int WINAPI AccessResource(HINSTANCE, HRSRC);
  926. HGLOBAL WINAPI AllocResource(HINSTANCE, HRSRC, DWORD);
  927. #ifdef STRICT
  928. typedef HGLOBAL (CALLBACK* RSRCHDLRPROC)(HGLOBAL, HINSTANCE, HRSRC);
  929. #else
  930. typedef FARPROC RSRCHDLRPROC;
  931. #endif
  932. RSRCHDLRPROC WINAPI SetResourceHandler(HINSTANCE, LPCSTR, RSRCHDLRPROC);
  933. #define MAKEINTRESOURCE(i) ((LPCSTR)MAKELP(0, (i)))
  934. #ifndef NORESOURCE
  935. /* Predefined Resource Types */
  936. #define RT_CURSOR MAKEINTRESOURCE(1)
  937. #define RT_BITMAP MAKEINTRESOURCE(2)
  938. #define RT_ICON MAKEINTRESOURCE(3)
  939. #define RT_MENU MAKEINTRESOURCE(4)
  940. #define RT_DIALOG MAKEINTRESOURCE(5)
  941. #define RT_STRING MAKEINTRESOURCE(6)
  942. #define RT_FONTDIR MAKEINTRESOURCE(7)
  943. #define RT_FONT MAKEINTRESOURCE(8)
  944. #define RT_ACCELERATOR MAKEINTRESOURCE(9)
  945. #define RT_RCDATA MAKEINTRESOURCE(10)
  946. #define RT_MESSAGETABLE MAKEINTRESOURCE(11) // reserved: NT ;Internal
  947. #define RT_GROUP_CURSOR MAKEINTRESOURCE(12)
  948. #define RT_MENUEX MAKEINTRESOURCE(13) // RT_MENU subtype ;Internal
  949. #define RT_GROUP_ICON MAKEINTRESOURCE(14)
  950. #define RT_NAMETABLE MAKEINTRESOURCE(15) // removed in 3.1 ;Internal
  951. #define RT_VERSION MAKEINTRESOURCE(16) // reserved: NT ;Internal
  952. #define RT_DLGINCLUDE MAKEINTRESOURCE(17) // reserved: NT ;Internal
  953. #define RT_DIALOGEX MAKEINTRESOURCE(18) // RT_DIALOG subtype ;Internal
  954. #define RT_PLUGPLAY MAKEINTRESOURCE(19)
  955. #define RT_VXD MAKEINTRESOURCE(20)
  956. #define RT_LAST MAKEINTRESOURCE(20) // ;Internal
  957. #define RT_AFXFIRST MAKEINTRESOURCE(0xF0) // reserved: AFX ;Internal
  958. #define RT_AFXLAST MAKEINTRESOURCE(0xFF) // reserved: AFX ;Internal
  959. #endif /* NORESOURCE */
  960. #ifdef OEMRESOURCE
  961. /* OEM Resource Ordinal Numbers */
  962. #define OBM_CLOSE 32754
  963. #define OBM_UPARROW 32753
  964. #define OBM_DNARROW 32752
  965. #define OBM_RGARROW 32751
  966. #define OBM_LFARROW 32750
  967. #define OBM_REDUCE 32749
  968. #define OBM_ZOOM 32748
  969. #define OBM_RESTORE 32747
  970. #define OBM_REDUCED 32746
  971. #define OBM_ZOOMD 32745
  972. #define OBM_RESTORED 32744
  973. #define OBM_UPARROWD 32743
  974. #define OBM_DNARROWD 32742
  975. #define OBM_RGARROWD 32741
  976. #define OBM_LFARROWD 32740
  977. #define OBM_MNARROW 32739
  978. #define OBM_COMBO 32738
  979. #if (WINVER >= 0x030a)
  980. #define OBM_UPARROWI 32737
  981. #define OBM_DNARROWI 32736
  982. #define OBM_RGARROWI 32735
  983. #define OBM_LFARROWI 32734
  984. #endif /* WINVER >= 0x030a */
  985. #define OBM_OLD_CLOSE 32767
  986. #define OBM_SIZE 32766
  987. #define OBM_OLD_UPARROW 32765
  988. #define OBM_OLD_DNARROW 32764
  989. #define OBM_OLD_RGARROW 32763
  990. #define OBM_OLD_LFARROW 32762
  991. #define OBM_BTSIZE 32761
  992. #define OBM_CHECK 32760
  993. #define OBM_CHECKBOXES 32759
  994. #define OBM_BTNCORNERS 32758
  995. #define OBM_OLD_REDUCE 32757
  996. #define OBM_OLD_ZOOM 32756
  997. #define OBM_OLD_RESTORE 32755
  998. #if (WINVER >= 0x040A)
  999. #define OBM_RDRVERT 32559
  1000. #define OBM_RDRHORZ 32660
  1001. #define OBM_RDR2DIM 32661
  1002. #endif /* WINVER >= 0x040A */
  1003. #define OCR_NORMAL 32512
  1004. #define OCR_IBEAM 32513
  1005. #define OCR_WAIT 32514
  1006. #define OCR_CROSS 32515
  1007. #define OCR_UP 32516
  1008. #define OCR_NWPEN 32631 // ;Internal 4.0
  1009. #define OCR_SIZE 32640 /* OBSOLETE; use OCR_SIZEALL */
  1010. #define OCR_ICON 32641 /* OBSOLETE; use OCR_NORMAL */
  1011. #define OCR_SIZENWSE 32642
  1012. #define OCR_SIZENESW 32643
  1013. #define OCR_SIZEWE 32644
  1014. #define OCR_SIZENS 32645
  1015. #define OCR_SIZEALL 32646
  1016. #define OCR_ICOCUR 32647 /* OBSOLETE; use OIC_WINLOGO */
  1017. #define OCR_NO 32648
  1018. #define OCR_APPSTARTING 32650 // ;Internal NT 4.0
  1019. #if (WINVER >= 0x0400)
  1020. #define OCR_HELP 32651 // ;Internal 4.0
  1021. #endif /* WINVER >= 0x400 */
  1022. #if (WINVER >= 0x040A)
  1023. #define OCR_RDRVERT 32652
  1024. #define OCR_RDRHORZ 32653
  1025. #define OCR_RDR2DIM 32654
  1026. #define OCR_RDRNORTH 32655
  1027. #define OCR_RDRSOUTH 32656
  1028. #define OCR_RDRWEST 32657
  1029. #define OCR_RDREAST 32658
  1030. #define OCR_RDRNORTHWEST 32659
  1031. #define OCR_RDRNORTHEAST 32660
  1032. #define OCR_RDRSOUTHWEST 32661
  1033. #define OCR_RDRSOUTHEAST 32662
  1034. #endif /* WINVER >= 0x040A */
  1035. /* Default IDs to get original image from User */ // ;Internal
  1036. #define OCR_CONFIGURABLE_FIRST 100 // ;Internal
  1037. #define OCR_ARROW_DEFAULT 100 // ;Internal
  1038. #define OCR_IBEAM_DEFAULT 101 // ;Internal
  1039. #define OCR_WAIT_DEFAULT 102 // ;Internal
  1040. #define OCR_CROSS_DEFAULT 103 // ;Internal
  1041. #define OCR_UPARROW_DEFAULT 104 // ;Internal
  1042. #define OCR_SIZENWSE_DEFAULT 105 // ;Internal
  1043. #define OCR_SIZENESW_DEFAULT 106 // ;Internal
  1044. #define OCR_SIZEWE_DEFAULT 107 // ;Internal
  1045. #define OCR_SIZENS_DEFAULT 108 // ;Internal
  1046. #define OCR_SIZEALL_DEFAULT 109 // ;Internal
  1047. #define OCR_NO_DEFAULT 110 // ;Internal
  1048. #define OCR_APPSTARTING_DEFAULT 111 // ;Internal
  1049. #define OCR_HELP_DEFAULT 112 // ;Internal
  1050. #define OCR_NWPEN_DEFAULT 113 // ;Internal
  1051. #define OCR_ICON_DEFAULT 114 // ;Internal
  1052. #define OCR_CONFIGURABLE_LAST OCR_ICON_DEFAULT // ;Internal
  1053. #define COCR_CONFIGURABLE (OCR_CONFIGURABLE_LAST-OCR_CONFIGURABLE_FIRST+1) // ;Internal
  1054. #define OIC_SAMPLE 32512
  1055. #define OIC_ERROR 32513
  1056. #define OIC_QUES 32514
  1057. #define OIC_WARNING 32515
  1058. #define OIC_INFORMATION 32516
  1059. #define OIC_WINLOGO 32517 // ;Internal NT
  1060. #define OIC_HAND OIC_ERROR
  1061. #define OIC_BANG OIC_WARNING
  1062. #define OIC_NOTE OIC_INFORMATION
  1063. /* Default IDs to get original image from User */ // ;Internal
  1064. #define OIC_CONFIGURABLE_FIRST 100 // ;Internal
  1065. #define OIC_APPLICATION_DEFAULT 100 // ;Internal
  1066. #define OIC_WARNING_DEFAULT 101 // ;Internal
  1067. #define OIC_QUESTION_DEFAULT 102 // ;Internal
  1068. #define OIC_ERROR_DEFAULT 103 // ;Internal
  1069. #define OIC_INFORMATION_DEFAULT 104 // ;Internal
  1070. #define OIC_WINLOGO_DEFAULT 105 // ;Internal
  1071. #define OIC_CONFIGURABLE_LAST OIC_WINLOGO_DEFAULT // ;Internal
  1072. #define COIC_CONFIGURABLE (OIC_CONFIGURABLE_LAST-OIC_CONFIGURABLE_FIRST+1) // ;Internal
  1073. #endif /* OEMRESOURCE */
  1074. /****** Atom Management *****************************************************/
  1075. #define MAKEINTATOM(i) ((LPCSTR)MAKELP(0, (i)))
  1076. #ifndef NOATOM
  1077. BOOL WINAPI InitAtomTable(int);
  1078. ATOM WINAPI AddAtom(LPCSTR);
  1079. ATOM WINAPI DeleteAtom(ATOM);
  1080. ATOM WINAPI FindAtom(LPCSTR);
  1081. UINT WINAPI GetAtomName(ATOM, LPSTR, int);
  1082. ATOM WINAPI GlobalAddAtom(LPCSTR);
  1083. ATOM WINAPI GlobalDeleteAtom(ATOM);
  1084. ATOM WINAPI GlobalFindAtom(LPCSTR);
  1085. UINT WINAPI GlobalGetAtomName(ATOM, LPSTR, int);
  1086. HLOCAL WINAPI GetAtomHandle(ATOM);
  1087. #endif /* NOATOM */
  1088. /****** WIN.INI Support *****************************************************/
  1089. /* User Profile Routines */
  1090. UINT WINAPI GetProfileInt(LPCSTR, LPCSTR, int);
  1091. int WINAPI GetProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int);
  1092. BOOL WINAPI WriteProfileString(LPCSTR, LPCSTR, LPCSTR);
  1093. UINT WINAPI GetPrivateProfileInt(LPCSTR, LPCSTR, int, LPCSTR);
  1094. int WINAPI GetPrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int, LPCSTR);
  1095. BOOL WINAPI WritePrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPCSTR);
  1096. #if (WINVER >= 0x0400)
  1097. BOOL WINAPI GetPrivateProfileStruct(LPCSTR, LPCSTR, LPVOID, UINT, LPCSTR);
  1098. BOOL WINAPI WritePrivateProfileStruct(LPCSTR, LPCSTR, LPVOID, UINT, LPCSTR);
  1099. UINT WINAPI GetProfileSectionNames(LPSTR, UINT);
  1100. UINT WINAPI GetPrivateProfileSectionNames(LPSTR, UINT, LPCSTR);
  1101. int WINAPI GetPrivateProfileSection(LPCSTR, LPSTR, UINT, LPCSTR);
  1102. int WINAPI GetProfileSection(LPCSTR, LPSTR, UINT);
  1103. BOOL WINAPI WritePrivateProfileSection(LPCSTR, LPCSTR, LPCSTR);
  1104. BOOL WINAPI WriteProfileSection(LPCSTR, LPCSTR);
  1105. #endif /* WINVER >= 0x0400 */
  1106. /****** Registration Database Support ***************************************/
  1107. /* return codes from Registration functions */
  1108. /* Retained for win 3.x compatibility and not needed 4.0 onwards */
  1109. /* For 4.0 onwards you should be including winerror.h */
  1110. #if (WINVER < 0x0400)
  1111. #define ERROR_SUCCESS 0L
  1112. #define ERROR_BADDB 1L
  1113. #define ERROR_BADKEY 2L
  1114. #define ERROR_CANTOPEN 3L
  1115. #define ERROR_CANTREAD 4L
  1116. #define ERROR_CANTWRITE 5L
  1117. #define ERROR_INSUFFICIENT_MEMORY 6L
  1118. #define ERROR_INVALID_PARAMETER 7L
  1119. #define ERROR_ACCESS_DENIED 8L
  1120. #endif /* WINVER < 0x400 */
  1121. #define REG_SZ 0x0001
  1122. #if (WINVER >= 0x0400)
  1123. #define REG_BINARY 0x0003
  1124. #define REG_DWORD 0x0004
  1125. #endif
  1126. typedef DWORD HKEY;
  1127. typedef HKEY FAR* LPHKEY;
  1128. #if (WINVER < 0x0400) // Win 3.1 compatibility
  1129. #define HKEY_CLASSES_ROOT (( HKEY) 0x1)
  1130. #else // Win 4 upwards
  1131. #define HKEY_CLASSES_ROOT (( HKEY) 0x80000000)
  1132. #define HKEY_CURRENT_USER (( HKEY) 0x80000001)
  1133. #define HKEY_LOCAL_MACHINE (( HKEY) 0x80000002)
  1134. #define HKEY_USERS (( HKEY) 0x80000003)
  1135. #define HKEY_PERFORMANCE_DATA (( HKEY) 0x80000004)
  1136. #define HKEY_CURRENT_CONFIG (( HKEY) 0x80000005)
  1137. #define HKEY_DYN_DATA (( HKEY) 0x80000006)
  1138. #define HKEY_PREDEF_KEYS 7
  1139. #endif
  1140. LONG WINAPI RegOpenKey(HKEY, LPCSTR, LPHKEY);
  1141. LONG WINAPI RegCreateKey(HKEY, LPCSTR, LPHKEY);
  1142. LONG WINAPI RegCloseKey(HKEY);
  1143. LONG WINAPI RegDeleteKey(HKEY, LPCSTR);
  1144. LONG WINAPI RegSetValue(HKEY, LPCSTR, DWORD, LPCSTR, DWORD);
  1145. LONG WINAPI RegQueryValue(HKEY, LPCSTR, LPSTR, LONG FAR*);
  1146. LONG WINAPI RegEnumKey(HKEY, DWORD, LPSTR, DWORD);
  1147. #if (WINVER >= 0x0400)
  1148. LONG WINAPI RegDeleteValue(HKEY, LPCSTR);
  1149. LONG WINAPI RegEnumValue(HKEY, DWORD, LPCSTR,
  1150. LONG FAR *, DWORD, LONG FAR *, LPBYTE,
  1151. LONG FAR *);
  1152. LONG WINAPI RegQueryValueEx(HKEY, LPCSTR, LONG FAR *, LONG FAR *,
  1153. LPBYTE, LONG FAR *);
  1154. LONG WINAPI RegSetValueEx(HKEY, LPCSTR, DWORD, DWORD, LPBYTE, DWORD);
  1155. LONG WINAPI RegFlushKey(HKEY);
  1156. LONG WINAPI RegSaveKey(HKEY, LPCSTR,LPVOID);
  1157. LONG WINAPI RegLoadKey(HKEY, LPCSTR,LPCSTR);
  1158. LONG WINAPI RegUnLoadKey(HKEY, LPCSTR);
  1159. #endif // WINVER >= 0x0400
  1160. /****** International & Char Translation Support ****************************/
  1161. // ;Internal
  1162. // BOOL WINAPI CharToOem(LPCSTR, LPSTR); /* NT */ ;Internal
  1163. // BOOL WINAPI OemToChar(LPCSTR, LPSTR); /* NT */ ;Internal
  1164. // ;Internal
  1165. void WINAPI AnsiToOem(const char _huge*, char _huge*);
  1166. void WINAPI OemToAnsi(const char _huge*, char _huge*);
  1167. // ;Internal
  1168. // BOOL WINAPI CharToOemBuff(LPCSTR, LPSTR, UINT); /* NT */ ;Internal
  1169. // BOOL WINAPI OemToCharBuff(LPCSTR, LPSTR, DWORD); /* NT */ ;Internal
  1170. // ;Internal
  1171. void WINAPI AnsiToOemBuff(LPCSTR, LPSTR, UINT);
  1172. void WINAPI OemToAnsiBuff(LPCSTR, LPSTR, UINT);
  1173. // ;Internal
  1174. // LPSTR WINAPI CharNext(LPCSTR); /* NT */ ;Internal
  1175. // LPSTR WINAPI CharPrev(LPCSTR, LPCSTR); /* NT */ ;Internal
  1176. // ;Internal
  1177. LPSTR WINAPI AnsiNext(LPCSTR);
  1178. LPSTR WINAPI AnsiPrev(LPCSTR, LPCSTR);
  1179. // ;Internal
  1180. // LPSTR WINAPI CharUpper(LPSTR); /* NT */ ;Internal
  1181. // LPSTR WINAPI CharLower(LPSTR); /* NT */ ;Internal
  1182. // ;Internal
  1183. LPSTR WINAPI AnsiUpper(LPSTR);
  1184. LPSTR WINAPI AnsiLower(LPSTR);
  1185. // ;Internal
  1186. // LPSTR WINAPI CharUpperBuff(LPSTR, WORD); /* NT */ ;Internal
  1187. // LPSTR WINAPI CharLowerBuff(LPSTR, WORD); /* NT */ ;Internal
  1188. // ;Internal
  1189. UINT WINAPI AnsiUpperBuff(LPSTR, UINT);
  1190. UINT WINAPI AnsiLowerBuff(LPSTR, UINT);
  1191. /* Language driver entry point ordinal */ // ;Internal
  1192. #define ORD_LANGDRIVER 1 // ;Internal
  1193. // ;Internal
  1194. #ifndef NOLANGUAGE
  1195. BOOL WINAPI IsCharAlpha(char);
  1196. BOOL WINAPI IsCharAlphaNumeric(char);
  1197. BOOL WINAPI IsCharUpper(char);
  1198. BOOL WINAPI IsCharLower(char);
  1199. #endif
  1200. #ifndef NOLSTRING
  1201. int WINAPI lstrcmp(LPCSTR, LPCSTR);
  1202. int WINAPI lstrcmpi(LPCSTR, LPCSTR);
  1203. LPSTR WINAPI lstrcpy(LPSTR, LPCSTR);
  1204. LPSTR WINAPI lstrcat(LPSTR, LPCSTR);
  1205. int WINAPI lstrlen(LPCSTR);
  1206. #if (WINVER >= 0x030a)
  1207. LPSTR WINAPI lstrcpyn(LPSTR, LPCSTR, int);
  1208. void WINAPI hmemcpy(void _huge*, const void _huge*, DWORD);
  1209. #if (WINVER >= 0x0400)
  1210. LPSTR WINAPI lstrcatn(LPSTR, LPCSTR, int);
  1211. #endif /* WINVER >= 0x0400 */
  1212. #endif /* WINVER >= 0x030a */
  1213. #endif /* NOLSTRING */
  1214. #if (WINVER >= 0x030a)
  1215. #ifndef NODBCS
  1216. BOOL WINAPI IsDBCSLeadByte(BYTE);
  1217. #endif /* NODBCS */
  1218. #endif /* WINVER >= 0x030a */
  1219. int WINAPI LoadString(HINSTANCE, UINT, LPSTR, int);
  1220. #if (WINVER >= 0x0400) /* ;Internal NT */
  1221. #define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100 /* ;Internal NT */
  1222. #define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200 /* ;Internal NT */
  1223. #define FORMAT_MESSAGE_FROM_STRING 0x00000400 /* ;Internal NT */
  1224. #define FORMAT_MESSAGE_FROM_HMODULE 0x00000800 /* ;Internal NT */
  1225. #define FORMAT_MESSAGE_FROM_SYSTEM 0x00001000 /* ;Internal NT */
  1226. //#define FORMAT_MESSAGE_ARGUMENT_ARRAY 0x00002000 /* ;Internal */
  1227. #define FORMAT_MESSAGE_MAX_WIDTH_MASK 0x000000FF /* ;Internal NT */
  1228. #define FORMAT_MESSAGE_VALID 0x00003FFF /* ;Internal */
  1229. /* ;Internal NT */
  1230. UINT FAR PASCAL FormatMessage(DWORD, LPVOID, UINT, UINT, LPSTR, UINT, LPDWORD); /* ;Internal NT */
  1231. #endif /* WINVER >= 0x0400 */ /* ;Internal NT */
  1232. /****** Keyboard Driver Functions *******************************************/
  1233. #ifndef NOKEYBOARDINFO
  1234. DWORD WINAPI OemKeyScan(UINT);
  1235. UINT WINAPI VkKeyScan(UINT);
  1236. UINT WINAPI VkKeyScanEx(UINT,HKL);
  1237. int WINAPI GetKeyboardType(int);
  1238. UINT WINAPI MapVirtualKey(UINT, UINT);
  1239. UINT WINAPI MapVirtualKeyEx(UINT,UINT,HKL);
  1240. int WINAPI GetKBCodePage(void);
  1241. int WINAPI GetKeyNameText(LONG, LPSTR, int);
  1242. int WINAPI ToAscii(UINT wVirtKey, UINT wScanCode, BYTE FAR* lpKeyState, DWORD FAR* lpChar, UINT wFlags);
  1243. int WINAPI ToAsciiEx(UINT wVirtKey, UINT wScanCode, BYTE FAR* lpKeyState, DWORD FAR* lpChar, UINT wFlags,HKL hkl);
  1244. #endif
  1245. #endif /* NOKERNEL */
  1246. /****** GDI typedefs, structures, and functions *****************************/
  1247. DECLARE_HANDLE(HDC);
  1248. #ifndef NOGDI
  1249. #ifdef STRICT
  1250. typedef const void NEAR* HGDIOBJ;
  1251. #else
  1252. DECLARE_HANDLE(HGDIOBJ);
  1253. #endif
  1254. #endif /* NOGDI */
  1255. DECLARE_HANDLE(HBITMAP);
  1256. DECLARE_HANDLE(HPEN);
  1257. DECLARE_HANDLE(HBRUSH);
  1258. DECLARE_HANDLE(HRGN);
  1259. DECLARE_HANDLE(HPALETTE);
  1260. DECLARE_HANDLE(HFONT);
  1261. typedef struct tagRECT
  1262. {
  1263. int left;
  1264. int top;
  1265. int right;
  1266. int bottom;
  1267. } RECT;
  1268. typedef RECT* PRECT;
  1269. typedef RECT NEAR* NPRECT;
  1270. typedef RECT FAR* LPRECT;
  1271. typedef const RECT FAR * LPCRECT;
  1272. typedef struct tagPOINT
  1273. {
  1274. int x;
  1275. int y;
  1276. } POINT;
  1277. typedef POINT* PPOINT;
  1278. typedef POINT NEAR* NPPOINT;
  1279. typedef POINT FAR* LPPOINT;
  1280. typedef const POINT FAR * LPCPOINT;
  1281. #if (WINVER >= 0x030a)
  1282. typedef struct tagSIZE
  1283. {
  1284. int cx;
  1285. int cy;
  1286. } SIZE;
  1287. typedef SIZE* PSIZE;
  1288. typedef SIZE NEAR* NPSIZE;
  1289. typedef SIZE FAR* LPSIZE;
  1290. #endif /* WINVER >= 0x030a */
  1291. #if (WINVER >= 0x0400)
  1292. /* Common structures for 4.X/Win32 GDI APIs */
  1293. typedef struct tagPOINTS
  1294. {
  1295. SHORT x;
  1296. SHORT y;
  1297. } POINTS;
  1298. typedef POINTS* PPOINTS;
  1299. typedef POINTS NEAR* NPPOINTS;
  1300. typedef POINTS FAR* LPPOINTS;
  1301. typedef const POINTS FAR* LPCPOINTS;
  1302. typedef struct tagPOINTL
  1303. {
  1304. LONG x;
  1305. LONG y;
  1306. } POINTL;
  1307. typedef POINTL* PPOINTL;
  1308. typedef POINTL NEAR* NPPOINTL;
  1309. typedef POINTL FAR* LPPOINTL;
  1310. typedef const POINTL FAR* LPCPOINTL;
  1311. typedef struct tagSIZEL
  1312. {
  1313. LONG cx;
  1314. LONG cy;
  1315. } SIZEL;
  1316. typedef SIZEL* PSIZEL;
  1317. typedef SIZEL NEAR* NPSIZEL;
  1318. typedef SIZEL FAR* LPSIZEL;
  1319. typedef const SIZEL FAR* LPCSIZEL;
  1320. typedef struct tagRECTL
  1321. {
  1322. LONG left;
  1323. LONG top;
  1324. LONG right;
  1325. LONG bottom;
  1326. } RECTL;
  1327. typedef RECTL* PRECTL;
  1328. typedef RECTL NEAR* NPRECTL;
  1329. typedef RECTL FAR* LPRECTL;
  1330. typedef const RECTL FAR* LPCRECTL;
  1331. /* ;Internal */
  1332. typedef struct tagXFORM /* SDK transform of IEEE floats. */ /* ;Internal */
  1333. { /* ;Internal */
  1334. float eM11; /* ;Internal */
  1335. float eM12; /* ;Internal */
  1336. float eM21; /* ;Internal */
  1337. float eM22; /* ;Internal */
  1338. float eDx; /* ;Internal */
  1339. float eDy; /* ;Internal */
  1340. /* ;Internal */
  1341. } XFORM; /* ;Internal */
  1342. typedef XFORM* PXFORM; /* ;Internal */
  1343. typedef XFORM NEAR* NPXFORM; /* ;Internal */
  1344. typedef XFORM FAR* LPXFORM; /* ;Internal */
  1345. typedef const XFORM FAR* LPCXFORM; /* ;Internal */
  1346. /* ;Internal */
  1347. #endif /* WINVER >= 0x0400 */
  1348. #define MAKEPOINT(l) (*((POINT FAR*)&(l)))
  1349. #ifndef NOGDI
  1350. /****** DC Management *******************************************************/
  1351. HDC WINAPI CreateDC(LPCSTR, LPCSTR, LPCSTR, const void FAR*);
  1352. HDC WINAPI CreateIC(LPCSTR, LPCSTR, LPCSTR, const void FAR*);
  1353. HDC WINAPI CreateCompatibleDC(HDC);
  1354. BOOL WINAPI DeleteDC(HDC);
  1355. DWORD WINAPI GetDCOrg(HDC);
  1356. DWORD WINAPI SetDCOrg(HDC, int, int); /* ;Internal */
  1357. int WINAPI SaveDC(HDC);
  1358. BOOL WINAPI RestoreDC(HDC, int);
  1359. int WINAPI SetEnvironment(LPCSTR, const void FAR*, UINT);
  1360. int WINAPI GetEnvironment(LPCSTR, void FAR*, UINT);
  1361. int WINAPI MulDiv(int, int, int);
  1362. #if (WINVER >= 0x030a)
  1363. /* Drawing bounds accumulation APIs */
  1364. UINT WINAPI SetBoundsRect(HDC hDC, LPCRECT lprcBounds, UINT flags);
  1365. UINT WINAPI GetBoundsRect(HDC hDC, LPRECT lprcBounds, UINT flags);
  1366. #define DCB_RESET 0x0001
  1367. #define DCB_ACCUMULATE 0x0002
  1368. #define DCB_DIRTY DCB_ACCUMULATE
  1369. #define DCB_SET (DCB_RESET | DCB_ACCUMULATE)
  1370. #define DCB_ENABLE 0x0004
  1371. #define DCB_DISABLE 0x0008
  1372. #define DCB_WINDOWMGR 0x8000 /* ;Internal */
  1373. /* ;Internal */
  1374. /* Internal SelectBitmap stuff */ /* ;Internal */
  1375. /*HBITMAP WINAPI SelectBitmap(HDC hDC, HBITMAP hbm);*/ /* ;Internal */
  1376. #endif /* WINVER >= 0x030a */
  1377. /****** Device Capabilities *************************************************/
  1378. int WINAPI GetDeviceCaps(HDC, int);
  1379. /* Device Parameters for GetDeviceCaps() */
  1380. #define DRIVERVERSION 0
  1381. #define TECHNOLOGY 2
  1382. #define HORZSIZE 4
  1383. #define VERTSIZE 6
  1384. #define HORZRES 8
  1385. #define VERTRES 10
  1386. #define BITSPIXEL 12
  1387. #define PLANES 14
  1388. #define NUMBRUSHES 16
  1389. #define NUMPENS 18
  1390. #define NUMMARKERS 20
  1391. #define NUMFONTS 22
  1392. #define NUMCOLORS 24
  1393. #define PDEVICESIZE 26
  1394. #define CURVECAPS 28
  1395. #define LINECAPS 30
  1396. #define POLYGONALCAPS 32
  1397. #define TEXTCAPS 34
  1398. #define CLIPCAPS 36
  1399. #define RASTERCAPS 38
  1400. #define ASPECTX 40
  1401. #define ASPECTY 42
  1402. #define ASPECTXY 44
  1403. #define LOGPIXELSX 88
  1404. #define LOGPIXELSY 90
  1405. #define CAPS1 94 // ;Internal
  1406. #define SIZEPALETTE 104
  1407. #define NUMRESERVED 106
  1408. #define COLORRES 108
  1409. #ifndef NOGDICAPMASKS
  1410. /* GetDeviceCaps() return value masks */
  1411. /* TECHNOLOGY */
  1412. #define DT_PLOTTER 0
  1413. #define DT_RASDISPLAY 1
  1414. #define DT_RASPRINTER 2
  1415. #define DT_RASCAMERA 3
  1416. #define DT_CHARSTREAM 4
  1417. #define DT_METAFILE 5
  1418. #define DT_DISPFILE 6
  1419. /* CURVECAPS */
  1420. #define CC_NONE 0x0000
  1421. #define CC_CIRCLES 0x0001
  1422. #define CC_PIE 0x0002
  1423. #define CC_CHORD 0x0004
  1424. #define CC_ELLIPSES 0x0008
  1425. #define CC_WIDE 0x0010
  1426. #define CC_STYLED 0x0020
  1427. #define CC_WIDESTYLED 0x0040
  1428. #define CC_INTERIORS 0x0080
  1429. #define CC_ROUNDRECT 0x0100
  1430. #define CC_POLYBEZIER 0x0200 /* ;Internal */
  1431. /* LINECAPS */
  1432. #define LC_NONE 0x0000
  1433. #define LC_POLYLINE 0x0002
  1434. #define LC_MARKER 0x0004
  1435. #define LC_POLYMARKER 0x0008
  1436. #define LC_WIDE 0x0010
  1437. #define LC_STYLED 0x0020
  1438. #define LC_WIDESTYLED 0x0040
  1439. #define LC_INTERIORS 0x0080
  1440. /* POLYGONALCAPS */
  1441. #define PC_NONE 0x0000
  1442. #define PC_POLYGON 0x0001
  1443. #define PC_RECTANGLE 0x0002
  1444. #define PC_WINDPOLYGON 0x0004
  1445. #define PC_SCANLINE 0x0008
  1446. #define PC_WIDE 0x0010
  1447. #define PC_STYLED 0x0020
  1448. #define PC_WIDESTYLED 0x0040
  1449. #define PC_INTERIORS 0x0080
  1450. #define PC_POLYPOLYGON 0x0100
  1451. #define PC_PATHS 0x0200
  1452. /* TEXTCAPS */
  1453. #define TC_OP_CHARACTER 0x0001
  1454. #define TC_OP_STROKE 0x0002
  1455. #define TC_CP_STROKE 0x0004
  1456. #define TC_CR_90 0x0008
  1457. #define TC_CR_ANY 0x0010
  1458. #define TC_SF_X_YINDEP 0x0020
  1459. #define TC_SA_DOUBLE 0x0040
  1460. #define TC_SA_INTEGER 0x0080
  1461. #define TC_SA_CONTIN 0x0100
  1462. #define TC_EA_DOUBLE 0x0200
  1463. #define TC_IA_ABLE 0x0400
  1464. #define TC_UA_ABLE 0x0800
  1465. #define TC_SO_ABLE 0x1000
  1466. #define TC_RA_ABLE 0x2000
  1467. #define TC_VA_ABLE 0x4000
  1468. #define TC_RESERVED 0x8000
  1469. /* CLIPCAPS */
  1470. #define CP_NONE 0x0000
  1471. #define CP_RECTANGLE 0x0001
  1472. #define CP_REGION 0x0002
  1473. /* RASTERCAPS */
  1474. #define RC_NONE
  1475. #define RC_BITBLT 0x0001
  1476. #define RC_BANDING 0x0002
  1477. #define RC_SCALING 0x0004
  1478. #define RC_BITMAP64 0x0008
  1479. #define RC_GDI20_OUTPUT 0x0010
  1480. #define RC_GDI20_STATE 0x0020
  1481. #define RC_SAVEBITMAP 0x0040
  1482. #define RC_DI_BITMAP 0x0080
  1483. #define RC_PALETTE 0x0100
  1484. #define RC_DIBTODEV 0x0200
  1485. #define RC_BIGFONT 0x0400
  1486. #define RC_STRETCHBLT 0x0800
  1487. #define RC_FLOODFILL 0x1000
  1488. #define RC_STRETCHDIB 0x2000
  1489. #define RC_OP_DX_OUTPUT 0x4000
  1490. #define RC_DEVBITS 0x8000
  1491. /* CAPS1 */ // ;Internal
  1492. #define C1_TRANSPARENT 0x0001 // ;Internal
  1493. #define TC_TT_ABLE 0x0002 // ;Internal
  1494. #define C1_TT_CR_ANY 0x0004 // ;Internal
  1495. #define C1_EMF_COMPLIANT 0x0008 // ;Internal
  1496. #define C1_DIBENGINE 0x0010 // ;Internal
  1497. #define C1_GAMMA_RAMP 0x0020 // ;Internal
  1498. #define C1_DIC 0x0040 // ;Internal
  1499. #define C1_REINIT_ABLE 0x0080 // ;Internal
  1500. #define C1_GLYPH_INDEX 0x0100 // ;Internal
  1501. #define C1_BIT_PACKED 0x0200 // ;Internal
  1502. #define C1_BYTE_PACKED 0x0400 // ;Internal
  1503. #define C1_COLORCURSOR 0x0800 // ;Internal
  1504. #define C1_CMYK_ABLE 0x1000 // ;Internal
  1505. #define C1_SLOW_CARD 0x2000 // ;Internal
  1506. #endif /* NOGDICAPMASKS */
  1507. /****** Coordinate transformation support ***********************************/
  1508. int WINAPI SetMapMode(HDC, int);
  1509. int WINAPI GetMapMode(HDC);
  1510. /* Map modes */
  1511. #define MM_TEXT 1
  1512. #define MM_LOMETRIC 2
  1513. #define MM_HIMETRIC 3
  1514. #define MM_LOENGLISH 4
  1515. #define MM_HIENGLISH 5
  1516. #define MM_TWIPS 6
  1517. #define MM_ISOTROPIC 7
  1518. #define MM_ANISOTROPIC 8
  1519. DWORD WINAPI SetWindowOrg(HDC, int, int);
  1520. DWORD WINAPI GetWindowOrg(HDC);
  1521. DWORD WINAPI SetWindowExt(HDC, int, int);
  1522. DWORD WINAPI GetWindowExt(HDC);
  1523. DWORD WINAPI OffsetWindowOrg(HDC, int, int);
  1524. DWORD WINAPI ScaleWindowExt(HDC, int, int, int, int);
  1525. DWORD WINAPI SetViewportOrg(HDC, int, int);
  1526. DWORD WINAPI GetViewportOrg(HDC);
  1527. DWORD WINAPI SetViewportExt(HDC, int, int);
  1528. DWORD WINAPI GetViewportExt(HDC);
  1529. DWORD WINAPI OffsetViewportOrg(HDC, int, int);
  1530. DWORD WINAPI ScaleViewportExt(HDC, int, int, int, int);
  1531. #if (WINVER >= 0x030a)
  1532. BOOL WINAPI SetWindowOrgEx(HDC, int, int, POINT FAR*);
  1533. BOOL WINAPI GetWindowOrgEx(HDC, POINT FAR*);
  1534. BOOL WINAPI SetWindowExtEx(HDC, int, int, SIZE FAR*);
  1535. BOOL WINAPI GetWindowExtEx(HDC, SIZE FAR*);
  1536. BOOL WINAPI OffsetWindowOrgEx(HDC, int, int, POINT FAR*);
  1537. BOOL WINAPI ScaleWindowExtEx(HDC, int, int, int, int, SIZE FAR*);
  1538. BOOL WINAPI SetViewportExtEx(HDC, int, int, SIZE FAR*);
  1539. BOOL WINAPI GetViewportExtEx(HDC, SIZE FAR*);
  1540. BOOL WINAPI SetViewportOrgEx(HDC, int, int, POINT FAR*);
  1541. BOOL WINAPI GetViewportOrgEx(HDC, POINT FAR*);
  1542. BOOL WINAPI OffsetViewportOrgEx(HDC, int, int, POINT FAR*);
  1543. BOOL WINAPI ScaleViewportExtEx(HDC, int, int, int, int, SIZE FAR*);
  1544. #endif /* WINVER >= 0x030a */
  1545. BOOL WINAPI DPtoLP(HDC, POINT FAR*, int);
  1546. BOOL WINAPI LPtoDP(HDC, POINT FAR*, int);
  1547. int WINAPI SetRelAbs(HDC, int); /* ;Internal */
  1548. int WINAPI GetRelAbs(HDC); /* ;Internal */
  1549. /* ;Internal */
  1550. /* Coordinate Modes */
  1551. #define ABSOLUTE 1
  1552. #define RELATIVE 2
  1553. /****** Color support *******************************************************/
  1554. typedef DWORD COLORREF;
  1555. #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16)))
  1556. #define GetRValue(rgb) ((BYTE)(rgb))
  1557. #define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8))
  1558. #define GetBValue(rgb) ((BYTE)((rgb)>>16))
  1559. COLORREF WINAPI GetNearestColor(HDC, COLORREF);
  1560. #ifndef NOCOLOR
  1561. HBRUSH WINAPI GetSysColorBrush(int);
  1562. COLORREF WINAPI GetSysColor(int);
  1563. #ifdef tagWND // ;Internal
  1564. BOOL WINAPI SetSysColors(int, const int FAR*, const COLORREF FAR*); // ;Internal
  1565. #else // ;Internal
  1566. void WINAPI SetSysColors(int, const int FAR*, const COLORREF FAR*);
  1567. #endif // ;Internal
  1568. #define COLOR_SCROLLBAR 0
  1569. #define COLOR_DESKTOP 1
  1570. #define COLOR_ACTIVECAPTION 2
  1571. #define COLOR_INACTIVECAPTION 3
  1572. #define COLOR_MENU 4
  1573. #define COLOR_WINDOW 5
  1574. #define COLOR_WINDOWFRAME 6
  1575. #define COLOR_MENUTEXT 7
  1576. #define COLOR_WINDOWTEXT 8
  1577. #define COLOR_CAPTIONTEXT 9
  1578. #define COLOR_ACTIVEBORDER 10
  1579. #define COLOR_INACTIVEBORDER 11
  1580. #define COLOR_APPWORKSPACE 12
  1581. #define COLOR_HIGHLIGHT 13
  1582. #define COLOR_HIGHLIGHTTEXT 14
  1583. #define COLOR_3DFACE 15
  1584. #define COLOR_3DSHADOW 16
  1585. #define COLOR_GRAYTEXT 17
  1586. #define COLOR_BTNTEXT 18
  1587. #if (WINVER >= 0x030a)
  1588. #define COLOR_INACTIVECAPTIONTEXT 19
  1589. #define COLOR_3DHILIGHT 20
  1590. #if (WINVER >= 0x0400)
  1591. #define COLOR_3DDKSHADOW 21
  1592. #define COLOR_3DLIGHT 22
  1593. #define COLOR_INFOTEXT 23
  1594. #define COLOR_INFOBK 24
  1595. #if (WINVER >= 0x40A)
  1596. #define COLOR_3DALTFACE 25
  1597. #define COLOR_HOTLIGHT 26
  1598. #define COLOR_GRADIENTACTIVECAPTION 27
  1599. #define COLOR_GRADIENTINACTIVECAPTION 28
  1600. #define COLOR_ENDCOLORS COLOR_GRADIENTINACTIVECAPTION /* ;Internal */
  1601. #else // ;Internal 4.1
  1602. #define COLOR_ENDCOLORS COLOR_INFOBK /* ;Internal */
  1603. #endif // (WINVER >= 0x40A)
  1604. #define COLOR_MAX (COLOR_ENDCOLORS+1) /* ;Internal */
  1605. #endif /* WINVER >= 0x0400 */
  1606. #endif /* WINVER >= 0x030a */
  1607. #define COLOR_BACKGROUND COLOR_DESKTOP
  1608. #define COLOR_BTNFACE COLOR_3DFACE
  1609. #define COLOR_BTNSHADOW COLOR_3DSHADOW
  1610. #define COLOR_BTNHIGHLIGHT COLOR_3DHILIGHT
  1611. HANDLE WINAPI SetSysColorsTemp(COLORREF FAR *, HBRUSH FAR *, UINT); /* ;Internal */
  1612. #endif /* NOCOLOR */
  1613. /****** GDI Object Support **************************************************/
  1614. #ifndef NOGDIOBJ
  1615. HGDIOBJ WINAPI GetStockObject(int);
  1616. BOOL WINAPI IsGDIObject(HGDIOBJ);
  1617. #define GDIOBJ_PEN 1 /* ;Internal */
  1618. #define GDIOBJ_BRUSH 2 /* ;Internal */
  1619. #define GDIOBJ_FONT 3 /* ;Internal */
  1620. #define GDIOBJ_PALETTE 4 /* ;Internal */
  1621. #define GDIOBJ_BITMAP 5 /* ;Internal */
  1622. #define GDIOBJ_RGN 6 /* ;Internal */
  1623. #define GDIOBJ_DC 7 /* ;Internal */
  1624. #define GDIOBJ_IC 8 /* ;Internal */
  1625. #define GDIOBJ_DISABLEDDC 9 /* ;Internal */
  1626. #define GDIOBJ_METADC 10 /* ;Internal */
  1627. #define GDIOBJ_METAFILE 11 /* ;Internal */
  1628. BOOL WINAPI DeleteObject(HGDIOBJ);
  1629. HGDIOBJ WINAPI SelectObject(HDC, HGDIOBJ);
  1630. int WINAPI GetObject(HGDIOBJ, int, void FAR*);
  1631. BOOL WINAPI UnrealizeObject(HGDIOBJ);
  1632. #ifdef STRICT
  1633. typedef (CALLBACK* GOBJENUMPROC)(void FAR*, LPARAM);
  1634. #else
  1635. typedef FARPROC GOBJENUMPROC;
  1636. #endif
  1637. #ifdef STRICT
  1638. int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPARAM);
  1639. #else
  1640. int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPSTR);
  1641. #endif
  1642. /* Object types for EnumObjects() */
  1643. #define OBJ_PEN 1
  1644. #define OBJ_BRUSH 2
  1645. #if (WINVER >= 0x0400)
  1646. HANDLE WINAPI SetObjectOwner(HGDIOBJ, HANDLE);
  1647. #endif
  1648. /****** Pen support *********************************************************/
  1649. /* Logical Pen */
  1650. typedef struct tagLOGPEN
  1651. {
  1652. UINT lopnStyle;
  1653. POINT lopnWidth;
  1654. COLORREF lopnColor;
  1655. } LOGPEN;
  1656. typedef LOGPEN* PLOGPEN;
  1657. typedef LOGPEN NEAR* NPLOGPEN;
  1658. typedef LOGPEN FAR* LPLOGPEN;
  1659. /* Pen Styles */
  1660. #define PS_SOLID 0
  1661. #define PS_DASH 1
  1662. #define PS_DOT 2
  1663. #define PS_DASHDOT 3
  1664. #define PS_DASHDOTDOT 4
  1665. #define PS_NULL 5
  1666. #define PS_INSIDEFRAME 6
  1667. HPEN WINAPI CreatePen(int, int, COLORREF);
  1668. HPEN WINAPI CreatePenIndirect(LOGPEN FAR*);
  1669. /* Stock pens for use with GetStockObject(); */
  1670. #define WHITE_PEN 6
  1671. #define BLACK_PEN 7
  1672. #define NULL_PEN 8
  1673. /****** Brush support *******************************************************/
  1674. /* Brush Styles */
  1675. #define BS_SOLID 0
  1676. #define BS_NULL 1
  1677. #define BS_HOLLOW BS_NULL
  1678. #define BS_HATCHED 2
  1679. #define BS_PATTERN 3
  1680. #define BS_INDEXED 4
  1681. #define BS_DIBPATTERN 5
  1682. /* Hatch Styles */
  1683. #define HS_HORIZONTAL 0
  1684. #define HS_VERTICAL 1
  1685. #define HS_FDIAGONAL 2
  1686. #define HS_BDIAGONAL 3
  1687. #define HS_CROSS 4
  1688. #define HS_DIAGCROSS 5
  1689. #define HS_API_MAX 6
  1690. /* Logical Brush (or Pattern) */
  1691. typedef struct tagLOGBRUSH
  1692. {
  1693. UINT lbStyle;
  1694. COLORREF lbColor;
  1695. int lbHatch;
  1696. } LOGBRUSH;
  1697. typedef LOGBRUSH* PLOGBRUSH;
  1698. typedef LOGBRUSH NEAR* NPLOGBRUSH;
  1699. typedef LOGBRUSH FAR* LPLOGBRUSH;
  1700. typedef LOGBRUSH PATTERN;
  1701. typedef PATTERN* PPATTERN;
  1702. typedef PATTERN NEAR* NPPATTERN;
  1703. typedef PATTERN FAR* LPPATTERN;
  1704. HBRUSH WINAPI CreateSolidBrush(COLORREF);
  1705. HBRUSH WINAPI CreateHatchBrush(int, COLORREF);
  1706. HBRUSH WINAPI CreatePatternBrush(HBITMAP);
  1707. HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL, UINT);
  1708. HBRUSH WINAPI CreateBrushIndirect(LOGBRUSH FAR*);
  1709. /* Stock brushes for use with GetStockObject() */
  1710. #define WHITE_BRUSH 0
  1711. #define LTGRAY_BRUSH 1
  1712. #define GRAY_BRUSH 2
  1713. #define DKGRAY_BRUSH 3
  1714. #define BLACK_BRUSH 4
  1715. #define NULL_BRUSH 5
  1716. #define HOLLOW_BRUSH NULL_BRUSH
  1717. DWORD WINAPI SetBrushOrg(HDC, int, int);
  1718. DWORD WINAPI GetBrushOrg(HDC);
  1719. #if (WINVER >= 0x030a)
  1720. BOOL WINAPI GetBrushOrgEx(HDC, POINT FAR*);
  1721. #endif /* WINVER >= 0x030a */
  1722. #endif /* NOGDIOBJ */
  1723. /****** Region support ******************************************************/
  1724. HRGN WINAPI CreateRectRgn(int, int, int, int);
  1725. HRGN WINAPI CreateRectRgnIndirect(LPCRECT);
  1726. HRGN WINAPI CreateEllipticRgnIndirect(LPCRECT);
  1727. HRGN WINAPI CreateEllipticRgn(int, int, int, int);
  1728. HRGN WINAPI CreatePolygonRgn(LPCPOINT, int, int);
  1729. HRGN WINAPI CreatePolyPolygonRgn(LPCPOINT, const int FAR*, int, int);
  1730. HRGN WINAPI CreateRoundRectRgn(int, int, int, int, int, int);
  1731. /* Region type flags */
  1732. #define ERROR 0
  1733. #define NULLREGION 1
  1734. #define SIMPLEREGION 2
  1735. #define COMPLEXREGION 3
  1736. void WINAPI SetRectRgn(HRGN, int, int, int, int);
  1737. int WINAPI CombineRgn(HRGN, HRGN, HRGN, int);
  1738. /* CombineRgn() command values */
  1739. #define RGN_AND 1
  1740. #define RGN_OR 2
  1741. #define RGN_XOR 3
  1742. #define RGN_DIFF 4
  1743. #define RGN_COPY 5
  1744. BOOL WINAPI EqualRgn(HRGN, HRGN);
  1745. int WINAPI OffsetRgn(HRGN, int, int);
  1746. int WINAPI GetRgnBox(HRGN, LPRECT);
  1747. BOOL WINAPI RectInRegion(HRGN, LPCRECT);
  1748. BOOL WINAPI PtInRegion(HRGN, int, int);
  1749. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  1750. /* ;Internal 4.0 */
  1751. /* structures for ExtCreateRegion / GetRegionData APIs */ /* ;Internal 4.0 */
  1752. /* ;Internal 4.0 */
  1753. typedef struct tagRGNDATAHEADER { /* ;Internal 4.0 */
  1754. DWORD dwSize; /* ;Internal 4.0 */
  1755. DWORD iType; /* ;Internal 4.0 */
  1756. DWORD nCount; /* ;Internal 4.0 */
  1757. DWORD nRgnSize; /* ;Internal 4.0 */
  1758. RECTL rcBound; /* ;Internal 4.0 */
  1759. } RGNDATAHEADER; /* ;Internal 4.0 */
  1760. typedef RGNDATAHEADER* PRGNDATAHEADER; /* ;Internal 4.0 */
  1761. typedef RGNDATAHEADER NEAR* NPRGNDATAHEADER; /* ;Internal 4.0 */
  1762. typedef RGNDATAHEADER FAR* LPRGNDATAHEADER; /* ;Internal 4.0 */
  1763. typedef const RGNDATAHEADER FAR* LPCRGNDATAHEADER; /* ;Internal 4.0 */
  1764. /* ;Internal 4.0 */
  1765. typedef struct tagRGNDATA { /* ;Internal 4.0 */
  1766. RGNDATAHEADER rdh; /* ;Internal 4.0 */
  1767. char Buffer[1]; /* ;Internal 4.0 */
  1768. } RGNDATA; /* ;Internal 4.0 */
  1769. typedef RGNDATA* PRGNDATA; /* ;Internal 4.0 */
  1770. typedef RGNDATA NEAR* NPRGNDATA; /* ;Internal 4.0 */
  1771. typedef RGNDATA FAR* LPRGNDATA; /* ;Internal 4.0 */
  1772. typedef const RGNDATA FAR* LPCRGNDATA; /* ;Internal 4.0 */
  1773. /* ;Internal 4.0 */
  1774. int WINAPI ExtSelectClipRgn(HDC, HRGN, int); /* ;Internal 4.0 */
  1775. DWORD WINAPI GetRegionData(HRGN, DWORD, LPRGNDATA); /* ;Internal 4.0 */
  1776. HRGN WINAPI ExtCreateRegion(LPCXFORM, DWORD, LPCRGNDATA); /* ;Internal 4.0 */
  1777. /* ;Internal 4.0 */
  1778. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  1779. /****** Color palette Support ************************************************/
  1780. #define PALETTERGB(r,g,b) (0x02000000L | RGB(r,g,b))
  1781. #define PALETTEINDEX(i) ((COLORREF)(0x01000000L | (DWORD)(WORD)(i)))
  1782. typedef struct tagPALETTEENTRY
  1783. {
  1784. BYTE peRed;
  1785. BYTE peGreen;
  1786. BYTE peBlue;
  1787. BYTE peFlags;
  1788. } PALETTEENTRY;
  1789. typedef PALETTEENTRY FAR* LPPALETTEENTRY;
  1790. /* Palette entry flags */
  1791. #define PC_RESERVED 0x01 /* palette index used for animation */
  1792. #define PC_EXPLICIT 0x02 /* palette index is explicit to device */
  1793. #define PC_NOCOLLAPSE 0x04 /* do not match color to system palette */
  1794. /* Logical Palette */
  1795. typedef struct tagLOGPALETTE
  1796. {
  1797. WORD palVersion;
  1798. WORD palNumEntries;
  1799. PALETTEENTRY palPalEntry[1];
  1800. } LOGPALETTE;
  1801. typedef LOGPALETTE* PLOGPALETTE;
  1802. typedef LOGPALETTE NEAR* NPLOGPALETTE;
  1803. typedef LOGPALETTE FAR* LPLOGPALETTE;
  1804. HPALETTE WINAPI CreatePalette(const LOGPALETTE FAR*);
  1805. HPALETTE WINAPI SelectPalette(HDC, HPALETTE, BOOL);
  1806. UINT WINAPI RealizePalette(HDC);
  1807. int WINAPI UpdateColors(HDC);
  1808. void WINAPI AnimatePalette(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*);
  1809. UINT WINAPI SetPaletteEntries(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*);
  1810. UINT WINAPI GetPaletteEntries(HPALETTE, UINT, UINT, PALETTEENTRY FAR*);
  1811. UINT WINAPI GetNearestPaletteIndex(HPALETTE, COLORREF);
  1812. BOOL WINAPI ResizePalette(HPALETTE, UINT);
  1813. UINT WINAPI GetSystemPaletteEntries(HDC, UINT, UINT, PALETTEENTRY FAR*);
  1814. UINT WINAPI GetSystemPaletteUse(HDC);
  1815. UINT WINAPI SetSystemPaletteUse(HDC, UINT);
  1816. /* Get/SetSystemPaletteUse() values */
  1817. #define SYSPAL_STATIC 1
  1818. #define SYSPAL_NOSTATIC 2
  1819. /****** Clipping support *****************************************************/
  1820. int WINAPI SelectClipRgn(HDC, HRGN);
  1821. int WINAPI GetClipBox(HDC, LPRECT);
  1822. int WINAPI IntersectClipRect(HDC, int, int, int, int);
  1823. int WINAPI OffsetClipRgn(HDC, int, int);
  1824. int WINAPI ExcludeClipRect(HDC, int, int, int, int);
  1825. BOOL WINAPI PtVisible(HDC, int, int);
  1826. BOOL WINAPI RectVisible(HDC, LPCRECT);
  1827. #if (WINVER >= 0x030a) /* ;Internal */
  1828. /* DC hook callback function */ /* ;Internal */
  1829. /* ;Internal */
  1830. typedef UINT (CALLBACK* DCHOOKPROC)(HDC hDC, UINT code, DWORD data, DWORD lParam); /* ;Internal */
  1831. /* ;Internal */
  1832. BOOL WINAPI SetDCHook(HDC hDC, DCHOOKPROC lpNewProc, DWORD data); /* ;Internal */
  1833. DWORD WINAPI GetDCHook(HDC hDC, DCHOOKPROC FAR* lplpproc); /* ;Internal */
  1834. /* ;Internal */
  1835. /* Callback reason code values */ /* ;Internal */
  1836. /* ;Internal */
  1837. #define DCHC_INVALIDVISRGN 0x0001 /* ;Internal */
  1838. #define DCHC_DELETEDC 0x0002 /* ;Internal */
  1839. /* ;Internal */
  1840. UINT WINAPI SetHookFlags(HDC hDC, UINT flags); /* ;Internal */
  1841. /* ;Internal */
  1842. #define DCHF_INVALIDATEVISRGN 0x0001 /* ;Internal */
  1843. #define DCHF_VALIDATEVISRGN 0x0002 /* ;Internal */
  1844. #endif /* WINVER >= 0x030a */ /* ;Internal */
  1845. /****** General drawing support ********************************************/
  1846. DWORD WINAPI MoveTo(HDC, int, int);
  1847. DWORD WINAPI GetCurrentPosition(HDC);
  1848. #if (WINVER >= 0x030a)
  1849. BOOL WINAPI MoveToEx(HDC, int, int, POINT FAR*);
  1850. BOOL WINAPI GetCurrentPositionEx(HDC, POINT FAR*);
  1851. #endif /* WINVER >= 0x030a */
  1852. BOOL WINAPI LineTo(HDC, int, int);
  1853. BOOL WINAPI Polyline(HDC, LPCPOINT, int);
  1854. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  1855. BOOL WINAPI PolyBezier(HDC, LPCPOINT, UINT); /* ;Internal 4.0 */
  1856. BOOL WINAPI PolyBezierTo(HDC, LPCPOINT, UINT); /* ;Internal 4.0 */
  1857. /* ;Internal 4.0 */
  1858. BOOL WINAPI AbortPath(HDC); /* ;Internal 4.0 */
  1859. BOOL WINAPI BeginPath(HDC); /* ;Internal 4.0 */
  1860. BOOL WINAPI CloseFigure(HDC); /* ;Internal 4.0 */
  1861. BOOL WINAPI EndPath(HDC); /* ;Internal 4.0 */
  1862. BOOL WINAPI FillPath(HDC); /* ;Internal 4.0 */
  1863. BOOL WINAPI FlattenPath(HDC); /* ;Internal 4.0 */
  1864. long WINAPI GetPath(HDC, LPPOINTL, LPBYTE, long); /* ;Internal 4.0 */
  1865. HRGN WINAPI PathToRegion(HDC); /* ;Internal 4.0 */
  1866. BOOL WINAPI SelectClipPath(HDC, int); /* ;Internal 4.0 */
  1867. BOOL WINAPI StrokeAndFillPath(HDC); /* ;Internal 4.0 */
  1868. BOOL WINAPI StrokePath(HDC); /* ;Internal 4.0 */
  1869. BOOL WINAPI WidenPath(HDC); /* ;Internal 4.0 */
  1870. /* ;Internal 4.0 */
  1871. #define PT_CLOSEFIGURE 0x01 /* GetPath byte flags */ /* ;Internal 4.0 */
  1872. #define PT_LINETO 0x02 /* ;Internal 4.0 */
  1873. #define PT_BEZIERTO 0x04 /* ;Internal 4.0 */
  1874. #define PT_MOVETO 0x06 /* ;Internal 4.0 */
  1875. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  1876. /* ;Internal 4.0 */
  1877. #ifdef STRICT
  1878. typedef void (CALLBACK* LINEDDAPROC)(int, int, LPARAM);
  1879. #else
  1880. typedef FARPROC LINEDDAPROC;
  1881. #endif
  1882. void WINAPI LineDDA(int, int, int, int, LINEDDAPROC, LPARAM);
  1883. BOOL WINAPI Rectangle(HDC, int, int, int, int);
  1884. BOOL WINAPI RoundRect(HDC, int, int, int, int, int, int);
  1885. BOOL WINAPI Ellipse(HDC, int, int, int, int);
  1886. BOOL WINAPI Arc(HDC, int, int, int, int, int, int, int, int);
  1887. BOOL WINAPI Chord(HDC, int, int, int, int, int, int, int, int);
  1888. BOOL WINAPI Pie(HDC, int, int, int, int, int, int, int, int);
  1889. BOOL WINAPI Polygon(HDC, LPCPOINT, int);
  1890. BOOL WINAPI PolyPolygon(HDC, LPCPOINT, int FAR*, int);
  1891. /* PolyFill Modes */
  1892. #define ALTERNATE 1
  1893. #define WINDING 2
  1894. int WINAPI SetPolyFillMode(HDC, int);
  1895. int WINAPI GetPolyFillMode(HDC);
  1896. BOOL WINAPI FloodFill(HDC, int, int, COLORREF);
  1897. BOOL WINAPI ExtFloodFill(HDC, int, int, COLORREF, UINT);
  1898. /* ExtFloodFill style flags */
  1899. #define FLOODFILLBORDER 0
  1900. #define FLOODFILLSURFACE 1
  1901. BOOL WINAPI FillRgn(HDC, HRGN, HBRUSH);
  1902. BOOL WINAPI FrameRgn(HDC, HRGN, HBRUSH, int, int);
  1903. BOOL WINAPI InvertRgn(HDC, HRGN);
  1904. BOOL WINAPI PaintRgn(HDC, HRGN);
  1905. /* Rectangle output routines */
  1906. int WINAPI FillRect(HDC, LPCRECT, HBRUSH);
  1907. int WINAPI FrameRect(HDC, LPCRECT, HBRUSH);
  1908. BOOL WINAPI InvertRect(HDC, LPCRECT);
  1909. void WINAPI DrawFocusRect(HDC, LPCRECT);
  1910. BOOL WINAPI FastWindowFrame(HDC, LPCRECT, UINT, UINT, DWORD); /* ;Internal */
  1911. /****** Text support ********************************************************/
  1912. BOOL WINAPI TextOut(HDC, int, int, LPCSTR, int);
  1913. LONG WINAPI TabbedTextOut(HDC, int, int, LPCSTR, int, int, int FAR*, int);
  1914. BOOL WINAPI ExtTextOut(HDC, int, int, UINT, LPCRECT, LPCSTR, UINT, int FAR*);
  1915. #define ETO_GRAYED 0x0001
  1916. #define ETO_OPAQUE 0x0002
  1917. #define ETO_CLIPPED 0x0004
  1918. #define ETO_GLYPH_INDEX 0x0010
  1919. #define ETO_RTLREADING 0x0080
  1920. DWORD WINAPI GetTextExtent(HDC, LPCSTR, int);
  1921. DWORD WINAPI GetTabbedTextExtent(HDC, LPCSTR, int, int, int FAR*);
  1922. #if (WINVER >= 0x030a)
  1923. BOOL WINAPI GetTextExtentPoint(HDC, LPCSTR, int, SIZE FAR*);
  1924. #endif /* WINVER >= 0x030a */
  1925. /* DrawText() Format Flags */
  1926. #ifndef NODRAWTEXT
  1927. #define DT_LEFT 0x0000
  1928. #define DT_CENTER 0x0001
  1929. #define DT_RIGHT 0x0002
  1930. #define DT_TOP 0x0000
  1931. #define DT_VCENTER 0x0004
  1932. #define DT_BOTTOM 0x0008
  1933. #define DT_WORDBREAK 0x0010
  1934. #define DT_SINGLELINE 0x0020
  1935. #define DT_EXPANDTABS 0x0040
  1936. #define DT_TABSTOP 0x0080
  1937. #define DT_NOCLIP 0x0100
  1938. #define DT_EXTERNALLEADING 0x0200
  1939. #define DT_CALCRECT 0x0400
  1940. #define DT_NOPREFIX 0x0800
  1941. #define DT_INTERNAL 0x1000
  1942. #define DT_EDITCONTROL 0x00002000
  1943. #define DT_PATH_ELLIPSIS 0x00004000 // ;Internal 4.0
  1944. #define DT_END_ELLIPSIS 0x00008000 // ;Internal 4.0
  1945. #define DT_MODIFYSTRING 0x00010000 // ;Internal 4.0
  1946. #define DT_RTLREADING 0x00020000 // ;Internal 4.0
  1947. #define DT_WORD_ELLIPSIS 0x00040000 // ;Internal 4.0
  1948. #define DT_VALID 0x0007ffff // ;Internal: Union of all those above
  1949. int WINAPI DrawText(HDC, LPCSTR, int, LPRECT, UINT);
  1950. #if (WINVER >= 0x0400)
  1951. typedef struct tagDRAWTEXTPARAMS
  1952. {
  1953. DWORD cbSize;
  1954. int iTabLength;
  1955. int iLeftMargin;
  1956. int iRightMargin;
  1957. UINT uiLengthDrawn;
  1958. } DRAWTEXTPARAMS, FAR *LPDRAWTEXTPARAMS;
  1959. int WINAPI DrawTextEx(HDC, LPSTR, int, LPRECT, DWORD, LPDRAWTEXTPARAMS);
  1960. #endif /* WINVER >= 0x0400 */
  1961. #endif /* NODRAWTEXT */
  1962. #ifdef STRICT
  1963. typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int);
  1964. #else
  1965. typedef FARPROC GRAYSTRINGPROC;
  1966. #endif
  1967. BOOL WINAPI GrayString(HDC, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int);
  1968. /* Monolithic state-drawing routine */
  1969. #if (WINVER >= 0x0400)
  1970. /* Image type */
  1971. #define DST_COMPLEX 0x0000
  1972. #define DST_TEXT 0x0001
  1973. #define DST_PREFIXTEXT 0x0002
  1974. #define DST_TEXTMAX 0x0002 /* ;Internal */
  1975. #define DST_ICON 0x0003
  1976. #define DST_BITMAP 0x0004
  1977. #define DST_GLYPH 0x0005 /* ;Internal */
  1978. #define DST_TYPEMASK 0x0007 /* ;Internal */
  1979. #define DST_GRAYSTRING 0x0008 /* ;Internal */
  1980. /* State type */
  1981. #define DSS_NORMAL 0x0000
  1982. #define DSS_UNION 0x0010 /* Old gray string appearance */
  1983. #define DSS_DISABLED 0x0020
  1984. #define DSS_DEFAULT 0x0040 // ;Internal BOGUS GOING AWAY
  1985. #define DSS_MONO 0x0080
  1986. #define DSS_INACTIVE 0x0100 // ;Internal
  1987. #define DSS_RIGHT 0x8000
  1988. #ifdef STRICT
  1989. typedef BOOL (CALLBACK* DRAWSTATEPROC)(HDC, LPARAM, WPARAM, int, int);
  1990. #else
  1991. typedef FARPROC DRAWSTATEPROC;
  1992. #endif
  1993. BOOL WINAPI DrawState(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT);
  1994. #endif /* WINVER >= 0x0400 */
  1995. BOOL WINAPI GetCharWidth(HDC, UINT, UINT, int FAR*);
  1996. COLORREF WINAPI SetTextColor(HDC, COLORREF);
  1997. COLORREF WINAPI GetTextColor(HDC);
  1998. COLORREF WINAPI SetBkColor(HDC, COLORREF);
  1999. COLORREF WINAPI GetBkColor(HDC);
  2000. int WINAPI SetBkMode(HDC, int);
  2001. int WINAPI GetBkMode(HDC);
  2002. /* Background Modes */
  2003. #define TRANSPARENT 1
  2004. #define OPAQUE 2
  2005. #define TRANSPARENT1 3 /* ;Internal */
  2006. UINT WINAPI SetTextAlign(HDC, UINT);
  2007. UINT WINAPI GetTextAlign(HDC);
  2008. /* Text Alignment Options */
  2009. #define TA_NOUPDATECP 0x0000
  2010. #define TA_UPDATECP 0x0001
  2011. #define TA_LEFT 0x0000
  2012. #define TA_RIGHT 0x0002
  2013. #define TA_CENTER 0x0006
  2014. #define TA_TOP 0x0000
  2015. #define TA_BOTTOM 0x0008
  2016. #define TA_BASELINE 0x0018
  2017. #define TA_RTLREADING 0x0100
  2018. int WINAPI SetTextCharacterExtra(HDC, int);
  2019. int WINAPI GetTextCharacterExtra(HDC);
  2020. int WINAPI SetTextJustification(HDC, int, int);
  2021. /****** Font support ********************************************************/
  2022. /* Logical Font */
  2023. #define LF_FACESIZE 32
  2024. #ifndef NOGDIOBJ
  2025. typedef struct tagLOGFONT
  2026. {
  2027. int lfHeight;
  2028. int lfWidth;
  2029. int lfEscapement;
  2030. int lfOrientation;
  2031. int lfWeight;
  2032. BYTE lfItalic;
  2033. BYTE lfUnderline;
  2034. BYTE lfStrikeOut;
  2035. BYTE lfCharSet;
  2036. BYTE lfOutPrecision;
  2037. BYTE lfClipPrecision;
  2038. BYTE lfQuality;
  2039. BYTE lfPitchAndFamily;
  2040. char lfFaceName[LF_FACESIZE];
  2041. } LOGFONT;
  2042. typedef LOGFONT* PLOGFONT;
  2043. typedef LOGFONT NEAR* NPLOGFONT;
  2044. typedef LOGFONT FAR* LPLOGFONT;
  2045. /* weight values */
  2046. #define FW_DONTCARE 0
  2047. #define FW_THIN 100
  2048. #define FW_EXTRALIGHT 200
  2049. #define FW_LIGHT 300
  2050. #define FW_NORMAL 400
  2051. #define FW_MEDIUM 500
  2052. #define FW_SEMIBOLD 600
  2053. #define FW_BOLD 700
  2054. #define FW_EXTRABOLD 800
  2055. #define FW_HEAVY 900
  2056. #define FW_ULTRALIGHT FW_EXTRALIGHT
  2057. #define FW_REGULAR FW_NORMAL
  2058. #define FW_DEMIBOLD FW_SEMIBOLD
  2059. #define FW_ULTRABOLD FW_EXTRABOLD
  2060. #define FW_BLACK FW_HEAVY
  2061. /* CharSet values */
  2062. #define ANSI_CHARSET 0
  2063. #define DEFAULT_CHARSET 1
  2064. #define SYMBOL_CHARSET 2
  2065. #if (WINVER >= 0x0400)
  2066. #define MAC_CHARSET 77
  2067. #endif /* WINVER >= 0x0400 */
  2068. #define SHIFTJIS_CHARSET 128
  2069. #define HANGEUL_CHARSET 129
  2070. #define JOHAB_CHARSET 130
  2071. #define GB2312_CHARSET 134
  2072. #define CHINESEBIG5_CHARSET 136
  2073. #define GREEK_CHARSET 161
  2074. #define TURKISH_CHARSET 162
  2075. #define HEBREW_CHARSET 177
  2076. #define ARABIC_CHARSET 178
  2077. #define BALTIC_CHARSET 186
  2078. #define RUSSIAN_CHARSET 204
  2079. #define THAI_CHARSET 222
  2080. #define EASTEUROPE_CHARSET 238
  2081. #define OEM_CHARSET 255
  2082. /* OutPrecision values */
  2083. #define OUT_DEFAULT_PRECIS 0
  2084. #define OUT_STRING_PRECIS 1
  2085. #define OUT_CHARACTER_PRECIS 2
  2086. #define OUT_STROKE_PRECIS 3
  2087. #if (WINVER >= 0x030a)
  2088. #define OUT_TT_PRECIS 4
  2089. #define OUT_DEVICE_PRECIS 5
  2090. #define OUT_RASTER_PRECIS 6
  2091. #define OUT_TT_ONLY_PRECIS 7
  2092. #endif /* WINVER >= 0x030a */
  2093. /* ClipPrecision values */
  2094. #define CLIP_DEFAULT_PRECIS 0x00
  2095. #define CLIP_CHARACTER_PRECIS 0x01
  2096. #define CLIP_STROKE_PRECIS 0x02
  2097. #define CLIP_MASK 0x0F
  2098. #if (WINVER >= 0x030a)
  2099. #define CLIP_LH_ANGLES 0x10
  2100. #define CLIP_TT_ALWAYS 0x20
  2101. #define CLIP_EMBEDDED 0x80
  2102. #endif /* WINVER >= 0x030a */
  2103. /* Quality values */
  2104. #define DEFAULT_QUALITY 0
  2105. #define DRAFT_QUALITY 1
  2106. #define PROOF_QUALITY 2
  2107. #if (WINVER >= 0x400)
  2108. #define NONANTIALIASED_QUALITY 3
  2109. #define ANTIALIASED_QUALITY 4
  2110. #endif /* WINVER >= 0x400 */
  2111. /* PitchAndFamily pitch values (low 4 bits) */
  2112. #define DEFAULT_PITCH 0x00
  2113. #define FIXED_PITCH 0x01
  2114. #define VARIABLE_PITCH 0x02
  2115. #if (WINVER >= 0x400)
  2116. #define MONO_FONT 0x08
  2117. #endif
  2118. /* PitchAndFamily family values (high 4 bits) */
  2119. #define FF_DONTCARE 0x00
  2120. #define FF_ROMAN 0x10
  2121. #define FF_SWISS 0x20
  2122. #define FF_MODERN 0x30
  2123. #define FF_SCRIPT 0x40
  2124. #define FF_DECORATIVE 0x50
  2125. HFONT WINAPI CreateFont(int, int, int, int, int, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, LPCSTR);
  2126. HFONT WINAPI CreateFontIndirect(const LOGFONT FAR*);
  2127. /* Stock fonts for use with GetStockObject() */
  2128. #define OEM_FIXED_FONT 10
  2129. #define ANSI_FIXED_FONT 11
  2130. #define ANSI_VAR_FONT 12
  2131. #define SYSTEM_FONT 13
  2132. #define DEVICE_DEFAULT_FONT 14
  2133. #define DEFAULT_PALETTE 15
  2134. #define SYSTEM_FIXED_FONT 16
  2135. #define DEFAULT_GUI_FONT 17
  2136. DWORD WINAPI SetMapperFlags(HDC, DWORD);
  2137. #define ASPECT_FILTERING 0x00000001L
  2138. int WINAPI AddFontResource(LPCSTR);
  2139. BOOL WINAPI RemoveFontResource(LPCSTR);
  2140. #define GCP_DBCS 0x0001
  2141. #define GCP_REORDER 0x0002
  2142. #define GCP_USEKERNING 0x0008
  2143. #define GCP_GLYPHSHAPE 0x0010
  2144. #define GCP_LIGATE 0x0020
  2145. ///#define GCP_GLYPHINDEXING 0x0080
  2146. #define GCP_DIACRITIC 0x0100
  2147. #define GCP_KASHIDA 0x0400
  2148. #define GCP_ERROR 0x8000
  2149. #define FLI_MASK 0x103B
  2150. #define GCP_JUSTIFY 0x00010000L
  2151. //#define GCP_NODIACRITICS 0x00020000L
  2152. #define FLI_GLYPHS 0x00040000L
  2153. #define GCP_CLASSIN 0x00080000L
  2154. #define GCP_MAXEXTENT 0x00100000L
  2155. #define GCP_JUSTIFYIN 0x00200000L
  2156. #define GCP_DISPLAYZWG 0x00400000L
  2157. #define GCP_SYMSWAPOFF 0x00800000L
  2158. #define GCP_NUMERICOVERRIDE 0x01000000L
  2159. #define GCP_NEUTRALOVERRIDE 0x02000000L
  2160. #define GCP_NUMERICSLATIN 0x04000000L
  2161. #define GCP_NUMERICSLOCAL 0x08000000L
  2162. #define GCPCLASS_LATIN 1
  2163. #define GCPCLASS_HEBREW 2
  2164. #define GCPCLASS_ARABIC 2
  2165. #define GCPCLASS_NEUTRAL 3
  2166. #define GCPCLASS_LOCALNUMBER 4
  2167. #define GCPCLASS_LATINNUMBER 5
  2168. #define GCPCLASS_LATINNUMERICTERMINATOR 6
  2169. #define GCPCLASS_LATINNUMERICSEPARATOR 7
  2170. #define GCPCLASS_NUMERICSEPARATOR 8
  2171. #define GCPCLASS_PREBOUNDLTR 0x80
  2172. #define GCPCLASS_PREBOUNDRTL 0x40
  2173. #define GCPCLASS_POSTBOUNDLTR 0x20
  2174. #define GCPCLASS_POSTBOUNDRTL 0x10
  2175. #define GCPGLYPH_LINKBEFORE 0x8000
  2176. #define GCPGLYPH_LINKAFTER 0x4000
  2177. typedef struct
  2178. {
  2179. DWORD lStructSize;
  2180. LPSTR lpOutString;
  2181. UINT FAR *lpOrder;
  2182. int FAR *lpDx;
  2183. int FAR *lpCaretPos;
  2184. LPSTR lpClass;
  2185. UINT FAR *lpGlyphs;
  2186. UINT nGlyphs;
  2187. int nMaxFit;
  2188. } GCP_RESULTS, FAR* LPGCP_RESULTS;
  2189. DWORD WINAPI GetFontLanguageInfo( HDC );
  2190. DWORD WINAPI GetCharacterPlacement(HDC, LPCSTR, int, int, LPGCP_RESULTS, DWORD);
  2191. int WINAPI GetTextFace(HDC, int, LPSTR);
  2192. int WINAPI GetTextCharset(HDC); /* ;Internal 4.0 */
  2193. DWORD WINAPI GetAspectRatioFilter(HDC);
  2194. #if (WINVER >= 0x030a)
  2195. BOOL WINAPI GetAspectRatioFilterEx(HDC, SIZE FAR*);
  2196. #endif /* WINVER >= 0x030a */
  2197. #endif /* NOGDIOBJ */
  2198. typedef struct tagPANOSE
  2199. {
  2200. BYTE bFamilyType;
  2201. BYTE bSerifStyle;
  2202. BYTE bWeight;
  2203. BYTE bProportion;
  2204. BYTE bContrast;
  2205. BYTE bStrokeVariation;
  2206. BYTE bArmStyle;
  2207. BYTE bLetterform;
  2208. BYTE bMidline;
  2209. BYTE bXHeight;
  2210. } PANOSE, FAR* LPPANOSE;
  2211. #ifndef NOTEXTMETRIC
  2212. typedef struct tagTEXTMETRIC
  2213. {
  2214. int tmHeight;
  2215. int tmAscent;
  2216. int tmDescent;
  2217. int tmInternalLeading;
  2218. int tmExternalLeading;
  2219. int tmAveCharWidth;
  2220. int tmMaxCharWidth;
  2221. int tmWeight;
  2222. BYTE tmItalic;
  2223. BYTE tmUnderlined;
  2224. BYTE tmStruckOut;
  2225. BYTE tmFirstChar;
  2226. BYTE tmLastChar;
  2227. BYTE tmDefaultChar;
  2228. BYTE tmBreakChar;
  2229. BYTE tmPitchAndFamily;
  2230. BYTE tmCharSet;
  2231. int tmOverhang;
  2232. int tmDigitizedAspectX;
  2233. int tmDigitizedAspectY;
  2234. } TEXTMETRIC;
  2235. typedef TEXTMETRIC* PTEXTMETRIC;
  2236. typedef TEXTMETRIC NEAR* NPTEXTMETRIC;
  2237. typedef TEXTMETRIC FAR* LPTEXTMETRIC;
  2238. /* tmPitchAndFamily values */
  2239. #define TMPF_VARIABLE_PITCH 0x01
  2240. #define TMPF_VECTOR 0x02
  2241. #define TMPF_DEVICE 0x08
  2242. /*
  2243. * Yes, this looks bogus. But it's because we got confused and named the
  2244. * flag wrong. LOGFONTs have an lfPitchAndFamily field, where FIXED_PITCH
  2245. * is 0x01. But TEXTMETRICs have a tmPitchAndFamily field, where
  2246. * VARIABLE_PITCH is 0x01. It's easy to confuse the two. We're sorry.
  2247. */
  2248. #define TMPF_FIXED_PITCH TMPF_VARIABLE_PITCH
  2249. #if (WINVER >= 0x030a)
  2250. #define TMPF_TRUETYPE 0x04
  2251. #endif /* WINVER >= 0x030a */
  2252. BOOL WINAPI GetTextMetrics(HDC, TEXTMETRIC FAR*);
  2253. #if (WINVER >= 0x030a)
  2254. #ifndef NOSCALABLEFONT
  2255. #if (WINVER >= 0x0400)
  2256. #define PANOSE_COUNT 10
  2257. #define PAN_FAMILYTYPE_INDEX 0
  2258. #define PAN_SERIFSTYLE_INDEX 1
  2259. #define PAN_WEIGHT_INDEX 2
  2260. #define PAN_PROPORTION_INDEX 3
  2261. #define PAN_CONTRAST_INDEX 4
  2262. #define PAN_STROKEVARIATION_INDEX 5
  2263. #define PAN_ARMSTYLE_INDEX 6
  2264. #define PAN_LETTERFORM_INDEX 7
  2265. #define PAN_MIDLINE_INDEX 8
  2266. #define PAN_XHEIGHT_INDEX 9
  2267. #define PAN_CULTURE_LATIN 0
  2268. #define PAN_ANY 0 /* Any */
  2269. #define PAN_NO_FIT 1 /* No Fit */
  2270. #define PAN_FAMILY_TEXT_DISPLAY 2 /* Text and Display */
  2271. #define PAN_FAMILY_SCRIPT 3 /* Script */
  2272. #define PAN_FAMILY_DECORATIVE 4 /* Decorative */
  2273. #define PAN_FAMILY_PICTORIAL 5 /* Pictorial */
  2274. #define PAN_SERIF_COVE 2 /* Cove */
  2275. #define PAN_SERIF_OBTUSE_COVE 3 /* Obtuse Cove */
  2276. #define PAN_SERIF_SQUARE_COVE 4 /* Square Cove */
  2277. #define PAN_SERIF_OBTUSE_SQUARE_COVE 5 /* Obtuse Square Cove */
  2278. #define PAN_SERIF_SQUARE 6 /* Square */
  2279. #define PAN_SERIF_THIN 7 /* Thin */
  2280. #define PAN_SERIF_BONE 8 /* Bone */
  2281. #define PAN_SERIF_EXAGGERATED 9 /* Exaggerated */
  2282. #define PAN_SERIF_TRIANGLE 10 /* Triangle */
  2283. #define PAN_SERIF_NORMAL_SANS 11 /* Normal Sans */
  2284. #define PAN_SERIF_OBTUSE_SANS 12 /* Obtuse Sans */
  2285. #define PAN_SERIF_PERP_SANS 13 /* Prep Sans */
  2286. #define PAN_SERIF_FLARED 14 /* Flared */
  2287. #define PAN_SERIF_ROUNDED 15 /* Rounded */
  2288. #define PAN_WEIGHT_VERY_LIGHT 2 /* Very Light */
  2289. #define PAN_WEIGHT_LIGHT 3 /* Light */
  2290. #define PAN_WEIGHT_THIN 4 /* Thin */
  2291. #define PAN_WEIGHT_BOOK 5 /* Book */
  2292. #define PAN_WEIGHT_MEDIUM 6 /* Medium */
  2293. #define PAN_WEIGHT_DEMI 7 /* Demi */
  2294. #define PAN_WEIGHT_BOLD 8 /* Bold */
  2295. #define PAN_WEIGHT_HEAVY 9 /* Heavy */
  2296. #define PAN_WEIGHT_BLACK 10 /* Black */
  2297. #define PAN_WEIGHT_NORD 11 /* Nord */
  2298. #define PAN_PROP_OLD_STYLE 2 /* Old Style */
  2299. #define PAN_PROP_MODERN 3 /* Modern */
  2300. #define PAN_PROP_EVEN_WIDTH 4 /* Even Width */
  2301. #define PAN_PROP_EXPANDED 5 /* Expanded */
  2302. #define PAN_PROP_CONDENSED 6 /* Condensed */
  2303. #define PAN_PROP_VERY_EXPANDED 7 /* Very Expanded */
  2304. #define PAN_PROP_VERY_CONDENSED 8 /* Very Condensed */
  2305. #define PAN_PROP_MONOSPACED 9 /* Monospaced */
  2306. #define PAN_CONTRAST_NONE 2 /* None */
  2307. #define PAN_CONTRAST_VERY_LOW 3 /* Very Low */
  2308. #define PAN_CONTRAST_LOW 4 /* Low */
  2309. #define PAN_CONTRAST_MEDIUM_LOW 5 /* Medium Low */
  2310. #define PAN_CONTRAST_MEDIUM 6 /* Medium */
  2311. #define PAN_CONTRAST_MEDIUM_HIGH 7 /* Mediim High */
  2312. #define PAN_CONTRAST_HIGH 8 /* High */
  2313. #define PAN_CONTRAST_VERY_HIGH 9 /* Very High */
  2314. #define PAN_STROKE_GRADUAL_DIAG 2 /* Gradual/Diagonal */
  2315. #define PAN_STROKE_GRADUAL_TRAN 3 /* Gradual/Transitional */
  2316. #define PAN_STROKE_GRADUAL_VERT 4 /* Gradual/Vertical */
  2317. #define PAN_STROKE_GRADUAL_HORZ 5 /* Gradual/Horizontal */
  2318. #define PAN_STROKE_RAPID_VERT 6 /* Rapid/Vertical */
  2319. #define PAN_STROKE_RAPID_HORZ 7 /* Rapid/Horizontal */
  2320. #define PAN_STROKE_INSTANT_VERT 8 /* Instant/Vertical */
  2321. #define PAN_STRAIGHT_ARMS_HORZ 2 /* Straight Arms/Horizontal */
  2322. #define PAN_STRAIGHT_ARMS_WEDGE 3 /* Straight Arms/Wedge */
  2323. #define PAN_STRAIGHT_ARMS_VERT 4 /* Straight Arms/Vertical */
  2324. #define PAN_STRAIGHT_ARMS_SINGLE_SERIF 5 /* Straight Arms/Single-Serif */
  2325. #define PAN_STRAIGHT_ARMS_DOUBLE_SERIF 6 /* Straight Arms/Double-Serif */
  2326. #define PAN_BENT_ARMS_HORZ 7 /* Non-Straight Arms/Horizontal */
  2327. #define PAN_BENT_ARMS_WEDGE 8 /* Non-Straight Arms/Wedge */
  2328. #define PAN_BENT_ARMS_VERT 9 /* Non-Straight Arms/Vertical */
  2329. #define PAN_BENT_ARMS_SINGLE_SERIF 10 /* Non-Straight Arms/Single-Serif */
  2330. #define PAN_BENT_ARMS_DOUBLE_SERIF 11 /* Non-Straight Arms/Double-Serif */
  2331. #define PAN_LETT_NORMAL_CONTACT 2 /* Normal/Contact */
  2332. #define PAN_LETT_NORMAL_WEIGHTED 3 /* Normal/Weighted */
  2333. #define PAN_LETT_NORMAL_BOXED 4 /* Normal/Boxed */
  2334. #define PAN_LETT_NORMAL_FLATTENED 5 /* Normal/Flattened */
  2335. #define PAN_LETT_NORMAL_ROUNDED 6 /* Normal/Rounded */
  2336. #define PAN_LETT_NORMAL_OFF_CENTER 7 /* Normal/Off Center */
  2337. #define PAN_LETT_NORMAL_SQUARE 8 /* Normal/Square */
  2338. #define PAN_LETT_OBLIQUE_CONTACT 9 /* Oblique/Contact */
  2339. #define PAN_LETT_OBLIQUE_WEIGHTED 10 /* Oblique/Weighted */
  2340. #define PAN_LETT_OBLIQUE_BOXED 11 /* Oblique/Boxed */
  2341. #define PAN_LETT_OBLIQUE_FLATTENED 12 /* Oblique/Flattened */
  2342. #define PAN_LETT_OBLIQUE_ROUNDED 13 /* Oblique/Rounded */
  2343. #define PAN_LETT_OBLIQUE_OFF_CENTER 14 /* Oblique/Off Center */
  2344. #define PAN_LETT_OBLIQUE_SQUARE 15 /* Oblique/Square */
  2345. #define PAN_MIDLINE_STANDARD_TRIMMED 2 /* Standard/Trimmed */
  2346. #define PAN_MIDLINE_STANDARD_POINTED 3 /* Standard/Pointed */
  2347. #define PAN_MIDLINE_STANDARD_SERIFED 4 /* Standard/Serifed */
  2348. #define PAN_MIDLINE_HIGH_TRIMMED 5 /* High/Trimmed */
  2349. #define PAN_MIDLINE_HIGH_POINTED 6 /* High/Pointed */
  2350. #define PAN_MIDLINE_HIGH_SERIFED 7 /* High/Serifed */
  2351. #define PAN_MIDLINE_CONSTANT_TRIMMED 8 /* Constant/Trimmed */
  2352. #define PAN_MIDLINE_CONSTANT_POINTED 9 /* Constant/Pointed */
  2353. #define PAN_MIDLINE_CONSTANT_SERIFED 10 /* Constant/Serifed */
  2354. #define PAN_MIDLINE_LOW_TRIMMED 11 /* Low/Trimmed */
  2355. #define PAN_MIDLINE_LOW_POINTED 12 /* Low/Pointed */
  2356. #define PAN_MIDLINE_LOW_SERIFED 13 /* Low/Serifed */
  2357. #define PAN_XHEIGHT_CONSTANT_SMALL 2 /* Constant/Small */
  2358. #define PAN_XHEIGHT_CONSTANT_STD 3 /* Constant/Standard */
  2359. #define PAN_XHEIGHT_CONSTANT_LARGE 4 /* Constant/Large */
  2360. #define PAN_XHEIGHT_DUCKING_SMALL 5 /* Ducking/Small */
  2361. #define PAN_XHEIGHT_DUCKING_STD 6 /* Ducking/Standard */
  2362. #define PAN_XHEIGHT_DUCKING_LARGE 7 /* Ducking/Large */
  2363. #endif /* WINVER >= 0x0400 */
  2364. typedef struct tagOUTLINETEXTMETRIC
  2365. {
  2366. UINT otmSize;
  2367. TEXTMETRIC otmTextMetrics;
  2368. BYTE otmFiller;
  2369. PANOSE otmPanoseNumber;
  2370. UINT otmfsSelection;
  2371. UINT otmfsType;
  2372. int otmsCharSlopeRise;
  2373. int otmsCharSlopeRun;
  2374. int otmItalicAngle;
  2375. UINT otmEMSquare;
  2376. int otmAscent;
  2377. int otmDescent;
  2378. UINT otmLineGap;
  2379. UINT otmsCapEmHeight;
  2380. UINT otmsXHeight;
  2381. RECT otmrcFontBox;
  2382. int otmMacAscent;
  2383. int otmMacDescent;
  2384. UINT otmMacLineGap;
  2385. UINT otmusMinimumPPEM;
  2386. POINT otmptSubscriptSize;
  2387. POINT otmptSubscriptOffset;
  2388. POINT otmptSuperscriptSize;
  2389. POINT otmptSuperscriptOffset;
  2390. UINT otmsStrikeoutSize;
  2391. int otmsStrikeoutPosition;
  2392. int otmsUnderscorePosition;
  2393. int otmsUnderscoreSize;
  2394. PSTR otmpFamilyName;
  2395. PSTR otmpFaceName;
  2396. PSTR otmpStyleName;
  2397. PSTR otmpFullName;
  2398. } OUTLINETEXTMETRIC, FAR* LPOUTLINETEXTMETRIC;
  2399. WORD WINAPI GetOutlineTextMetrics(HDC, UINT, OUTLINETEXTMETRIC FAR*);
  2400. #endif /* NOSCALABLEFONT */
  2401. #endif /* WINVER >= 0x030a */
  2402. #ifndef NOGDIOBJ
  2403. #if (WINVER >= 0x030a)
  2404. /* Structure passed to FONTENUMPROC */
  2405. /* NOTE: NEWTEXTMETRIC is the same as TEXTMETRIC plus 4 new fields */
  2406. typedef struct tagNEWTEXTMETRIC
  2407. {
  2408. int tmHeight;
  2409. int tmAscent;
  2410. int tmDescent;
  2411. int tmInternalLeading;
  2412. int tmExternalLeading;
  2413. int tmAveCharWidth;
  2414. int tmMaxCharWidth;
  2415. int tmWeight;
  2416. BYTE tmItalic;
  2417. BYTE tmUnderlined;
  2418. BYTE tmStruckOut;
  2419. BYTE tmFirstChar;
  2420. BYTE tmLastChar;
  2421. BYTE tmDefaultChar;
  2422. BYTE tmBreakChar;
  2423. BYTE tmPitchAndFamily;
  2424. BYTE tmCharSet;
  2425. int tmOverhang;
  2426. int tmDigitizedAspectX;
  2427. int tmDigitizedAspectY;
  2428. DWORD ntmFlags;
  2429. UINT ntmSizeEM;
  2430. UINT ntmCellHeight;
  2431. UINT ntmAvgWidth;
  2432. } NEWTEXTMETRIC;
  2433. typedef NEWTEXTMETRIC* PNEWTEXTMETRIC;
  2434. typedef NEWTEXTMETRIC NEAR* NPNEWTEXTMETRIC;
  2435. typedef NEWTEXTMETRIC FAR* LPNEWTEXTMETRIC;
  2436. /* ntmFlags field flags */
  2437. #define NTM_REGULAR 0x00000040L
  2438. #define NTM_BOLD 0x00000020L
  2439. #define NTM_ITALIC 0x00000001L
  2440. #define LF_FULLFACESIZE 64
  2441. /* Structure passed to FONTENUMPROC */
  2442. typedef struct tagENUMLOGFONT
  2443. {
  2444. LOGFONT elfLogFont;
  2445. char elfFullName[LF_FULLFACESIZE];
  2446. char elfStyle[LF_FACESIZE];
  2447. #if (WINVER >= 0x0400)
  2448. char elfScript[LF_FACESIZE];
  2449. #endif
  2450. } ENUMLOGFONT, FAR* LPENUMLOGFONT;
  2451. #endif /* WINVER >= 0x030a */
  2452. #endif /* NOGDIOBJ */
  2453. #ifdef STRICT
  2454. #ifndef NOGDIOBJ
  2455. typedef int (CALLBACK* OLDFONTENUMPROC)(const LOGFONT FAR*, const TEXTMETRIC FAR*, int, LPARAM);
  2456. #if (WINVER >= 0x030a)
  2457. typedef int (CALLBACK* FONTENUMPROC)(const ENUMLOGFONT FAR*, const NEWTEXTMETRIC FAR*, int, LPARAM);
  2458. int WINAPI EnumFontFamilies(HDC, LPCSTR, FONTENUMPROC, LPARAM);
  2459. int WINAPI EnumFontFamiliesEx(HDC, LPLOGFONT, FONTENUMPROC, LPARAM,DWORD);
  2460. #else /* WINVER >= 0x030a */
  2461. typedef OLDFONTENUMPROC FONTENUMPROC;
  2462. #endif /* WINVER >= 0x030a) */
  2463. int WINAPI EnumFonts(HDC, LPCSTR, OLDFONTENUMPROC, LPARAM);
  2464. #endif /* NOGDIOBJ */
  2465. #else /* STRICT */
  2466. typedef FARPROC OLDFONTENUMPROC;
  2467. typedef FARPROC FONTENUMPROC;
  2468. int WINAPI EnumFonts(HDC, LPCSTR, OLDFONTENUMPROC, LPSTR);
  2469. #if (WINVER >= 0x030a)
  2470. int WINAPI EnumFontFamilies(HDC, LPCSTR, FONTENUMPROC, LPSTR);
  2471. #endif /* WINVER >= 0x030a */
  2472. #endif /* !STRICT */
  2473. /* EnumFonts font type values */
  2474. #define RASTER_FONTTYPE 0x0001
  2475. #define DEVICE_FONTTYPE 0X0002
  2476. #if (WINVER >= 0x030a)
  2477. #define TRUETYPE_FONTTYPE 0x0004
  2478. #endif /* WINVER >= 0x030a */
  2479. #endif /* NOTEXTMETRIC */
  2480. #ifndef NOSCALABLEFONT
  2481. #if (WINVER >= 0x030a)
  2482. DWORD WINAPI ConvertOutlineFontFile(LPCSTR, LPCSTR, LPCSTR); /* ;Internal */
  2483. DWORD WINAPI GetFontData(HDC, DWORD, DWORD, void FAR*, DWORD);
  2484. BOOL WINAPI CreateScalableFontResource(UINT, LPCSTR, LPCSTR, LPCSTR);
  2485. typedef struct tagGLYPHMETRICS
  2486. {
  2487. UINT gmBlackBoxX;
  2488. UINT gmBlackBoxY;
  2489. POINT gmptGlyphOrigin;
  2490. int gmCellIncX;
  2491. int gmCellIncY;
  2492. } GLYPHMETRICS, FAR* LPGLYPHMETRICS;
  2493. typedef struct tagFIXED
  2494. {
  2495. UINT fract;
  2496. int value;
  2497. } FIXED, FAR* LPFIXED;
  2498. typedef struct tagMAT2
  2499. {
  2500. FIXED eM11;
  2501. FIXED eM12;
  2502. FIXED eM21;
  2503. FIXED eM22;
  2504. } MAT2, FAR* LPMAT2;
  2505. DWORD WINAPI GetGlyphOutline(HDC, UINT, UINT, GLYPHMETRICS FAR*, DWORD, void FAR*, const MAT2 FAR*);
  2506. /* GetGlyphOutline constants */
  2507. #define GGO_METRICS 0
  2508. #define GGO_BITMAP 1
  2509. #define GGO_NATIVE 2
  2510. #if (WINVER >= 0x0400)
  2511. #define GGO_GRAY2_BITMAP 4
  2512. #define GGO_GRAY4_BITMAP 5
  2513. #define GGO_GRAY8_BITMAP 6
  2514. #endif /* WINVER >= 0x0400 */
  2515. #define TT_POLYGON_TYPE 24
  2516. #define TT_PRIM_LINE 1
  2517. #define TT_PRIM_QSPLINE 2
  2518. typedef struct tagPOINTFX
  2519. {
  2520. FIXED x;
  2521. FIXED y;
  2522. } POINTFX, FAR* LPPOINTFX;
  2523. typedef struct tagTTPOLYCURVE
  2524. {
  2525. UINT wType;
  2526. UINT cpfx;
  2527. POINTFX apfx[1];
  2528. } TTPOLYCURVE, FAR* LPTTPOLYCURVE;
  2529. typedef struct tagTTPOLYGONHEADER
  2530. {
  2531. DWORD cb;
  2532. DWORD dwType;
  2533. POINTFX pfxStart;
  2534. } TTPOLYGONHEADER, FAR* LPTTPOLYGONHEADER;
  2535. typedef UINT FAR* LPFONTDIR; /* ;Internal */
  2536. /* ;Internal */
  2537. DWORD WINAPI EngineMakeFontDir(HDC, LPFONTDIR, LPCSTR); /* ;Internal */
  2538. /* ;Internal */
  2539. typedef struct tagABC
  2540. {
  2541. int abcA;
  2542. UINT abcB;
  2543. int abcC;
  2544. } ABC;
  2545. typedef ABC FAR* LPABC;
  2546. BOOL WINAPI GetCharABCWidths(HDC, UINT, UINT, ABC FAR*);
  2547. typedef struct tagKERNINGPAIR
  2548. {
  2549. WORD wFirst;
  2550. WORD wSecond;
  2551. int iKernAmount;
  2552. } KERNINGPAIR, FAR* LPKERNINGPAIR;
  2553. int WINAPI GetKerningPairs(HDC, int, KERNINGPAIR FAR*);
  2554. typedef struct tagRASTERIZER_STATUS
  2555. {
  2556. int nSize;
  2557. int wFlags;
  2558. int nLanguageID;
  2559. } RASTERIZER_STATUS;
  2560. typedef RASTERIZER_STATUS FAR* LPRASTERIZER_STATUS;
  2561. /* bits defined in wFlags of RASTERIZER_STATUS */
  2562. #define TT_AVAILABLE 0x0001
  2563. #define TT_ENABLED 0x0002
  2564. BOOL WINAPI GetRasterizerCaps(RASTERIZER_STATUS FAR*, int);
  2565. #endif /* WINVER >= 0x030a */
  2566. #endif /* NOSCALABLEFONT */
  2567. /****** Bitmap support ******************************************************/
  2568. #ifndef NOBITMAP
  2569. typedef struct tagBITMAP
  2570. {
  2571. int bmType;
  2572. int bmWidth;
  2573. int bmHeight;
  2574. int bmWidthBytes;
  2575. BYTE bmPlanes;
  2576. BYTE bmBitsPixel;
  2577. void FAR* bmBits;
  2578. } BITMAP;
  2579. typedef BITMAP* PBITMAP;
  2580. typedef BITMAP NEAR* NPBITMAP;
  2581. typedef BITMAP FAR* LPBITMAP;
  2582. /* Bitmap Header structures */
  2583. typedef struct tagRGBTRIPLE
  2584. {
  2585. BYTE rgbtBlue;
  2586. BYTE rgbtGreen;
  2587. BYTE rgbtRed;
  2588. } RGBTRIPLE;
  2589. typedef RGBTRIPLE FAR* LPRGBTRIPLE;
  2590. typedef struct tagRGBQUAD
  2591. {
  2592. BYTE rgbBlue;
  2593. BYTE rgbGreen;
  2594. BYTE rgbRed;
  2595. BYTE rgbReserved;
  2596. } RGBQUAD;
  2597. typedef RGBQUAD FAR* LPRGBQUAD;
  2598. /* structures for defining DIBs */
  2599. typedef struct tagBITMAPCOREHEADER
  2600. {
  2601. DWORD bcSize;
  2602. short bcWidth;
  2603. short bcHeight;
  2604. WORD bcPlanes;
  2605. WORD bcBitCount;
  2606. } BITMAPCOREHEADER;
  2607. typedef BITMAPCOREHEADER* PBITMAPCOREHEADER;
  2608. typedef BITMAPCOREHEADER FAR* LPBITMAPCOREHEADER;
  2609. typedef struct tagBITMAPINFOHEADER
  2610. {
  2611. DWORD biSize;
  2612. LONG biWidth;
  2613. LONG biHeight;
  2614. WORD biPlanes;
  2615. WORD biBitCount;
  2616. DWORD biCompression;
  2617. DWORD biSizeImage;
  2618. LONG biXPelsPerMeter;
  2619. LONG biYPelsPerMeter;
  2620. DWORD biClrUsed;
  2621. DWORD biClrImportant;
  2622. } BITMAPINFOHEADER;
  2623. typedef BITMAPINFOHEADER* PBITMAPINFOHEADER;
  2624. typedef BITMAPINFOHEADER FAR* LPBITMAPINFOHEADER;
  2625. /* constants for the biCompression field */
  2626. #define BI_RGB 0L
  2627. #define BI_RLE8 1L
  2628. #define BI_RLE4 2L
  2629. #define BI_BITFIELDS 3L
  2630. typedef struct tagBITMAPINFO
  2631. {
  2632. BITMAPINFOHEADER bmiHeader;
  2633. RGBQUAD bmiColors[1];
  2634. } BITMAPINFO;
  2635. typedef BITMAPINFO* PBITMAPINFO;
  2636. typedef BITMAPINFO FAR* LPBITMAPINFO;
  2637. typedef struct tagBITMAPCOREINFO
  2638. {
  2639. BITMAPCOREHEADER bmciHeader;
  2640. RGBTRIPLE bmciColors[1];
  2641. } BITMAPCOREINFO;
  2642. typedef BITMAPCOREINFO* PBITMAPCOREINFO;
  2643. typedef BITMAPCOREINFO FAR* LPBITMAPCOREINFO;
  2644. typedef struct tagBITMAPFILEHEADER
  2645. {
  2646. UINT bfType;
  2647. DWORD bfSize;
  2648. UINT bfReserved1;
  2649. UINT bfReserved2;
  2650. DWORD bfOffBits;
  2651. } BITMAPFILEHEADER;
  2652. typedef BITMAPFILEHEADER* PBITMAPFILEHEADER;
  2653. typedef BITMAPFILEHEADER FAR* LPBITMAPFILEHEADER;
  2654. /* Pel Array */ /* ;Internal */
  2655. typedef struct tagPELARRAY /* ;Internal */
  2656. { /* ;Internal */
  2657. int paXCount; /* ;Internal */
  2658. int paYCount; /* ;Internal */
  2659. int paXExt; /* ;Internal */
  2660. int paYExt; /* ;Internal */
  2661. BYTE paRGBs; /* ;Internal */
  2662. } PELARRAY; /* ;Internal */
  2663. typedef PELARRAY* PPELARRAY; /* ;Internal */
  2664. typedef PELARRAY NEAR* NPPELARRAY; /* ;Internal */
  2665. typedef PELARRAY FAR* LPPELARRAY; /* ;Internal */
  2666. /* ;Internal */
  2667. HBITMAP WINAPI CreateBitmap(int, int, UINT, UINT, const void FAR*);
  2668. HBITMAP WINAPI CreateBitmapIndirect(BITMAP FAR* );
  2669. HBITMAP WINAPI CreateCompatibleBitmap(HDC, int, int);
  2670. HBITMAP WINAPI CreateDiscardableBitmap(HDC, int, int);
  2671. HBITMAP WINAPI CreateDIBitmap(HDC, BITMAPINFOHEADER FAR*, DWORD, const void FAR*, BITMAPINFO FAR*, UINT);
  2672. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  2673. HBITMAP WINAPI CreateDIBSection(HDC, CONST BITMAPINFO FAR*, UINT, LPVOID FAR*, DWORD, DWORD); /* ;Internal 4.0 */
  2674. UINT WINAPI SetDIBColorTable(HDC, UINT, UINT, const RGBQUAD FAR *); /* ;Internal 4.0 */
  2675. UINT WINAPI GetDIBColorTable(HDC, UINT, UINT, LPRGBQUAD); /* ;Internal 4.0 */
  2676. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  2677. /* ;Internal 4.0 */
  2678. #ifdef tagWND // ;Internal
  2679. HBITMAP WINAPI OwnerLoadBitmap(HINSTANCE, LPCSTR, HANDLE); // ;Internal
  2680. #else // ;Internal
  2681. HBITMAP WINAPI LoadBitmap(HINSTANCE, LPCSTR);
  2682. #endif // ;Internal
  2683. /* DIB color table identifiers */
  2684. #define DIB_RGB_COLORS 0
  2685. #define DIB_PAL_COLORS 1
  2686. /* constants for CreateDIBitmap */
  2687. #define CBM_INIT 0x00000004L
  2688. #endif /* NOBITMAP */
  2689. #ifndef NORASTEROPS
  2690. /* Binary raster ops */
  2691. #define R2_BLACK 1
  2692. #define R2_NOTMERGEPEN 2
  2693. #define R2_MASKNOTPEN 3
  2694. #define R2_NOTCOPYPEN 4
  2695. #define R2_MASKPENNOT 5
  2696. #define R2_NOT 6
  2697. #define R2_XORPEN 7
  2698. #define R2_NOTMASKPEN 8
  2699. #define R2_MASKPEN 9
  2700. #define R2_NOTXORPEN 10
  2701. #define R2_NOP 11
  2702. #define R2_MERGENOTPEN 12
  2703. #define R2_COPYPEN 13
  2704. #define R2_MERGEPENNOT 14
  2705. #define R2_MERGEPEN 15
  2706. #define R2_WHITE 16
  2707. /* Ternary raster operations */
  2708. #define SRCCOPY 0x00CC0020L
  2709. #define SRCPAINT 0x00EE0086L
  2710. #define SRCAND 0x008800C6L
  2711. #define SRCINVERT 0x00660046L
  2712. #define SRCERASE 0x00440328L
  2713. #define NOTSRCCOPY 0x00330008L
  2714. #define NOTSRCERASE 0x001100A6L
  2715. #define MERGECOPY 0x00C000CAL
  2716. #define MERGEPAINT 0x00BB0226L
  2717. #define PATCOPY 0x00F00021L
  2718. #define PATOR 0x00FA0089L
  2719. #define PATPAINT 0x00FB0A09L
  2720. #define PATINVERT 0x005A0049L
  2721. #define DSTINVERT 0x00550009L
  2722. #define BLACKNESS 0x00000042L
  2723. #define WHITENESS 0x00FF0062L
  2724. #define SRCSTENCIL 0x00B8074AL
  2725. #define SRCINVSTENCIL 0x00E20746L
  2726. #endif /* NORASTEROPS */
  2727. #ifndef NOBITMAP
  2728. BOOL WINAPI BitBlt(HDC, int, int, int, int, HDC, int, int, DWORD);
  2729. BOOL WINAPI PatBlt(HDC, int, int, int, int, DWORD);
  2730. BOOL WINAPI StretchBlt(HDC, int, int, int, int, HDC, int, int, int, int, DWORD);
  2731. int WINAPI StretchDIBits(HDC, int, int, int, int, int,
  2732. int, int, int, const void FAR*, LPBITMAPINFO, UINT, DWORD);
  2733. COLORREF WINAPI SetPixel(HDC, int, int, COLORREF);
  2734. COLORREF WINAPI GetPixel(HDC, int, int);
  2735. /* StretchBlt() Modes */
  2736. #define BLACKONWHITE 1
  2737. #define WHITEONBLACK 2
  2738. #define COLORONCOLOR 3
  2739. /* new StretchBlt() Modes (simpler names) */
  2740. #define STRETCH_ANDSCANS 1
  2741. #define STRETCH_ORSCANS 2
  2742. #define STRETCH_DELETESCANS 3
  2743. // ;Internal
  2744. // #define HALFTONE 4 /* NT */ ;Internal
  2745. // #define STRETCH_HALFSCANS 4 /* NT */ ;Internal
  2746. // ;Internal
  2747. int WINAPI SetStretchBltMode(HDC, int);
  2748. int WINAPI GetStretchBltMode(HDC);
  2749. DWORD WINAPI SetBitmapDimension(HBITMAP, int, int);
  2750. DWORD WINAPI GetBitmapDimension(HBITMAP);
  2751. #if (WINVER >= 0x030a)
  2752. BOOL WINAPI SetBitmapDimensionEx(HBITMAP, int, int, SIZE FAR*);
  2753. BOOL WINAPI GetBitmapDimensionEx(HBITMAP, SIZE FAR*);
  2754. #endif /* WINVER >= 0x030a */
  2755. int WINAPI SetROP2(HDC, int);
  2756. int WINAPI GetROP2(HDC);
  2757. LONG WINAPI SetBitmapBits(HBITMAP, DWORD, const void FAR*);
  2758. LONG WINAPI GetBitmapBits(HBITMAP, LONG, void FAR*);
  2759. int WINAPI SetDIBits(HDC, HBITMAP, UINT, UINT, const void FAR*, BITMAPINFO FAR*, UINT);
  2760. int WINAPI GetDIBits(HDC, HBITMAP, UINT, UINT, void FAR*, BITMAPINFO FAR*, UINT);
  2761. int WINAPI SetDIBitsToDevice(HDC, int, int, int, int, int, int, UINT, UINT,
  2762. void FAR*, BITMAPINFO FAR*, UINT);
  2763. #endif /* NOBITMAP */
  2764. /****** Metafile support ****************************************************/
  2765. #ifndef NOMETAFILE
  2766. DECLARE_HANDLE(HMETAFILE);
  2767. HDC WINAPI CreateMetaFile(LPCSTR);
  2768. HMETAFILE WINAPI CloseMetaFile(HDC);
  2769. HMETAFILE WINAPI GetMetaFile(LPCSTR);
  2770. BOOL WINAPI DeleteMetaFile(HMETAFILE);
  2771. HMETAFILE WINAPI CopyMetaFile(HMETAFILE, LPCSTR);
  2772. BOOL WINAPI PlayMetaFile(HDC, HMETAFILE);
  2773. HGLOBAL WINAPI GetMetaFileBits(HMETAFILE);
  2774. HMETAFILE WINAPI SetMetaFileBits(HGLOBAL);
  2775. #if (WINVER >= 0x030a)
  2776. HMETAFILE WINAPI SetMetaFileBitsBetter(HGLOBAL);
  2777. #endif /* WINVER >= 0x030a */
  2778. /* Clipboard Metafile Picture Structure */
  2779. typedef struct tagMETAFILEPICT
  2780. {
  2781. int mm;
  2782. int xExt;
  2783. int yExt;
  2784. HMETAFILE hMF;
  2785. } METAFILEPICT;
  2786. typedef METAFILEPICT FAR* LPMETAFILEPICT;
  2787. typedef struct tagMETAHEADER
  2788. {
  2789. UINT mtType;
  2790. UINT mtHeaderSize;
  2791. UINT mtVersion;
  2792. DWORD mtSize;
  2793. UINT mtNoObjects;
  2794. DWORD mtMaxRecord;
  2795. UINT mtNoParameters;
  2796. } METAHEADER;
  2797. typedef struct tagHANDLETABLE
  2798. {
  2799. HGDIOBJ objectHandle[1];
  2800. } HANDLETABLE;
  2801. typedef HANDLETABLE* PHANDLETABLE;
  2802. typedef HANDLETABLE FAR* LPHANDLETABLE;
  2803. typedef struct tagMETARECORD
  2804. {
  2805. DWORD rdSize;
  2806. UINT rdFunction;
  2807. UINT rdParm[1];
  2808. } METARECORD;
  2809. typedef METARECORD* PMETARECORD;
  2810. typedef METARECORD FAR* LPMETARECORD;
  2811. /* Metafile Functions */
  2812. #define META_SETBKCOLOR 0x0201
  2813. #define META_SETBKMODE 0x0102
  2814. #define META_SETMAPMODE 0x0103
  2815. #define META_SETROP2 0x0104
  2816. #define META_SETRELABS 0x0105
  2817. #define META_SETPOLYFILLMODE 0x0106
  2818. #define META_SETSTRETCHBLTMODE 0x0107
  2819. #define META_SETTEXTCHAREXTRA 0x0108
  2820. #define META_SETTEXTCOLOR 0x0209
  2821. #define META_SETTEXTJUSTIFICATION 0x020A
  2822. #define META_SETWINDOWORG 0x020B
  2823. #define META_SETWINDOWEXT 0x020C
  2824. #define META_SETVIEWPORTORG 0x020D
  2825. #define META_SETVIEWPORTEXT 0x020E
  2826. #define META_OFFSETWINDOWORG 0x020F
  2827. #define META_SCALEWINDOWEXT 0x0410
  2828. #define META_OFFSETVIEWPORTORG 0x0211
  2829. #define META_SCALEVIEWPORTEXT 0x0412
  2830. #define META_LINETO 0x0213
  2831. #define META_MOVETO 0x0214
  2832. #define META_EXCLUDECLIPRECT 0x0415
  2833. #define META_INTERSECTCLIPRECT 0x0416
  2834. #define META_ARC 0x0817
  2835. #define META_ELLIPSE 0x0418
  2836. #define META_FLOODFILL 0x0419
  2837. #define META_PIE 0x081A
  2838. #define META_RECTANGLE 0x041B
  2839. #define META_ROUNDRECT 0x061C
  2840. #define META_PATBLT 0x061D
  2841. #define META_SAVEDC 0x001E
  2842. #define META_SETPIXEL 0x041F
  2843. #define META_OFFSETCLIPRGN 0x0220
  2844. #define META_TEXTOUT 0x0521
  2845. #define META_BITBLT 0x0922
  2846. #define META_STRETCHBLT 0x0B23
  2847. #define META_POLYGON 0x0324
  2848. #define META_POLYLINE 0x0325
  2849. #define META_ESCAPE 0x0626
  2850. #define META_RESTOREDC 0x0127
  2851. #define META_FILLREGION 0x0228
  2852. #define META_FRAMEREGION 0x0429
  2853. #define META_INVERTREGION 0x012A
  2854. #define META_PAINTREGION 0x012B
  2855. #define META_SELECTCLIPREGION 0x012C
  2856. #define META_SELECTOBJECT 0x012D
  2857. #define META_SETTEXTALIGN 0x012E
  2858. #define META_DRAWTEXT 0x062F
  2859. #define META_CHORD 0x0830
  2860. #define META_SETMAPPERFLAGS 0x0231
  2861. #define META_EXTTEXTOUT 0x0a32
  2862. #define META_SETDIBTODEV 0x0d33
  2863. #define META_SELECTPALETTE 0x0234
  2864. #define META_REALIZEPALETTE 0x0035
  2865. #define META_ANIMATEPALETTE 0x0436
  2866. #define META_SETPALENTRIES 0x0037
  2867. #define META_POLYPOLYGON 0x0538
  2868. #define META_RESIZEPALETTE 0x0139
  2869. #define META_DIBBITBLT 0x0940
  2870. #define META_DIBSTRETCHBLT 0x0b41
  2871. #define META_DIBCREATEPATTERNBRUSH 0x0142
  2872. #define META_STRETCHDIB 0x0f43
  2873. #define META_EXTFLOODFILL 0x0548
  2874. #define META_RESETDC 0x014C
  2875. #define META_STARTDOC 0x014D
  2876. #define META_STARTPAGE 0x004F
  2877. #define META_ENDPAGE 0x0050
  2878. #define META_ABORTDOC 0x0052
  2879. #define META_ENDDOC 0x005E
  2880. #define META_DELETEOBJECT 0x01f0
  2881. #define META_CREATEPALETTE 0x00f7
  2882. #define META_CREATEBRUSH 0x00F8
  2883. #define META_CREATEPATTERNBRUSH 0x01F9
  2884. #define META_CREATEPENINDIRECT 0x02FA
  2885. #define META_CREATEFONTINDIRECT 0x02FB
  2886. #define META_CREATEBRUSHINDIRECT 0x02FC
  2887. #define META_CREATEBITMAPINDIRECT 0x02FD
  2888. #define META_CREATEBITMAP 0x06FE
  2889. #define META_CREATEREGION 0x06FF
  2890. void WINAPI PlayMetaFileRecord(HDC, HANDLETABLE FAR*, METARECORD FAR*, UINT);
  2891. #ifdef STRICT
  2892. typedef int (CALLBACK* MFENUMPROC)(HDC, HANDLETABLE FAR*, METARECORD FAR*, int, LPARAM);
  2893. #else
  2894. typedef FARPROC MFENUMPROC;
  2895. #endif
  2896. BOOL WINAPI EnumMetaFile(HDC, HMETAFILE, MFENUMPROC, LPARAM);
  2897. #endif /* NOMETAFILE */
  2898. /****** Enhanced Metafile support *******************************************/ /* ;Internal 4.0 */
  2899. #if ((WINVER >= 0x0400) && !defined(NOGDI) && !defined(NOMETAFILE)) /* ;Internal 4.0 */
  2900. /* ;Internal 4.0 */
  2901. typedef struct tagMRMETAFILE /* ;Internal 4.0 */
  2902. { /* ;Internal 4.0 */
  2903. DWORD iType; /* ;Internal 4.0 */
  2904. DWORD nSize; /* ;Internal 4.0 */
  2905. RECTL rclBounds; /* ;Internal 4.0 */
  2906. RECTL rclFrame; /* ;Internal 4.0 */
  2907. DWORD dSignature; /* ;Internal 4.0 */
  2908. DWORD nVersion; /* ;Internal 4.0 */
  2909. DWORD nBytes; /* ;Internal 4.0 */
  2910. DWORD nRecords; /* ;Internal 4.0 */
  2911. WORD nHandles; /* ;Internal 4.0 */
  2912. WORD sReserved; /* ;Internal 4.0 */
  2913. DWORD nDescription; /* ;Internal 4.0 */
  2914. DWORD offDescription; /* ;Internal 4.0 */
  2915. DWORD nPalEntries; /* ;Internal 4.0 */
  2916. SIZEL szlDevice; /* ;Internal 4.0 */
  2917. SIZEL szlMillimeters; /* ;Internal 4.0 */
  2918. /* ;Internal 4.0 */
  2919. } MRMETAFILE, NEAR* PMRMETAFILE, FAR* LPMRMETAFILE; /* ;Internal 4.0 */
  2920. /* ;Internal 4.0 */
  2921. typedef struct tagENHMETARECORD /* ;Internal 4.0 */
  2922. { /* ;Internal 4.0 */
  2923. DWORD iType; /* ;Internal 4.0 */
  2924. DWORD nSize; /* ;Internal 4.0 */
  2925. DWORD dParm[1]; /* ;Internal 4.0 */
  2926. } ENHMETARECORD, NEAR* PENHMETARECORD, FAR* LPENHMETARECORD; /* ;Internal 4.0 */
  2927. /* ;Internal 4.0 */
  2928. /* MRMETAFILE constants */ /* ;Internal 4.0 */
  2929. /* ;Internal 4.0 */
  2930. #define ENHMETA_SIGNATURE 0x464D4520 /* Mandatory signature. */ /* ;Internal 4.0 */
  2931. /* ;Internal 4.0 */
  2932. /* Stock object flag used in the object handle index in the enhanced */ /* ;Internal 4.0 */
  2933. /* metafile records. */ /* ;Internal 4.0 */
  2934. /* E.g. The object handle index (META_STOCK_OBJECT | BLACK_BRUSH) */ /* ;Internal 4.0 */
  2935. /* represents the stock object BLACK_BRUSH. */ /* ;Internal 4.0 */
  2936. /* ;Internal 4.0 */
  2937. #define ENHMETA_STOCK_OBJECT 0x80000000L /* ;Internal 4.0 */
  2938. /* ;Internal 4.0 */
  2939. typedef HANDLE HENHMETAFILE; /* ;Internal 4.0 */
  2940. /* ;Internal 4.0 */
  2941. typedef LONG INT32; /* Signed or unsigned integers under NT which must */ /* ;Internal 4.0 */
  2942. typedef ULONG UINT32; /* always remain 32-bits under Chicago. */ /* ;Internal 4.0 */
  2943. /* ;Internal 4.0 */
  2944. typedef INT32 (CALLBACK* ENHMFENUMPROC)(HDC, LPHANDLETABLE, LPENHMETARECORD, INT32, LPARAM); /* ;Internal 4.0 */
  2945. /* ;Internal 4.0 */
  2946. /* Enhanced metafile APIs */ /* ;Internal 4.0 */
  2947. /* ;Internal 4.0 */
  2948. HENHMETAFILE WINAPI CloseEnhMetaFile(HDC); /* ;Internal 4.0 */
  2949. HENHMETAFILE WINAPI CopyEnhMetaFile(HENHMETAFILE, LPCSTR); /* ;Internal 4.0 */
  2950. HDC WINAPI CreateEnhMetaFile(HDC, LPCSTR, LPCRECTL, LPCSTR); /* ;Internal 4.0 */
  2951. BOOL WINAPI DeleteEnhMetaFile(HENHMETAFILE); /* ;Internal 4.0 */
  2952. BOOL WINAPI EnumEnhMetaFile(HDC, HENHMETAFILE, ENHMFENUMPROC, LPVOID, LPCRECTL); /* ;Internal 4.0 */
  2953. BOOL WINAPI GdiComment(HDC, UINT32, LPBYTE); /* ;Internal 4.0 */
  2954. HENHMETAFILE WINAPI GetEnhMetaFile(LPCSTR); /* ;Internal 4.0 */
  2955. UINT32 WINAPI GetEnhMetaFileBits(HENHMETAFILE, UINT32, LPBYTE); /* ;Internal 4.0 */
  2956. UINT32 WINAPI GetEnhMetaFileDescription(HENHMETAFILE, UINT32, LPSTR); /* ;Internal 4.0 */
  2957. UINT32 WINAPI GetEnhMetaFileHeader(HENHMETAFILE, UINT32, LPMRMETAFILE); /* ;Internal 4.0 */
  2958. UINT32 WINAPI GetEnhMetaFilePaletteEntries(HENHMETAFILE, UINT32, LPPALETTEENTRY); /* ;Internal 4.0 */
  2959. UINT32 WINAPI GetWinMetaFileBits(HENHMETAFILE, UINT32, LPBYTE, int, HDC); /* ;Internal 4.0 */
  2960. BOOL WINAPI PlayEnhMetaFile(HDC, HENHMETAFILE, LPCRECTL); /* ;Internal 4.0 */
  2961. BOOL WINAPI PlayEnhMetaFileRecord(HDC, LPHANDLETABLE, LPENHMETARECORD, UINT32); /* ;Internal 4.0 */
  2962. HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT32, LPCBYTE); /* ;Internal 4.0 */
  2963. HENHMETAFILE WINAPI SetWinMetaFileBits(UINT32, LPBYTE, HDC, LPMETAFILEPICT); /* ;Internal 4.0 */
  2964. int WINAPI SetMetaRgn(HDC); /* ;Internal 4.0 */
  2965. /* ;Internal 4.0 */
  2966. #endif /* WINVER >= 0x0400 etc. */ /* ;Internal 4.0 */
  2967. /****** Printing support ****************************************************/
  2968. #ifdef STRICT
  2969. typedef BOOL (CALLBACK* ABORTPROC)(HDC, int);
  2970. #else
  2971. typedef FARPROC ABORTPROC;
  2972. #endif
  2973. #if (WINVER >= 0x030a)
  2974. int WINAPI SetAbortProc(HDC, ABORTPROC);
  2975. HANDLE WINAPI SpoolFile(LPSTR, LPSTR, LPSTR, LPSTR);
  2976. BOOL WINAPI QueryJob(HANDLE, int); /* ;Internal */
  2977. #endif /* WINVER >= 0x030a */
  2978. typedef struct {
  2979. short cbSize;
  2980. LPSTR lpszDocName;
  2981. LPSTR lpszOutput;
  2982. LPSTR lpszDatatype;
  2983. DWORD fwType;
  2984. } DOCINFO, FAR * LPDOCINFO;
  2985. /* bit flags for DOCINFO.fwType */
  2986. #define DI_APPBANDING 0x0001
  2987. #define DI_ROPS_READ_DESTINATION 0x0002 // ;will use rops that read destination
  2988. // ;pixel values to print the doc.
  2989. // ;Ex: R2_XORPEN, PATINVERT (DPx).
  2990. int WINAPI StartDoc(HDC, DOCINFO FAR*);
  2991. int WINAPI StartPage(HDC);
  2992. int WINAPI EndPage(HDC);
  2993. int WINAPI EndDoc(HDC);
  2994. int WINAPI AbortDoc(HDC);
  2995. BOOL WINAPI QueryAbort(HDC, int);
  2996. /* Spooler Error Codes */
  2997. #define SP_NOTREPORTED 0x4000
  2998. #define SP_ERROR (-1)
  2999. #define SP_APPABORT (-2)
  3000. #define SP_USERABORT (-3)
  3001. #define SP_OUTOFDISK (-4)
  3002. #define SP_OUTOFMEMORY (-5)
  3003. #define PR_JOBSTATUS 0x0000
  3004. #endif /* NOGDI */
  3005. #ifndef NOGDI
  3006. /******* GDI Escape support *************************************************/
  3007. int WINAPI Escape(HDC, int, int, LPCSTR, void FAR*);
  3008. /* GDI Escapes */
  3009. #define NEWFRAME 1
  3010. #define ABORTDOC 2
  3011. #define NEXTBAND 3
  3012. #define SETCOLORTABLE 4
  3013. #define GETCOLORTABLE 5
  3014. #define FLUSHOUTPUT 6
  3015. #define DRAFTMODE 7
  3016. #define QUERYESCSUPPORT 8
  3017. #define SETABORTPROC 9
  3018. #define STARTDOC 10
  3019. #define ENDDOC 11
  3020. #define GETPHYSPAGESIZE 12
  3021. #define GETPRINTINGOFFSET 13
  3022. #define GETSCALINGFACTOR 14
  3023. #define MFCOMMENT 15
  3024. #define GETPENWIDTH 16
  3025. #define SETCOPYCOUNT 17
  3026. #define SELECTPAPERSOURCE 18
  3027. #define DEVICEDATA 19
  3028. #define PASSTHROUGH 19
  3029. #define GETTECHNOLGY 20
  3030. #define GETTECHNOLOGY 20
  3031. #define SETLINECAP 21
  3032. #define SETLINEJOIN 22
  3033. #define SETMITERLIMIT 23
  3034. #define BANDINFO 24
  3035. #define DRAWPATTERNRECT 25
  3036. #define GETVECTORPENSIZE 26
  3037. #define GETVECTORBRUSHSIZE 27
  3038. #define ENABLEDUPLEX 28
  3039. #define GETSETPAPERBINS 29
  3040. #define GETSETPRINTORIENT 30
  3041. #define ENUMPAPERBINS 31
  3042. #define SETDIBSCALING 32
  3043. #define EPSPRINTING 33
  3044. #define ENUMPAPERMETRICS 34
  3045. #define GETSETPAPERMETRICS 35
  3046. #define POSTSCRIPT_DATA 37
  3047. #define POSTSCRIPT_IGNORE 38
  3048. #define MOUSETRAILS 39
  3049. #define GETEXTENDEDTEXTMETRICS 256
  3050. #define GETEXTENTTABLE 257
  3051. #define GETPAIRKERNTABLE 258
  3052. #define GETTRACKKERNTABLE 259
  3053. #define EXTTEXTOUT 512
  3054. #define GETFACENAME 513
  3055. #define ENABLERELATIVEWIDTHS 768
  3056. #define ENABLEPAIRKERNING 769
  3057. #define SETKERNTRACK 770
  3058. #define SETALLJUSTVALUES 771
  3059. #define SETCHARSET 772
  3060. #define STRETCHBLT 2048
  3061. #define GETSETSCREENPARAMS 3072
  3062. #define QUERYDIBSUPPORT 3073
  3063. #define QDI_SETDIBITS 0x0001
  3064. #define QDI_GETDIBITS 0x0002
  3065. #define QDI_DIBTOSCREEN 0x0004
  3066. #define QDI_STRETCHDIB 0x0008
  3067. #define BEGIN_PATH 4096
  3068. #define CLIP_TO_PATH 4097
  3069. #define END_PATH 4098
  3070. #define EXT_DEVICE_CAPS 4099
  3071. #define RESTORE_CTM 4100
  3072. #define SAVE_CTM 4101
  3073. #define SET_ARC_DIRECTION 4102
  3074. #define SET_BACKGROUND_COLOR 4103
  3075. #define SET_POLY_MODE 4104
  3076. #define SET_SCREEN_ANGLE 4105
  3077. #define SET_SPREAD 4106
  3078. #define TRANSFORM_CTM 4107
  3079. #define SET_CLIP_BOX 4108
  3080. #define SET_BOUNDS 4109
  3081. #endif /* NOGDI */
  3082. /****** USER typedefs, structures, and functions *****************************/
  3083. #ifdef tagWND // ;Internal
  3084. #define BASED __based32(__segname("_DATA")) // ;Internal
  3085. #ifdef DEBUG // ;Internal
  3086. #define HWND HWND_16 // ;Internal
  3087. #define HWNDC HWND_16 // ;Internal
  3088. #else // ;Internal
  3089. typedef struct tagWND BASED *HWND; // ;Internal
  3090. typedef HWND HWNDC; // ;Internal
  3091. #endif // ;Internal
  3092. typedef UINT HWND_16; // ;Internal
  3093. #else // ;Internal
  3094. DECLARE_HANDLE(HWND);
  3095. #endif // ;Internal
  3096. #ifndef NOUSER
  3097. #ifdef tagWND // ;Internal
  3098. #ifdef DEBUG // ;Internal
  3099. #define HMENU HMENU_16 // ;Internal
  3100. #else // ;Internal
  3101. typedef struct tagMENU FAR* HMENU; // ;Internal
  3102. #endif // ;Internal
  3103. typedef UINT HMENU_16; // ;Internal
  3104. #else // ;Internal
  3105. DECLARE_HANDLE(HMENU);
  3106. #endif // ;Internal
  3107. DECLARE_HANDLE(HICON);
  3108. typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */
  3109. /****** System Metrics *******************************************************/
  3110. #ifndef NOSYSMETRICS
  3111. int WINAPI GetSystemMetrics(int);
  3112. /* GetSystemMetrics() codes */
  3113. #define SM_CXSCREEN 0
  3114. #define SM_CYSCREEN 1
  3115. #define SM_CXVSCROLL 2
  3116. #define SM_CYHSCROLL 3
  3117. #define SM_CYCAPTION 4
  3118. #define SM_CXBORDER 5
  3119. #define SM_CYBORDER 6
  3120. #define SM_CXFIXEDFRAME 7
  3121. #define SM_CYFIXEDFRAME 8
  3122. #define SM_CYVTHUMB 9
  3123. #define SM_CXHTHUMB 10
  3124. #define SM_CXICON 11
  3125. #define SM_CYICON 12
  3126. #define SM_CXCURSOR 13
  3127. #define SM_CYCURSOR 14
  3128. #define SM_CYMENU 15
  3129. #define SM_CXFULLSCREEN 16
  3130. #define SM_CYFULLSCREEN 17
  3131. #define SM_CYKANJIWINDOW 18
  3132. #define SM_MOUSEPRESENT 19
  3133. #define SM_CYVSCROLL 20
  3134. #define SM_CXHSCROLL 21
  3135. #define SM_DEBUG 22
  3136. #define SM_SWAPBUTTON 23
  3137. #define SM_RESERVED1 24
  3138. #define SM_RESERVED2 25
  3139. #define SM_RESERVED3 26
  3140. #define SM_RESERVED4 27
  3141. #define SM_CXMIN 28
  3142. #define SM_CYMIN 29
  3143. #define SM_CXSIZE 30
  3144. #define SM_CYSIZE 31
  3145. #define SM_CXSIZEFRAME 32
  3146. #define SM_CYSIZEFRAME 33
  3147. #define SM_CXMINTRACK 34
  3148. #define SM_CYMINTRACK 35
  3149. #if (WINVER >= 0x030a)
  3150. #define SM_CXDOUBLECLK 36
  3151. #define SM_CYDOUBLECLK 37
  3152. #define SM_CXICONSPACING 38
  3153. #define SM_CYICONSPACING 39
  3154. #define SM_MENUDROPALIGNMENT 40
  3155. #define SM_PENWINDOWS 41
  3156. #define SM_DBCSENABLED 42
  3157. #define SM_CMOUSEBUTTONS 43
  3158. #define SM_SECURE 44
  3159. #endif /* WINVER >= 0x030a */
  3160. /* ;Internal 4.0 */
  3161. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  3162. #define SM_CXEDGE 45 /* ;Internal 4.0 */
  3163. #define SM_CYEDGE 46 /* ;Internal 4.0 */
  3164. #define SM_CXMINSPACING 47 /* ;Internal 4.0 */
  3165. #define SM_CYMINSPACING 48 /* ;Internal 4.0 */
  3166. #define SM_CXSMICON 49 /* ;Internal 4.0 */
  3167. #define SM_CYSMICON 50 /* ;Internal 4.0 */
  3168. #define SM_CYSMCAPTION 51 /* ;Internal 4.0 */
  3169. #define SM_CXSMSIZE 52 /* ;Internal 4.0 */
  3170. #define SM_CYSMSIZE 53 /* ;Internal 4.0 */
  3171. #define SM_CXMENUSIZE 54 /* ;Internal 4.0 */
  3172. #define SM_CYMENUSIZE 55 /* ;Internal 4.0 */
  3173. #define SM_ARRANGE 56 /* ;Internal 4.0 */
  3174. #define SM_CXMINIMIZED 57 /* ;Internal 4.0 */
  3175. #define SM_CYMINIMIZED 58 /* ;Internal 4.0 */
  3176. #define SM_CXMAXTRACK 59 /* ;Internal 4.0 */
  3177. #define SM_CYMAXTRACK 60 /* ;Internal 4.0 */
  3178. #define SM_CXMAXIMIZED 61 /* ;Internal 4.0 */
  3179. #define SM_CYMAXIMIZED 62 /* ;Internal 4.0 */
  3180. #define SM_NETWORK 63 /* ;Internal 4.0 */
  3181. #define SM_CLEANBOOT 67 /* ;Internal 4.0 */
  3182. #define SM_CXDRAG 68 /* ;Internal 4.0 */
  3183. #define SM_CYDRAG 69 /* ;Internal 4.0 */
  3184. #define SM_SHOWSOUNDS 70 /* ;Internal 4.0 */
  3185. #define SM_CXMENUCHECK 71 /* ;Internal 4.0 */
  3186. #define SM_CYMENUCHECK 72 /* ;Internal 4.0 */
  3187. #define SM_SLOWMACHINE 73 /* ;Internal 4.0 */
  3188. #define SM_MIDEASTENABLED 74 /* ;Internal 4.0 */
  3189. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  3190. #if (WINVER >= 0x040A)
  3191. #define SM_MOUSEWHEELPRESENT 75 // ;public_sur
  3192. #define SM_XVIRTUALSCREEN 76
  3193. #define SM_YVIRTUALSCREEN 77
  3194. #define SM_CXVIRTUALSCREEN 78
  3195. #define SM_CYVIRTUALSCREEN 79
  3196. #define SM_CMONITORS 80
  3197. #define SM_SAMEDISPLAYFORMAT 81
  3198. #endif /* WINVER >= 0x040A */
  3199. #define SM_CXDLGFRAME SM_CXFIXEDFRAME
  3200. #define SM_CYDLGFRAME SM_CYFIXEDFRAME
  3201. #define SM_CXFRAME SM_CXSIZEFRAME
  3202. #define SM_CYFRAME SM_CYSIZEFRAME
  3203. #define SM_CYCAPTIONICON SM_CYSMICON // ;Internal BOGUS TEMPORARY
  3204. #define SM_CYSMCAPTIONICON SM_CYSMICON // ;Internal BOGUS TEMPORARY
  3205. #define SM_CXWORKAREA SM_CXSCREEN // ;Internal BOGUS TEMPORARY
  3206. #define SM_CYWORKAREA SM_CYSCREEN // ;Internal BOGUS TEMPORARY
  3207. #define SM_XWORKAREA SM_CXBORDER // ;Internal BOGUS TEMPORARY
  3208. #define SM_YWORKAREA SM_CYBORDER // ;Internal BOGUS TEMPORARY
  3209. // WARNING: If you modify SM_CMETRICS or SM_MAX make sure you ;Internal
  3210. // modify the corresponding values in user.inc, user.api, ;Internal
  3211. // windows.inc and winuser.h ;Internal
  3212. #define SM_MAX 81 // ;Internal
  3213. #define SM_CMETRICS 82
  3214. #endif /* NOSYSMETRICS */
  3215. UINT WINAPI GetDoubleClickTime(void);
  3216. void WINAPI SetDoubleClickTime(UINT);
  3217. #define ARW_BOTTOMLEFT 0x0000 // ;Internal 4.0
  3218. #define ARW_BOTTOMRIGHT 0x0001 // ;Internal 4.0
  3219. #define ARW_TOPLEFT 0x0002 // ;Internal 4.0
  3220. #define ARW_TOPRIGHT 0x0003 // ;Internal 4.0
  3221. #define ARW_STARTMASK 0x0003 // ;Internal 4.0
  3222. #define ARW_STARTRIGHT 0x0001 // ;Internal 4.0
  3223. #define ARW_STARTTOP 0x0002 // ;Internal 4.0
  3224. // ;Internal 4.0
  3225. #define ARW_LEFT 0x0000 // ;Internal 4.0
  3226. #define ARW_RIGHT 0x0000 // ;Internal 4.0
  3227. #define ARW_UP 0x0004 // ;Internal 4.0
  3228. #define ARW_DOWN 0x0004 // ;Internal 4.0
  3229. #define ARW_HIDE 0x0008 // ;Internal 4.0
  3230. #define ARW_VALID 0x000F // ;Internal 4.0
  3231. #define ARW_ARRANGEMASK 0x0007 // ;Internal 4.0
  3232. // ;Internal 4.0
  3233. #define MMI_MINSIZE 0 // ;Internal 4.0
  3234. #define MMI_MAXSIZE 1 // ;Internal 4.0
  3235. #define MMI_MAXPOS 2 // ;Internal 4.0
  3236. #define MMI_MINTRACK 3 // ;Internal 4.0
  3237. #define MMI_MAXTRACK 4 // ;Internal 4.0
  3238. /****** System Parameters support ********************************************/
  3239. #if (WINVER >= 0x030a)
  3240. #ifndef NOSYSTEMPARAMSINFO
  3241. BOOL WINAPI SystemParametersInfo(UINT, UINT, VOID FAR*, UINT);
  3242. #if (WINVER >= 0x0400) // ;Internal 4.0
  3243. // ;Internal 4.0
  3244. #ifndef NOGDI // ;Internal 4.0
  3245. typedef struct tagCOMMONFONT // ;Internal 4.0
  3246. { // ;Internal 4.0
  3247. BYTE lfItalic; // ;Internal 4.0
  3248. BYTE lfUnderline; // ;Internal 4.0
  3249. BYTE lfStrikeOut; // ;Internal 4.0
  3250. BYTE lfCharSet; // ;Internal 4.0
  3251. BYTE lfOutPrecision; // ;Internal 4.0
  3252. BYTE lfClipPrecision; // ;Internal 4.0
  3253. BYTE lfQuality; // ;Internal 4.0
  3254. BYTE lfPitchAndFamily; // ;Internal 4.0
  3255. char lfFaceName[LF_FACESIZE]; // ;Internal 4.0
  3256. } COMMONFONT, FAR *LPCOMMONFONT; // ;Internal 4.0
  3257. // ;Internal 4.0
  3258. typedef struct tagLOGFONT_32 // ;Internal 4.0
  3259. { // ;Internal 4.0
  3260. LONG lfHeight; // ;Internal 4.0
  3261. LONG lfWidth; // ;Internal 4.0
  3262. LONG lfEscapement; // ;Internal 4.0
  3263. LONG lfOrientation; // ;Internal 4.0
  3264. LONG lfWeight; // ;Internal 4.0
  3265. COMMONFONT lfCommon; // ;Internal 4.0
  3266. } LOGFONT_32, *PLOGFONT_32, FAR *LPLOGFONT_32; // ;Internal 4.0
  3267. // ;Internal 4.0
  3268. #define METRICS_USEDEFAULT -1 // ;Internal 4.0
  3269. typedef struct tagNONCLIENTMETRICS // ;Internal 4.0
  3270. { // ;Internal 4.0
  3271. DWORD cbSize; // ;Internal 4.0
  3272. LONG iBorderWidth; // ;Internal 4.0
  3273. LONG iScrollWidth; // ;Internal 4.0
  3274. LONG iScrollHeight; // ;Internal 4.0
  3275. LONG iCaptionWidth; // ;Internal 4.0
  3276. LONG iCaptionHeight; // ;Internal 4.0
  3277. LOGFONT_32 lfCaptionFont; // ;Internal 4.0
  3278. LONG iSmCaptionWidth; // ;Internal 4.0
  3279. LONG iSmCaptionHeight; // ;Internal 4.0
  3280. LOGFONT_32 lfSmCaptionFont; // ;Internal 4.0
  3281. LONG iMenuWidth; // ;Internal 4.0
  3282. LONG iMenuHeight; // ;Internal 4.0
  3283. LOGFONT_32 lfMenuFont; // ;Internal 4.0
  3284. LOGFONT_32 lfStatusFont; // ;Internal 4.0
  3285. LOGFONT_32 lfMessageFont; // ;Internal 4.0
  3286. } NONCLIENTMETRICS, FAR* LPNONCLIENTMETRICS; // ;Internal 4.0
  3287. // ;Internal 4.0
  3288. typedef struct tagICONMETRICS // ;Internal 4.0
  3289. { // ;Internal 4.0
  3290. DWORD cbSize; // ;Internal 4.0
  3291. LONG iHorzSpacing; // ;Internal 4.0
  3292. LONG iVertSpacing; // ;Internal 4.0
  3293. LONG iTitleWrap; // ;Internal 4.0
  3294. LOGFONT_32 lfFont; // ;Internal 4.0
  3295. } ICONMETRICS, FAR *LPICONMETRICS; // ;Internal 4.0
  3296. #endif /* NOGDI */ // ;Internal 4.0
  3297. // ;Internal 4.0
  3298. typedef struct tagMINIMIZEDMETRICS // ;Internal 4.0
  3299. { // ;Internal 4.0
  3300. DWORD cbSize; // ;Internal 4.0
  3301. LONG iWidth; // ;Internal 4.0
  3302. LONG iHorzGap; // ;Internal 4.0
  3303. LONG iVertGap; // ;Internal 4.0
  3304. LONG iArrange; // ;Internal 4.0
  3305. } MINIMIZEDMETRICS, FAR *LPMINIMIZEDMETRICS; // ;Internal 4.0
  3306. // ;Internal 4.0
  3307. typedef struct tagANIMATIONINFO // ;Internal 4.0
  3308. { // ;Internal 4.0
  3309. DWORD cbSize; // ;Internal 4.0
  3310. LONG iMinAnimate; // ;Internal 4.0
  3311. } ANIMATIONINFO, FAR *LPANIMATIONINFO; // ;Internal 4.0
  3312. // ;Internal 4.0
  3313. #endif /* WINVER >= 0x0400 */ // ;Internal 4.0
  3314. // ;Internal 4.0
  3315. #define SPI_GETBEEP 1
  3316. #define SPI_SETBEEP 2
  3317. #define SPI_GETMOUSE 3
  3318. #define SPI_SETMOUSE 4
  3319. #define SPI_GETBORDER 5
  3320. #define SPI_SETBORDER 6
  3321. #define SPI_TIMEOUTS 7 // ;Internal
  3322. #define SPI_KANJIMENU 8 // ;Internal
  3323. #define SPI_GETKEYBOARDSPEED 10
  3324. #define SPI_SETKEYBOARDSPEED 11
  3325. #define SPI_LANGDRIVER 12
  3326. #define SPI_ICONHORIZONTALSPACING 13
  3327. #define SPI_GETSCREENSAVETIMEOUT 14
  3328. #define SPI_SETSCREENSAVETIMEOUT 15
  3329. #define SPI_GETSCREENSAVEACTIVE 16
  3330. #define SPI_SETSCREENSAVEACTIVE 17
  3331. #define SPI_GETGRIDGRANULARITY 18
  3332. #define SPI_SETGRIDGRANULARITY 19
  3333. #define SPI_SETDESKWALLPAPER 20
  3334. #define SPI_SETDESKPATTERN 21
  3335. #define SPI_GETKEYBOARDDELAY 22
  3336. #define SPI_SETKEYBOARDDELAY 23
  3337. #define SPI_ICONVERTICALSPACING 24
  3338. #define SPI_GETICONTITLEWRAP 25
  3339. #define SPI_SETICONTITLEWRAP 26
  3340. #define SPI_GETMENUDROPALIGNMENT 27
  3341. #define SPI_SETMENUDROPALIGNMENT 28
  3342. #define SPI_SETDOUBLECLKWIDTH 29
  3343. #define SPI_SETDOUBLECLKHEIGHT 30
  3344. #define SPI_GETICONTITLELOGFONT 31
  3345. #define SPI_SETDOUBLECLICKTIME 32
  3346. #define SPI_SETMOUSEBUTTONSWAP 33
  3347. #define SPI_SETICONTITLELOGFONT 34
  3348. #define SPI_GETFASTTASKSWITCH 35
  3349. #define SPI_SETFASTTASKSWITCH 36
  3350. #define SPI_SETDRAGFULLWINDOWS 37 // ;Internal NT
  3351. #define SPI_GETDRAGFULLWINDOWS 38 // ;Internal NT
  3352. #define SPI_GETNONCLIENTMETRICS 41 // ;Internal 4.0
  3353. #define SPI_SETNONCLIENTMETRICS 42 // ;Internal 4.0
  3354. #define SPI_GETMINIMIZEDMETRICS 43 // ;Internal 4.0
  3355. #define SPI_SETMINIMIZEDMETRICS 44 // ;Internal 4.0
  3356. #define SPI_GETICONMETRICS 45 // ;Internal 4.0
  3357. #define SPI_SETICONMETRICS 46 // ;Internal 4.0
  3358. #define SPI_SETWORKAREA 47 // ;Internal 4.0
  3359. #define SPI_GETWORKAREA 48 // ;Internal 4.0
  3360. #define SPI_SETPENWINDOWS 49 // ;Internal 4.0
  3361. #define SPI_GETFILTERKEYS 50 // ;Internal 4.0
  3362. #define SPI_SETFILTERKEYS 51 // ;Internal 4.0
  3363. #define SPI_GETTOGGLEKEYS 52 // ;Internal 4.0
  3364. #define SPI_SETTOGGLEKEYS 53 // ;Internal 4.0
  3365. #define SPI_GETMOUSEKEYS 54 // ;Internal 4.0
  3366. #define SPI_SETMOUSEKEYS 55 // ;Internal 4.0
  3367. #define SPI_GETSHOWSOUNDS 56 // ;Internal 4.0
  3368. #define SPI_SETSHOWSOUNDS 57 // ;Internal 4.0
  3369. #define SPI_GETSTICKYKEYS 58 // ;Internal 4.0
  3370. #define SPI_SETSTICKYKEYS 59 // ;Internal 4.0
  3371. #define SPI_GETACCESSTIMEOUT 60 // ;Internal 4.0
  3372. #define SPI_SETACCESSTIMEOUT 61 // ;Internal 4.0
  3373. #define SPI_GETSERIALKEYS 62 // ;Internal 4.0
  3374. #define SPI_SETSERIALKEYS 63 // ;Internal 4.0
  3375. #define SPI_GETSOUNDSENTRY 64 // ;Internal 4.0
  3376. #define SPI_SETSOUNDSENTRY 65 // ;Internal 4.0
  3377. #define SPI_GETHIGHCONTRAST 66 // ;Internal 4.0
  3378. #define SPI_SETHIGHCONTRAST 67 // ;Internal 4.0
  3379. #define SPI_GETKEYBOARDPREF 68 // ;Internal 4.0
  3380. #define SPI_SETKEYBOARDPREF 69 // ;Internal 4.0
  3381. #define SPI_GETSCREENREADER 70 // ;Internal 4.0
  3382. #define SPI_SETSCREENREADER 71 // ;Internal 4.0
  3383. #define SPI_GETANIMATION 72 // ;Internal 4.0
  3384. #define SPI_SETANIMATION 73 // ;Internal 4.0
  3385. #define SPI_GETFONTSMOOTHING 74 // ;Internal 4.0
  3386. #define SPI_SETFONTSMOOTHING 75 // ;Internal 4.0
  3387. #define SPI_SETDRAGWIDTH 76 // ;Internal 4.0
  3388. #define SPI_SETDRAGHEIGHT 77 // ;Internal 4.0
  3389. #define SPI_SETHANDHELD 78 // ;Internal 4.0
  3390. #define SPI_GETLOWPOWERTIMEOUT 79 // ;Internal 4.0
  3391. #define SPI_GETPOWEROFFTIMEOUT 80 // ;Internal 4.0
  3392. #define SPI_SETLOWPOWERTIMEOUT 81 // ;Internal 4.0
  3393. #define SPI_SETPOWEROFFTIMEOUT 82 // ;Internal 4.0
  3394. #define SPI_GETLOWPOWERACTIVE 83 // ;Internal 4.0
  3395. #define SPI_GETPOWEROFFACTIVE 84 // ;Internal 4.0
  3396. #define SPI_SETLOWPOWERACTIVE 85 // ;Internal 4.0
  3397. #define SPI_SETPOWEROFFACTIVE 86 // ;Internal 4.0
  3398. #define SPI_SETCURSORS 87 // ;Internal 4.0
  3399. #define SPI_SETICONS 88 // ;Internal 4.0
  3400. #define SPI_GETDEFAULTINPUTLANG 89 // ;Internal 4.0
  3401. #define SPI_SETDEFAULTINPUTLANG 90 // ;Internal 4.0
  3402. #define SPI_SETLANGTOGGLE 91 // ;Internal 4.0
  3403. #define SPI_GETWINDOWSEXTENSION 92 // ;Internal 4.0
  3404. #define SPI_SETMOUSETRAILS 93 // ;Internal 4.0
  3405. #define SPI_GETMOUSETRAILS 94 // ;Internal 4.0
  3406. #define SPI_GETSNAPTODEFBUTTON 95 // ;Internal NT
  3407. #define SPI_SETSNAPTODEFBUTTON 96 // ;internal NT
  3408. #define SPI_SETSCREENSAVERRUNNING 97 // ;Internal 4.0
  3409. #define SPI_GETMOUSEHOVERWIDTH 98 // ;internal
  3410. #define SPI_SETMOUSEHOVERWIDTH 99 // ;internal
  3411. #define SPI_GETMOUSEHOVERHEIGHT 100 // ;internal
  3412. #define SPI_SETMOUSEHOVERHEIGHT 101 // ;internal
  3413. #define SPI_GETMOUSEHOVERTIME 102 // ;internal
  3414. #define SPI_SETMOUSEHOVERTIME 103 // ;internal
  3415. #define SPI_GETWHEELSCROLLLINES 104 // ;internal
  3416. #define SPI_SETWHEELSCROLLLINES 105 // ;internal
  3417. #define SPI_GETMENUSHOWDELAY 106 // ;internal
  3418. #define SPI_SETMENUSHOWDELAY 107 // ;internal
  3419. #define SPI_GETUSERPREFERENCE 108 // ;internal
  3420. #define SPI_SETUSERPREFERENCE 109 // ;internal
  3421. #define SPI_GETSHOWIMEUI 110 // ;internal
  3422. #define SPI_SETSHOWIMEUI 111 // ;internal
  3423. #define SPI_GETMOUSESPEED 112 // ;internal
  3424. #define SPI_SETMOUSESPEED 113 // ;internal
  3425. #define SPI_GETSCREENSAVERRUNNING 114 // ;internal
  3426. #define SPI_MAX 115 // ;internal
  3427. // Support Old name // ;Internal
  3428. #define SPI_SCREENSAVERRUNNING SPI_SETSCREENSAVERRUNNING // ;Internal
  3429. // // ;internal
  3430. // ADDING NEW SPI_* VALUES // ;internal
  3431. // If the value is a BOOL, // ;internal
  3432. // it should be added after SPI_STARTBOOLRANGE // ;internal
  3433. // If the value is a DWORD, // ;internal
  3434. // it should be added after SPI_STARTDWORDRANGE // ;internal
  3435. // If the value is a structure or a string, // ;internal
  3436. // go ahead and setup SPI_START*RANGE... // ;internal
  3437. // // ;internal
  3438. #if (WINVER >= 0x040A) // ;internal
  3439. // // ;internal
  3440. // If adding a new SPI value in the following ranges: // ;internal
  3441. // -You must define both SPI_GET* and // ;internal
  3442. // SPI_SET* using consecutive numbers // ;internal
  3443. // -The low order bit of SPI_GET* must be 0 // ;internal
  3444. // -The low order bit of SPI_SET* must be 1 // ;internal
  3445. // -Properly update SPI_MAX*RANGE // ;internal
  3446. // // ;internal
  3447. #define SPIF_SET 0x00000001 // ;internal
  3448. #define SPIF_BOOL 0x10000000 // ;internal
  3449. #define SPIF_DWORD 0x20000000 // ;internal
  3450. #define SPIF_RANGETYPEMASK 0x30000000 // ;internal
  3451. // // ;internal
  3452. // BOOLeans range. // ;internal
  3453. // For GET, pvParam is a pointer to a BOOL // ;internal
  3454. // For SET, pvParam is the value // ;internal
  3455. // // ;internal
  3456. #define SPI_STARTBOOLRANGE 0x10000000 // ;internal
  3457. #define SPI_GETACTIVEWINDOWTRACKING 0x10000000 // ;internal
  3458. #define SPI_SETACTIVEWINDOWTRACKING 0x10000001 // ;internal
  3459. #define SPI_GETMENUANIMATION 0x10000002 // ;internal
  3460. #define SPI_SETMENUANIMATION 0x10000003 // ;internal
  3461. #define SPI_GETCOMBOBOXANIMATION 0x10000004 // ;internal
  3462. #define SPI_SETCOMBOBOXANIMATION 0x10000005 // ;internal
  3463. #define SPI_GETLISTBOXSMOOTHSCROLLING 0x10000006 // ;internal
  3464. #define SPI_SETLISTBOXSMOOTHSCROLLING 0x10000007 // ;internal
  3465. #define SPI_GETGRADIENTCAPTIONS 0x10000008 // ;internal
  3466. #define SPI_SETGRADIENTCAPTIONS 0x10000009 // ;internal
  3467. #define SPI_GETMENUUNDERLINES 0x1000000A // ;internal
  3468. #define SPI_SETMENUUNDERLINES 0x1000000B // ;internal
  3469. #define SPI_GETACTIVEWNDTRKZORDER 0x1000000C // ;internal
  3470. #define SPI_SETACTIVEWNDTRKZORDER 0x1000000D // ;internal
  3471. #define SPI_GETHOTTRACKING 0x1000000E // ;internal
  3472. #define SPI_SETHOTTRACKING 0x1000000F // ;internal
  3473. #define SPI_MAXBOOLRANGE 0x10000010 // ;internal
  3474. #define SPI_BOOLRANGECOUNT ((SPI_MAXBOOLRANGE - SPI_STARTBOOLRANGE) / 2) // ;internal
  3475. // ;internal
  3476. // // ;internal
  3477. // DWORDs range. // ;internal
  3478. // For GET, pvParam is a pointer to a DWORD // ;internal
  3479. // For SET, pvParam is the value // ;internal
  3480. // // ;internal
  3481. #define SPI_STARTDWORDRANGE 0x20000000 // ;internal
  3482. #define SPI_GETFOREGROUNDLOCKTIMEOUT 0x20000000 // ;internal
  3483. #define SPI_SETFOREGROUNDLOCKTIMEOUT 0x20000001 // ;internal
  3484. #define SPI_MAXDWORDRANGE 0x20000002 // ;internal
  3485. #define SPI_DWORDRANGECOUNT ((SPI_MAXDWORDRANGE - SPI_STARTDWORDRANGE) / 2) // ;internal
  3486. #endif // #if (WINVER >= 0x040A) // ;internal
  3487. /* SystemParametersInfo flags */
  3488. #define SPIF_UPDATEINIFILE 0x0001
  3489. #define SPIF_SENDCHANGE 0x0002
  3490. #define SPIF_SENDWININICHANGE SPIF_SENDCHANGE
  3491. #define SPIF_VALID 0x0003 /* ;Internal */
  3492. typedef struct tagFILTERKEYS // ;Internal 4.0
  3493. { // ;Internal 4.0
  3494. DWORD cbSize; // ;Internal 4.0
  3495. DWORD dwFlags; // ;Internal 4.0
  3496. DWORD iWaitMSec; // ;Internal 4.0
  3497. DWORD iDelayMSec; // ;Internal 4.0
  3498. DWORD iRepeatMSec; // ;Internal 4.0
  3499. DWORD iBounceMSec; // ;Internal 4.0
  3500. } FILTERKEYS, FAR* LPFILTERKEYS; // ;Internal 4.0
  3501. // ;Internal 4.0
  3502. #define FKF_FILTERKEYSON 0x00000001 // ;Internal 4.0
  3503. #define FKF_AVAILABLE 0x00000002 // ;Internal 4.0
  3504. #define FKF_HOTKEYACTIVE 0x00000004 // ;Internal 4.0
  3505. #define FKF_CONFIRMHOTKEY 0x00000008 // ;Internal 4.0
  3506. #define FKF_HOTKEYSOUND 0x00000010 // ;Internal 4.0
  3507. #define FKF_INDICATOR 0x00000020 // ;Internal 4.0
  3508. #define FKF_CLICKON 0x00000040 // ;Internal 4.0
  3509. // ;Internal 4.0
  3510. typedef struct tagSTICKYKEYS // ;Internal 4.0
  3511. { // ;Internal 4.0
  3512. DWORD cbSize; // ;Internal 4.0
  3513. DWORD dwFlags; // ;Internal 4.0
  3514. } STICKYKEYS, FAR* LPSTICKYKEYS; // ;Internal 4.0
  3515. // ;Internal 4.0
  3516. #define SKF_STICKYKEYSON 0x00000001 // ;Internal 4.0
  3517. #define SKF_AVAILABLE 0x00000002 // ;Internal 4.0
  3518. #define SKF_HOTKEYACTIVE 0x00000004 // ;Internal 4.0
  3519. #define SKF_CONFIRMHOTKEY 0x00000008 // ;Internal 4.0
  3520. #define SKF_HOTKEYSOUND 0x00000010 // ;Internal 4.0
  3521. #define SKF_INDICATOR 0x00000020 // ;Internal 4.0
  3522. #define SKF_AUDIBLEFEEDBACK 0x00000040 // ;Internal 4.0
  3523. #define SKF_TRISTATE 0x00000080 // ;Internal 4.0
  3524. #define SKF_TWOKEYSOFF 0x00000100 // ;Internal 4.0
  3525. // ;Internal 4.0
  3526. typedef struct tagMOUSEKEYS // ;Internal 4.0
  3527. { // ;Internal 4.0
  3528. DWORD cbSize; // ;Internal 4.0
  3529. DWORD dwFlags; // ;Internal 4.0
  3530. DWORD iMaxSpeed; // ;Internal 4.0
  3531. DWORD iTimeToMaxSpeed; // ;Internal 4.0
  3532. DWORD iCtrlSpeed; // ;Internal 4.0
  3533. DWORD dwReserved1; // ;Internal 4.0
  3534. DWORD dwReserved2; // ;Internal 4.0
  3535. } MOUSEKEYS, FAR* LPMOUSEKEYS; // ;Internal 4.0
  3536. // ;Internal 4.0
  3537. #define MKF_MOUSEKEYSON 0x00000001 // ;Internal 4.0
  3538. #define MKF_AVAILABLE 0x00000002 // ;Internal 4.0
  3539. #define MKF_HOTKEYACTIVE 0x00000004 // ;Internal 4.0
  3540. #define MKF_CONFIRMHOTKEY 0x00000008 // ;Internal 4.0
  3541. #define MKF_HOTKEYSOUND 0x00000010 // ;Internal 4.0
  3542. #define MKF_INDICATOR 0x00000020 // ;Internal 4.0
  3543. #define MKF_NOMODIFIERS 0x00000040 // ;Internal 4.0
  3544. // ;Internal 4.0
  3545. typedef struct tagACCESSTIMEOUT // ;Internal 4.0
  3546. { // ;Internal 4.0
  3547. DWORD cbSize; // ;Internal 4.0
  3548. DWORD dwFlags; // ;Internal 4.0
  3549. DWORD iTimeOutMSec; // ;Internal 4.0
  3550. } ACCESSTIMEOUT, FAR* LPACCESSTIMEOUT;// ;Internal 4.0
  3551. // ;Internal 4.0
  3552. #define ATF_TIMEOUTON 0x00000001 // ;Internal 4.0
  3553. #define ATF_ONOFFFEEDBACK 0x00000002 // ;Internal 4.0
  3554. // ;Internal 4.0
  3555. typedef struct tagSOUNDSENTRY // ;Internal 4.0
  3556. { // ;Internal 4.0
  3557. DWORD cbSize; // ;Internal 4.0
  3558. DWORD dwFlags; // ;Internal 4.0
  3559. DWORD iFSTextEffect; // ;Internal 4.0
  3560. DWORD iFSTextEffectMSec; // ;Internal 4.0
  3561. DWORD iFSTextEffectColorBits; // ;Internal 4.0
  3562. DWORD iFSGrafEffect; // ;Internal 4.0
  3563. DWORD iFSGrafEffectMSec; // ;Internal 4.0
  3564. DWORD iFSGrafEffectColor; // ;Internal 4.0
  3565. DWORD iWindowsEffect; // ;Internal 4.0
  3566. DWORD iWindowsEffectMSec; // ;Internal 4.0
  3567. LPSTR lpszWindowsEffectDLL; // ;Internal 4.0
  3568. DWORD iWindowsEffectOrdinal; // ;Internal 4.0
  3569. } SOUNDSENTRY, FAR* LPSOUNDSENTRY; // ;Internal 4.0
  3570. // ;Internal 4.0
  3571. #define SSF_SOUNDSENTRYON 0x00000001 // ;Internal 4.0
  3572. #define SSF_AVAILABLE 0x00000002 // ;Internal 4.0
  3573. #define SSF_INDICATOR 0x00000004 // ;Internal 4.0
  3574. // ;Internal 4.0
  3575. #define SSTF_NONE 0x00000001 // ;Internal 4.0
  3576. #define SSTF_CHARS 0x00000002 // ;Internal 4.0
  3577. #define SSTF_BORDER 0x00000004 // ;Internal 4.0
  3578. #define SSTF_DISPLAY 0x00000008 // ;Internal 4.0
  3579. // ;Internal 4.0
  3580. #define SSGF_NONE 0x00000001 // ;Internal 4.0
  3581. #define SSGF_DISPLAY 0x00000002 // ;Internal 4.0
  3582. // ;Internal 4.0
  3583. #define SSWF_NONE 0x00000001 // ;Internal 4.0
  3584. #define SSWF_TITLE 0x00000002 // ;Internal 4.0
  3585. #define SSWF_WINDOW 0x00000004 // ;Internal 4.0
  3586. #define SSWF_DISPLAY 0x00000008 // ;Internal 4.0
  3587. #define SSWF_CUSTOM 0x00000010 // ;Internal 4.0
  3588. // ;Internal 4.0
  3589. typedef struct tagTOGGLEKEYS // ;Internal 4.0
  3590. { // ;Internal 4.0
  3591. DWORD cbSize; // ;Internal 4.0
  3592. DWORD dwFlags; // ;Internal 4.0
  3593. } TOGGLEKEYS, FAR* LPTOGGLEKEYS; // ;Internal 4.0
  3594. // ;Internal 4.0
  3595. #define TKF_TOGGLEKEYSON 0x00000001 // ;Internal 4.0
  3596. #define TKF_AVAILABLE 0x00000002 // ;Internal 4.0
  3597. #define TKF_HOTKEYACTIVE 0x00000004 // ;Internal 4.0
  3598. #define TKF_CONFIRMHOTKEY 0x00000008 // ;Internal 4.0
  3599. #define TKF_HOTKEYSOUND 0x00000020 // ;Internal 4.0
  3600. #define TKF_INDICATOR 0x00000040 // ;Internal 4.0
  3601. // ;Internal 4.0
  3602. typedef struct tagSERIALKEYS // ;Internal 4.0
  3603. { // ;Internal 4.0
  3604. DWORD cbSize; // ;Internal 4.0
  3605. DWORD dwFlags; // ;Internal 4.0
  3606. LPSTR lpszActivePort; // ;Internal 4.0
  3607. LPSTR lpszPort; // ;Internal 4.0
  3608. DWORD iBaudRate; // ;Internal 4.0
  3609. DWORD iPortState; // ;Internal 4.0
  3610. DWORD iActive; // ;Internal 4.0
  3611. } SERIALKEYS, FAR* LPSERIALKEYS; // ;Internal 4.0
  3612. // ;Internal 4.0
  3613. #define SERKF_SERIALKEYSON 0x00000001 // ;Internal 4.0
  3614. #define SERKF_AVAILABLE 0x00000002 // ;Internal 4.0
  3615. #define SERKF_INDICATOR 0x00000004 // ;Internal 4.0
  3616. // ;Internal 4.0
  3617. typedef struct tagHIGHCONTRAST // ;Internal 4.0
  3618. { // ;Internal 4.0
  3619. DWORD cbSize; // ;Internal 4.0
  3620. DWORD dwFlags; // ;Internal 4.0
  3621. LPSTR lpszDefaultScheme; // ;Internal 4.0
  3622. } HIGHCONTRAST, FAR* LPHIGHCONTRAST; // ;Internal 4.0
  3623. // ;Internal 4.0
  3624. #define HCF_HIGHCONTRASTON 0x00000001 // ;Internal 4.0
  3625. #define HCF_AVAILABLE 0x00000002 // ;Internal 4.0
  3626. #define HCF_HOTKEYACTIVE 0x00000004 // ;Internal 4.0
  3627. #define HCF_CONFIRMHOTKEY 0x00000008 // ;Internal 4.0
  3628. #define HCF_HOTKEYSOUND 0x00000010 // ;Internal 4.0
  3629. #define HCF_INDICATOR 0x00000020 // ;Internal 4.0
  3630. #define HCF_HOTKEYAVAILABLE 0x00000040 // ;Internal 4.0
  3631. // ;Internal 4.0
  3632. #endif /* NOSYSTEMPARAMSINFO */
  3633. #endif /* WINVER >= 0x030a */
  3634. #if (WINVER >= 0x0400)
  3635. /* Flags for ChangeDisplaySettings */
  3636. #define CDS_UPDATEREGISTRY 0x00000001
  3637. #define CDS_TEST 0x00000002
  3638. #define CDS_FULLSCREEN 0x00000004
  3639. #define CDS_GLOBAL 0x00000008
  3640. #define CDS_SET_PRIMARY 0x00000010
  3641. #define CDS_EXCLUSIVE 0x80000000 // ;internal
  3642. #define CDS_RESET 0x40000000
  3643. #define CDS_NORESET 0x10000000
  3644. #define CDS_VALID 0xF000001F // ;internal
  3645. /* Return values for ChangeDisplaySettings */
  3646. #define DISP_CHANGE_SUCCESSFUL 0
  3647. #define DISP_CHANGE_RESTART 1
  3648. #define DISP_CHANGE_FAILED -1
  3649. #define DISP_CHANGE_BADMODE -2
  3650. #define DISP_CHANGE_NOTUPDATED -3
  3651. #define DISP_CHANGE_BADFLAGS -4
  3652. #define DISP_CHANGE_BADPARAM -5
  3653. typedef struct tagDEVMODE FAR*LPDEVMODE;
  3654. LONG WINAPI ChangeDisplaySettings(LPDEVMODE lpDevMode, DWORD flags);
  3655. BOOL WINAPI EnumDisplaySettings(
  3656. LPCSTR lpszDeviceName,
  3657. DWORD iModeNum,
  3658. LPDEVMODE lpDevMode);
  3659. #if (WINVER >= 0x040A)
  3660. #define ENUM_CURRENT_SETTINGS ((DWORD)-1)
  3661. #define ENUM_REGISTRY_SETTINGS ((DWORD)-2)
  3662. LONG WINAPI ChangeDisplaySettingsEx(
  3663. LPCSTR lpszDeviceName,
  3664. LPDEVMODE lpDevMode,
  3665. #ifdef tagWND /* ;Internal */
  3666. HWND_16 hwnd, /* ;Internal */
  3667. #else /* ;Internal */
  3668. HWND hwnd,
  3669. #endif /* ;Internal */
  3670. DWORD flags,
  3671. LPVOID lParam);
  3672. #endif /* WINVER >=0x040A */
  3673. #endif /* WINVER >=0x0400 */
  3674. /****** Rectangle support ****************************************************/
  3675. void WINAPI SetRect(LPRECT, int, int, int, int);
  3676. void WINAPI SetRectEmpty(LPRECT);
  3677. void WINAPI CopyRect(LPRECT, LPCRECT);
  3678. BOOL WINAPI IsRectEmpty(LPCRECT);
  3679. BOOL WINAPI EqualRect(LPCRECT, LPCRECT);
  3680. BOOL WINAPI IntersectRect(LPRECT, LPCRECT, LPCRECT);
  3681. BOOL WINAPI UnionRect(LPRECT, LPCRECT, LPCRECT);
  3682. BOOL WINAPI SubtractRect(LPRECT, LPCRECT, LPCRECT);
  3683. void WINAPI OffsetRect(LPRECT, int, int);
  3684. void WINAPI InflateRect(LPRECT, int, int);
  3685. BOOL WINAPI PtInRect(LPCRECT, POINT);
  3686. /****** Window message support ***********************************************/
  3687. UINT WINAPI RegisterWindowMessage(LPCSTR);
  3688. #ifndef NOMSG
  3689. /* Queued message structure */
  3690. typedef struct tagMSG
  3691. {
  3692. #ifdef tagWND /* ;Internal */
  3693. HWND_16 hwnd; /* ;Internal */
  3694. #else /* ;Internal */
  3695. HWND hwnd;
  3696. #endif /* ;Internal */
  3697. UINT message;
  3698. WPARAM wParam;
  3699. LPARAM lParam;
  3700. DWORD time;
  3701. POINT pt;
  3702. } MSG, * PMSG, NEAR* NPMSG, FAR* LPMSG;
  3703. BOOL WINAPI GetMessage(LPMSG, HWND, UINT, UINT);
  3704. BOOL WINAPI PeekMessage(LPMSG, HWND, UINT, UINT, UINT);
  3705. /* PeekMessage() options */
  3706. #define PM_NOREMOVE 0x0000
  3707. #define PM_REMOVE 0x0001
  3708. #define PM_NOYIELD 0x0002
  3709. #define PM_VALID 0x0003 /* ;Internal */
  3710. #ifdef tagWND // ;Internal
  3711. BOOL WINAPI WaitMessage(void); // ;Internal
  3712. #else // ;Internal
  3713. void WINAPI WaitMessage(void);
  3714. #endif // ;Internal
  3715. DWORD WINAPI GetMessagePos(void);
  3716. LONG WINAPI GetMessageTime(void);
  3717. #if (WINVER >= 0x030a)
  3718. LPARAM WINAPI GetMessageExtraInfo(void);
  3719. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  3720. LPARAM WINAPI SetMessageExtraInfo(LPARAM); /* ;Internal 4.0 */
  3721. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  3722. #endif /* WINVER >= 0x030a */
  3723. BOOL WINAPI TranslateMessage(const MSG FAR*);
  3724. LONG WINAPI DispatchMessage(const MSG FAR*);
  3725. BOOL WINAPI SetMessageQueue(int);
  3726. BOOL WINAPI GetInputState(void);
  3727. #if (WINVER >= 0x030a)
  3728. DWORD WINAPI GetQueueStatus(UINT flags);
  3729. /* GetQueueStatus flags */
  3730. #define QS_KEY 0x0001
  3731. #define QS_MOUSEMOVE 0x0002
  3732. #define QS_MOUSEBUTTON 0x0004
  3733. #define QS_MOUSE (QS_MOUSEMOVE | QS_MOUSEBUTTON)
  3734. #define QS_POSTMESSAGE 0x0008
  3735. #define QS_TIMER 0x0010
  3736. #define QS_PAINT 0x0020
  3737. #define QS_SENDMESSAGE 0x0040
  3738. #if (WINVER >= 0x40A)
  3739. #define QS_ALLPOSTMESSAGE 0x0100
  3740. #endif // (WINVER >= 0x40A)
  3741. // #define QS_HOTKEY 0x0080 // ;Internal NT
  3742. // #define QS_ALLINPUT 0x00ff // ;Internal NT
  3743. #define QS_ALLINPUT 0x007f
  3744. #define QS_TRANSFER 0x4000 // ;Internal
  3745. #define QS_VALID 0x40FF // ;Internal
  3746. #endif /* WINVER >= 0x030a */
  3747. #endif /* NOMSG */
  3748. #ifdef tagWND /* ;Internal */
  3749. BOOL WINAPI PostMessage(HWND_16, UINT, WPARAM, LPARAM); /* ;Internal */
  3750. #else /* ;Internal */
  3751. BOOL WINAPI PostMessage(HWND, UINT, WPARAM, LPARAM);
  3752. #endif /* ;Internal */
  3753. LRESULT WINAPI SendMessage(HWND, UINT, WPARAM, LPARAM);
  3754. #if (WINVER >= 0x0400) // ;Internal 4.0
  3755. #define SMTO_NORMAL 0x0000 // ;Internal NT
  3756. #define SMTO_BLOCK 0x0001 // ;Internal NT
  3757. #define SMTO_ABORTIFHUNG 0x0002 // ;Internal NT
  3758. #define SMTO_BROADCAST 0x0004 // ;Internal 4.0
  3759. #define SMTO_NOTIMEOUTIFNOTHUNG 0x0008 // ;Internal 4.0
  3760. #define SMTO_VALID 0x000F // ;Internal NT
  3761. // ;Internal NT
  3762. #ifdef tagWND // ;Internal NT
  3763. typedef VOID (CALLBACK* SENDASYNCPROC)(HWND_16, UINT, DWORD, LRESULT); /* ;Internal NT */
  3764. #else // ;Internal NT
  3765. typedef VOID (CALLBACK* SENDASYNCPROC)(HWND, UINT, DWORD, LRESULT); /* ;Internal NT */
  3766. #endif // ;Internal NT
  3767. // ;Internal 4.0
  3768. long WINAPI BroadcastSystemMessage(DWORD, LPDWORD, UINT, WPARAM, LPARAM); // ;Internal 4.0
  3769. #define BROADCAST_QUERY_DENY 0x424D5144 // Return this value to deny a query.
  3770. // ;Internal 4.0
  3771. #define BSM_ALLCOMPONENTS 0x00000000 // ;Internal 4.0
  3772. #define BSM_VXDS 0x00000001 // ;Internal 4.0
  3773. #define BSM_NETDRIVER 0x00000002 // ;Internal 4.0
  3774. #define BSM_INSTALLABLEDRIVERS 0x00000004 // ;Internal 4.0
  3775. #define BSM_APPLICATIONS 0x00000008 // ;Internal 4.0
  3776. // ;Internal 4.0
  3777. #define BSF_QUERY 0x00000001 // ;Internal 4.0
  3778. #define BSF_IGNORECURRENTTASK 0x00000002 // ;Internal 4.0
  3779. #define BSF_FLUSHDISK 0x00000004 // ;Internal 4.0
  3780. #define BSF_NOHANG 0x00000008 // ;Internal 4.0
  3781. #define BSF_POSTMESSAGE 0x00000010 // ;Internal 4.0
  3782. #define BSF_FORCEIFHUNG 0x00000020 // ;Internal 4.0
  3783. #define BSF_NOTIMEOUTIFNOTHUNG 0x00000040 // ;Internal 4.0
  3784. #define BSF_SYSTEMSHUTDOWN 0x40000000 // ;Internal 4.0
  3785. #define BSF_MSGSRV32ISOK 0x80000000 // ;Internal 4.0
  3786. #define BSF_VALID 0xC000007F // ;Internal 4.0
  3787. // ;Internal 4.0
  3788. /* Flags for wParam of WM_DEVICECHANGE message */ // ;Internal 4.0
  3789. #define DBWF_LPARAMPOINTER 0x8000 // ;Internal 4.0
  3790. // ;Internal 4.0
  3791. typedef struct tagBROADCASTSYSMSG // ;Internal 4.0
  3792. { // ;Internal 4.0
  3793. /* DWORD cbSize; */ // ;Internal BOGUS
  3794. UINT uiMessage; // ;Internal 4.0
  3795. WPARAM wParam; // ;Internal 4.0
  3796. LPARAM lParam; // ;Internal 4.0
  3797. } BROADCASTSYSMSG; // ;Internal 4.0
  3798. typedef BROADCASTSYSMSG FAR *LPBROADCASTSYSMSG; // ;Internal 4.0
  3799. // ;Internal 4.0
  3800. #endif /* WINVER >= 0x0400 */ // ;Internal 4.0
  3801. /* ;Internal 4.0 */
  3802. #ifndef NOMSG
  3803. BOOL WINAPI PostAppMessage(HTASK, UINT, WPARAM, LPARAM);
  3804. #ifdef tagWND // ;Internal
  3805. BOOL WINAPI ReplyMessage(LRESULT); // ;Internal
  3806. #else // ;Internal
  3807. void WINAPI ReplyMessage(LRESULT);
  3808. #endif // ;Internal
  3809. BOOL WINAPI InSendMessage(void);
  3810. DWORD WINAPI InSendMessageEx(LPVOID); // ;Internal 4.1
  3811. /* // ;Internal 4.1
  3812. * InSendMessageEx return value // ;Internal 4.1
  3813. */ // ;Internal 4.1
  3814. #define ISMEX_NOSEND 0x00000000 // ;Internal 4.1
  3815. #define ISMEX_SEND 0x00000001 // ;Internal 4.1
  3816. #define ISMEX_NOTIFY 0x00000002 // ;Internal 4.1
  3817. #define ISMEX_CALLBACK 0x00000004 // ;Internal 4.1
  3818. #define ISMEX_REPLIED 0x00000008 // ;Internal 4.1
  3819. /* Special HWND value for use with PostMessage() and SendMessage() */
  3820. #define HWND_BROADCAST ((HWND)-1)
  3821. BOOL WINAPI CallMsgFilter(LPMSG, int);
  3822. #define WH_GETMESSAGE 3
  3823. #define WH_CALLWNDPROC 4
  3824. #define WH_CALLWNDPROCRET 12 // ;Internal 4.0
  3825. // ;Internal
  3826. typedef struct tagCWPRETSTRUCT // ;Internal 4.0
  3827. { // ;Internal 4.0
  3828. LRESULT lResult; // ;Internal 4.0
  3829. WPARAM wParamHi; // ;Internal 4.0
  3830. LPARAM lParam; // ;Internal 4.0
  3831. WPARAM wParamLo; // ;Internal 4.0
  3832. UINT message; // ;Internal 4.0
  3833. #ifdef tagWND // ;Internal
  3834. HWND_16 hwnd; // ;Internal
  3835. #else // ;Internal
  3836. HWND hwnd; // ;Internal 4.0
  3837. #endif // ;Internal
  3838. } CWPRETSTRUCT, FAR * LPCWPRETSTRUCT; // ;Internal 4.0
  3839. // #define WC_INIT 1 // ;Internal NT
  3840. // #define WC_SWP 2 // ;Internal NT
  3841. // #define WC_DEFWINDOWPROC 3 // ;Internal NT
  3842. // #define WC_MINMAX 4 // ;Internal NT
  3843. // #define WC_MOVE 5 // ;Internal NT
  3844. // #define WC_SIZE 6 // ;Internal NT
  3845. // #define WC_DRAWCAPTION 7 // ;Internal NT
  3846. // ;Internal
  3847. #define WH_MSGFILTER (-1)
  3848. #define WH_SYSMSGFILTER 6
  3849. #define WH_FOREGROUNDIDLE 11 // ;Internal NT
  3850. /* CallMsgFilter() and WH_SYS/MSGFILTER context codes */
  3851. #define MSGF_DIALOGBOX 0
  3852. #define MSGF_MESSAGEBOX 1 // ;Internal
  3853. #define MSGF_MENU 2
  3854. #define MSGF_MOVE 3
  3855. #define MSGF_SIZE 4
  3856. #define MSGF_SCROLLBAR 5
  3857. #define MSGF_NEXTWINDOW 6
  3858. #define MSGF_CBTHOSEBAGSUSEDTHIS 7 // ;Internal
  3859. #define MSGF_MAINLOOP 8
  3860. #define MSGF_USER 4096
  3861. #endif /* NOMSG */
  3862. /* Standard window messages */
  3863. /* NOTE: All messages below 0x0400 are RESERVED by Windows */
  3864. #define WM_NULL 0x0000
  3865. #define WM_CREATE 0x0001
  3866. #define WM_DESTROY 0x0002
  3867. #define WM_MOVE 0x0003
  3868. #define WM_SIZEWAIT 0x0004 // ;Internal
  3869. #define WM_SIZE 0x0005
  3870. #define WM_ACTIVATE 0x0006
  3871. #define WM_SETFOCUS 0x0007
  3872. #define WM_KILLFOCUS 0x0008
  3873. #define WM_SETVISIBLE 0x0009 // ;Internal
  3874. #define WM_ENABLE 0x000A
  3875. #define WM_SETREDRAW 0x000B
  3876. #define WM_SETTEXT 0x000C
  3877. #define WM_GETTEXT 0x000D
  3878. #define WM_GETTEXTLENGTH 0x000E
  3879. #define WM_PAINT 0x000F
  3880. #define WM_CLOSE 0x0010
  3881. #define WM_QUERYENDSESSION 0x0011
  3882. #define WM_QUIT 0x0012
  3883. #define WM_QUERYOPEN 0x0013
  3884. #define WM_ERASEBKGND 0x0014
  3885. #define WM_SYSCOLORCHANGE 0x0015
  3886. #define WM_ENDSESSION 0x0016
  3887. #define WM_SYSTEMERROR 0x0017 // ;Internal
  3888. #define WM_SHOWWINDOW 0x0018
  3889. #define WM_CTLCOLOR 0x0019
  3890. #define WM_SETTINGCHANGE 0x001A
  3891. #define WM_WININICHANGE WM_SETTINGCHANGE
  3892. #define WM_DEVMODECHANGE 0x001B
  3893. #define WM_ACTIVATEAPP 0x001C
  3894. #define WM_FONTCHANGE 0x001D
  3895. #define WM_TIMECHANGE 0x001E
  3896. #define WM_CANCELMODE 0x001F
  3897. #define WM_SETCURSOR 0x0020
  3898. #define WM_MOUSEACTIVATE 0x0021
  3899. #define WM_CHILDACTIVATE 0x0022
  3900. #define WM_QUEUESYNC 0x0023
  3901. #define WM_GETMINMAXINFO 0x0024
  3902. #define WM_LOGOFF 0x0025 // ;Internal NT
  3903. #define WM_PAINTICON 0x0026 // ;Internal
  3904. #define WM_ICONERASEBKGND 0x0027
  3905. #define WM_NEXTDLGCTL 0x0028
  3906. #define WM_ALTTABACTIVE 0x0029 // ;Internal
  3907. #define WM_SPOOLERSTATUS 0x002A
  3908. #define WM_DRAWITEM 0x002B
  3909. #define WM_MEASUREITEM 0x002C
  3910. #define WM_DELETEITEM 0x002D
  3911. #define WM_VKEYTOITEM 0x002E
  3912. #define WM_CHARTOITEM 0x002F
  3913. #define WM_SETFONT 0x0030
  3914. #define WM_GETFONT 0x0031
  3915. #define WM_SETHOTKEY 0x0032 // ;Internal
  3916. #define WM_GETHOTKEY 0x0033 // ;Internal
  3917. #define WM_FILESYSCHANGE 0x0034 // ;Internal
  3918. #define WM_SHELLNOTIFY 0x0034 // ;Internal
  3919. #define SHELLNOTIFY_DISKFULL 0x0001 // ;Internal
  3920. #define SHELLNOTIFY_OLELOADED 0x0002 // ;Internal
  3921. #define SHELLNOTIFY_OLEUNLOADED 0x0003 // ;Internal
  3922. #define SHELLNOTIFY_WALLPAPERCHANGED 0x0004 // ;Internal
  3923. #define SHELLNOTIFY_SWAPGROWFAILED 0x0005 // ;Internal
  3924. // ;Internal
  3925. #define WM_ISACTIVEICON 0x0035 // ;Internal
  3926. #define WM_UNUSED0036 0x0036 // ;Internal
  3927. #define WM_QUERYDRAGICON 0x0037
  3928. #define WM_WINHELP 0x0038 // ;Internal 4.0
  3929. #define WM_COMPAREITEM 0x0039
  3930. #define WM_FULLSCREEN 0x003A // ;Internal NT
  3931. #define WM_CLIENTSHUTDOWN 0x003B // ;Internal NT
  3932. #define WM_DDEMLEVENT 0x003C // ;Internal NT
  3933. // ;Internal
  3934. #ifdef WINABLE // ;Internal
  3935. #define WMOBJ_ID 0x0000 // ;Internal
  3936. #define WMOBJ_POINT 0x0001 // ;Internal
  3937. #define WMOBJ_SAMETHREAD 0x8000 // ;Internal
  3938. // ;Internal
  3939. #define WMOBJID_SELF 0x00000000 // ;Internal
  3940. // ;Internal
  3941. #define WM_GETOBJECT 0x003D // ;Internal
  3942. #endif // WINABLE // ;Internal
  3943. #define MM_CALCSCROLL 0x003F // ;Internal NT
  3944. #define WM_TESTING 0x0040 // ;Internal
  3945. #define WM_COMPACTING 0x0041
  3946. #define WM_OTHERWINDOWCREATED 0x0042 // ;Internal NT
  3947. #define WM_OTHERWINDOWDESTROYED 0x0043 // ;Internal NT
  3948. #define WM_COMMNOTIFY 0x0044
  3949. #define WM_MEDIASTATUSCHANGE 0x0045 // ;Internal 4.0
  3950. #define WM_WINDOWPOSCHANGING 0x0046
  3951. #define WM_WINDOWPOSCHANGED 0x0047
  3952. #define WM_POWER 0x0048
  3953. #define WM_COPYGLOBALDATA 0x0049 // ;Internal NT
  3954. #define WM_COPYDATA 0x004A // ;Internal NT
  3955. #define WM_CANCELJOURNAL 0x004B // ;Internal NT
  3956. #define WM_LOGONNOTIFY 0x004C // ;Internal NT
  3957. #define WM_KEYF1 0x004D // ;Internal 4.0
  3958. #define WM_NOTIFY 0x004E
  3959. #define WM_ACCESS_WINDOW 0x004F // ;Internal NT
  3960. #define WM_INPUTLANGCHANGEREQUEST 0x0050 // ;Internal 4.0
  3961. #define WM_INPUTLANGCHANGE 0x0051 // ;Internal 4.0
  3962. #define WM_TCARD 0x0052
  3963. #define WM_HELP 0x0053
  3964. #define WM_USERCHANGED 0x0054
  3965. #define WM_NOTIFYFORMAT 0x0055 // ;Internal 4.0
  3966. #define NFR_ANSI 1 // ;Internal 4.0
  3967. #define NFR_UNICODE 2 // ;Internal 4.0
  3968. #define NF_QUERY 3 // ;Internal 4.0
  3969. #define NF_REQUERY 4 // ;Internal 4.0
  3970. // ;Internal
  3971. #define WM_FINALDESTROY 0x0070 // ;Internal NT
  3972. #define WM_MEASUREITEM_CLIENTDATA 0x0071 // ;Internal NT
  3973. #define WM_CONTEXTMENU 0x007B
  3974. #define WM_STYLECHANGING 0x007C // ;Internal 4.0
  3975. #define WM_STYLECHANGED 0x007D // ;Internal 4.0
  3976. #define WM_DISPLAYCHANGE 0x007E // ;Internal 4.0
  3977. #define WM_GETICON 0x007F // ;Internal 4.0
  3978. #define WM_SETICON 0x0080 // ;Internal 4.0
  3979. #define WM_NCCREATE 0x0081
  3980. #define WM_NCDESTROY 0x0082
  3981. #define WM_NCCALCSIZE 0x0083
  3982. #define WM_NCHITTEST 0x0084
  3983. #define WM_NCPAINT 0x0085
  3984. #define WM_NCACTIVATE 0x0086
  3985. #define WM_GETDLGCODE 0x0087
  3986. #define WM_SYNCPAINT 0x0088 // ;Internal
  3987. #define WM_SYNCTASK 0x0089 // ;Internal
  3988. #define WM_NCMOUSEMOVE 0x00A0
  3989. #define WM_NCLBUTTONDOWN 0x00A1
  3990. #define WM_NCLBUTTONUP 0x00A2
  3991. #define WM_NCLBUTTONDBLCLK 0x00A3
  3992. #define WM_NCRBUTTONDOWN 0x00A4
  3993. #define WM_NCRBUTTONUP 0x00A5
  3994. #define WM_NCRBUTTONDBLCLK 0x00A6
  3995. #define WM_NCMBUTTONDOWN 0x00A7
  3996. #define WM_NCMBUTTONUP 0x00A8
  3997. #define WM_NCMBUTTONDBLCLK 0x00A9
  3998. #define EM_FIRST_32 0x00B0 // ;Internal
  3999. // #define EM_GETSEL 0x00B0 // ;Internal NT
  4000. // #define EM_SETSEL 0x00B1 // ;Internal NT
  4001. // #define EM_GETRECT 0x00B2 // ;Internal NT
  4002. // #define EM_SETRECT 0x00B3 // ;Internal NT
  4003. // #define EM_SETRECTNP 0x00B4 // ;Internal NT
  4004. // #define EM_SCROLL 0x00B5 // ;Internal NT
  4005. // #define EM_LINESCROLL 0x00B6 // ;Internal NT
  4006. // #define EM_SCROLLCARET 0x00B7 // ;Internal NT
  4007. // #define EM_GETMODIFY 0x00B8 // ;Internal NT
  4008. // #define EM_SETMODIFY 0x00B9 // ;Internal NT
  4009. // #define EM_GETLINECOUNT 0x00BA // ;Internal NT
  4010. // #define EM_LINEINDEX 0x00BB // ;Internal NT
  4011. // #define EM_SETHANDLE 0x00BC // ;Internal NT
  4012. // #define EM_GETHANDLE 0x00BD // ;Internal NT
  4013. // #define EM_GETTHUMB 0x00BE // ;Internal NT
  4014. // #define EM_LINELENGTH 0x00C1 // ;Internal NT
  4015. // #define EM_REPLACESEL 0x00C2 // ;Internal NT
  4016. // #define EM_SETFONT 0x00C3 // ;Internal NT
  4017. // #define EM_GETLINE 0x00C4 // ;Internal NT
  4018. // #define EM_LIMITTEXT 0x00C5 // ;Internal NT
  4019. // #define EM_CANUNDO 0x00C6 // ;Internal NT
  4020. // #define EM_UNDO 0x00C7 // ;Internal NT
  4021. // #define EM_FMTLINES 0x00C8 // ;Internal NT
  4022. // #define EM_LINEFROMCHAR 0x00C9 // ;Internal NT
  4023. // #define EM_SETWORDBREAK 0x00CA // ;Internal NT
  4024. // #define EM_SETTABSTOPS 0x00CB // ;Internal NT
  4025. // #define EM_SETPASSWORDCHAR 0x00CC // ;Internal NT
  4026. // #define EM_EMPTYUNDOBUFFER 0x00CD // ;Internal NT
  4027. // #define EM_GETFIRSTVISIBLELINE 0x00CE // ;Internal NT
  4028. // #define EM_SETREADONLY 0x00CF // ;Internal NT
  4029. // #define EM_SETWORDBREAKPROC 0x00D0 // ;Internal NT
  4030. // #define EM_GETWORDBREAKPROC 0x00D1 // ;Internal NT
  4031. // #define EM_GETPASSWORDCHAR 0x00D2 // ;Internal NT
  4032. // #define EM_SETMARGINS 0x00D3 // ;Internal NT 4.0
  4033. // #define EM_GETMARGINS 0x00D4 // ;Internal NT 4.0
  4034. // #define EM_POSFROMCHAR 0x00D5 // ;Internal NT 4.0
  4035. // #define EM_CHARFROMPOS 0x00D6 // ;Internal NT 4.0
  4036. #define EM_LAST_32 0x00D6 // ;Internal
  4037. // ;Internal
  4038. #define SBM_FIRST_32 0x00E0 // ;Internal
  4039. // #define SBM_SETPOS 0x00E0 // ;Internal NT
  4040. // #define SBM_GETPOS 0x00E1 // ;Internal NT
  4041. // #define SBM_SETRANGE 0x00E2 // ;Internal NT
  4042. // #define SBM_GETRANGE 0x00E3 // ;Internal NT
  4043. // #define SBM_ENABLE_ARROWS 0x00E4 // ;Internal NT
  4044. // #define SBM_SETRANGEREDRAW 0x00E6 // ;Internal NT
  4045. // #define SBM_SETSCROLLINFO 0x00E9 // ;Internal NT 4.0
  4046. // #define SBM_GETSCROLLINFO 0x00EA // ;Internal NT 4.0
  4047. #define SBM_LAST_32 0x00EA // ;Internal
  4048. // ;Internal
  4049. #define BM_FIRST_32 0x00F0 // ;Internal
  4050. // #define BM_GETCHECK 0x00F0 // ;Internal NT
  4051. // #define BM_SETCHECK 0x00F1 // ;Internal NT
  4052. // #define BM_GETSTATE 0x00F2 // ;Internal NT
  4053. // #define BM_SETSTATE 0x00F3 // ;Internal NT
  4054. // #define BM_SETSTYLE 0x00F4 // ;Internal NT
  4055. // #define BM_CLICK 0x00F5 // ;Internal NT
  4056. // #define BM_GETIMAGE 0x00F6 // ;Internal NT 4.0
  4057. // #define BM_SETIMAGE 0x00F7 // ;Internal NT 4.0
  4058. #define BM_LAST_32 0x00F7 // ;Internal
  4059. #define WM_KEYFIRST 0x0100
  4060. #define WM_KEYDOWN 0x0100
  4061. #define WM_KEYUP 0x0101
  4062. #define WM_CHAR 0x0102
  4063. #define WM_DEADCHAR 0x0103
  4064. #define WM_SYSKEYDOWN 0x0104
  4065. #define WM_SYSKEYUP 0x0105
  4066. #define WM_SYSCHAR 0x0106
  4067. #define WM_SYSDEADCHAR 0x0107
  4068. #define WM_YOMICHAR 0x0108 /* ;Internal JAPAN */
  4069. #define WM_KEYLAST 0x0108
  4070. #define WM_CONVERTREQUEST 0x010A /* ;Internal JAPAN */
  4071. #define WM_CONVERTRESULT 0x010B /* ;Internal JAPAN */
  4072. #define WM_INTERIM 0x010C /* ;Internal KOREA */
  4073. #define WM_INITDIALOG 0x0110
  4074. #define WM_COMMAND 0x0111
  4075. #define WM_SYSCOMMAND 0x0112
  4076. #define WM_TIMER 0x0113
  4077. #define WM_HSCROLL 0x0114
  4078. #define WM_VSCROLL 0x0115
  4079. #define WM_INITMENU 0x0116
  4080. #define WM_INITMENUPOPUP 0x0117
  4081. #define WM_SYSTIMER 0x0118 // ;Internal
  4082. #define WM_MENUSELECT 0x011F
  4083. #define WM_MENUCHAR 0x0120
  4084. #define WM_ENTERIDLE 0x0121
  4085. #if (WINVER >= 0x40A) // ;Internal 4.1
  4086. #define WM_MENURBUTTONUP 0x0122 // ;Internal 4.1
  4087. #define WM_MENUDRAG 0x0123 // ;Internal 4.1
  4088. #define WM_MENUGETOBJECT 0x0124 // ;Internal 4.1
  4089. #define WM_UNINITMENUPOPUP 0x0125 // ;Internal 4.1
  4090. #define WM_MENUCOMMAND 0x0126 // ;Internal 4.1
  4091. #endif // (WINVER >= 0x40A) // ;Internal 4.1
  4092. // ;Internal NT
  4093. #define WM_LBTRACKPOINT 0x0131 // ;Internal
  4094. // #define WM_CTLCOLORFIRST 0x0132 // ;Internal NT
  4095. // #define WM_CTLCOLORMSGBOX 0x0132 // ;Internal NT
  4096. // #define WM_CTLCOLOREDIT 0x0133 // ;Internal NT
  4097. // #define WM_CTLCOLORLISTBOX 0x0134 // ;Internal NT
  4098. // #define WM_CTLCOLORBTN 0x0135 // ;Internal NT
  4099. // #define WM_CTLCOLORDLG 0x0136 // ;Internal NT
  4100. // #define WM_CTLCOLORSCROLLBAR 0x0137 // ;Internal NT
  4101. // #define WM_CTLCOLORSTATIC 0x0138 // ;Internal NT
  4102. // #define WM_CTLCOLORLAST 0x0138 // ;Internal NT
  4103. // ;Internal NT
  4104. #define CB_FIRST_32 0x0140 // ;Internal
  4105. // #define CB_GETEDITSEL 0x0140 // ;Internal NT
  4106. // #define CB_LIMITTEXT 0x0141 // ;Internal NT
  4107. // #define CB_SETEDITSEL 0x0142 // ;Internal NT
  4108. // #define CB_ADDSTRING 0x0143 // ;Internal NT
  4109. // #define CB_DELETESTRING 0x0144 // ;Internal NT
  4110. // #define CB_DIR 0x0145 // ;Internal NT
  4111. // #define CB_GETCOUNT 0x0146 // ;Internal NT
  4112. // #define CB_GETCURSEL 0x0147 // ;Internal NT
  4113. // #define CB_GETLBTEXT 0x0148 // ;Internal NT
  4114. // #define CB_GETLBTEXTLEN 0x0149 // ;Internal NT
  4115. // #define CB_INSERTSTRING 0x014A // ;Internal NT
  4116. // #define CB_RESETCONTENT 0x014B // ;Internal NT
  4117. // #define CB_FINDSTRING 0x014C // ;Internal NT
  4118. // #define CB_SELECTSTRING 0x014D // ;Internal NT
  4119. // #define CB_SETCURSEL 0x014E // ;Internal NT
  4120. // #define CB_SHOWDROPDOWN 0x014F // ;Internal NT
  4121. // ;Internal NT
  4122. // #define CB_GETITEMDATA 0x0150 // ;Internal NT
  4123. // #define CB_SETITEMDATA 0x0151 // ;Internal NT
  4124. // #define CB_GETDROPPEDCONTROLRECT 0x0152 // ;Internal NT
  4125. // #define CB_SETITEMHEIGHT 0x0153 // ;Internal NT
  4126. // #define CB_GETITEMHEIGHT 0x0154 // ;Internal NT
  4127. // #define CB_SETEXTENDEDUI 0x0155 // ;Internal NT
  4128. // #define CB_GETEXTENDEDUI 0x0156 // ;Internal NT
  4129. // #define CB_GETDROPPEDSTATE 0x0157 // ;Internal NT
  4130. // #define CB_FINDSTRINGEXACT 0x0158 // ;Internal NT
  4131. // #define CB_SETLOCALE 0x0159 // ;Internal NT
  4132. // #define CB_GETLOCALE 0x015A // ;Internal NT
  4133. // #define CB_GETTOPINDEX 0x015B // ;Internal NT 4.0
  4134. // #define CB_SETTOPINDEX 0x015C // ;Internal NT 4.0
  4135. // #define CB_GETHORIZONTALEXTENT 0x015D // ;Internal NT 4.0
  4136. // #define CB_SETHORIZONTALEXTENT 0x015E // ;Internal NT 4.0
  4137. // #define CB_GETDROPPEDWIDTH 0x015F // ;Internal NT 4.0
  4138. // #define CB_SETDROPPEDWIDTH 0x0160 // ;Internal NT 4.0
  4139. // #define CB_INITSTORAGE 0x0161 // ;Internal NT 4.0
  4140. #define CB_LAST_32 0x0161 // ;Internal
  4141. // ;Internal
  4142. #define STM_FIRST_32 0x0170 // ;Internal
  4143. // #define STM_SETICON 0x0170 // ;Internal NT
  4144. // #define STM_GETICON 0x0171 // ;Internal NT
  4145. // #define STM_SETIMAGE 0x0172 // ;Internal NT 4.0
  4146. // #define STM_GETIMAGE 0x0173 // ;Internal NT 4.0
  4147. #define STM_LAST_32 0x0173 // ;Internal
  4148. // ;Internal
  4149. #define LB_FIRST_32 0x0180 // ;Internal
  4150. // #define LB_ADDSTRING 0x0180 // ;Internal NT
  4151. // #define LB_INSERTSTRING 0x0181 // ;Internal NT
  4152. // #define LB_DELETESTRING 0x0182 // ;Internal NT
  4153. // #define LB_SELITEMRANGEEX 0x0183 // ;Internal NT
  4154. // #define LB_RESETCONTENT 0x0184 // ;Internal NT
  4155. // #define LB_SETSEL 0x0185 // ;Internal NT
  4156. // #define LB_SETCURSEL 0x0186 // ;Internal NT
  4157. // #define LB_GETSEL 0x0187 // ;Internal NT
  4158. // #define LB_GETCURSEL 0x0188 // ;Internal NT
  4159. // #define LB_GETTEXT 0x0189 // ;Internal NT
  4160. // #define LB_GETTEXTLEN 0x018A // ;Internal NT
  4161. // #define LB_GETCOUNT 0x018B // ;Internal NT
  4162. // #define LB_SELECTSTRING 0x018C // ;Internal NT
  4163. // #define LB_DIR 0x018D // ;Internal NT
  4164. // #define LB_GETTOPINDEX 0x018E // ;Internal NT
  4165. // #define LB_FINDSTRING 0x018F // ;Internal NT
  4166. // ;Internal NT
  4167. // #define LB_GETSELCOUNT 0x0190 // ;Internal NT
  4168. // #define LB_GETSELITEMS 0x0191 // ;Internal NT
  4169. // #define LB_SETTABSTOPS 0x0192 // ;Internal NT
  4170. // #define LB_GETHORIZONTALEXTENT 0x0193 // ;Internal NT
  4171. // #define LB_SETHORIZONTALEXTENT 0x0194 // ;Internal NT
  4172. // #define LB_SETCOLUMNWIDTH 0x0195 // ;Internal NT
  4173. // #define LB_ADDFILE 0x0196 // ;Internal NT
  4174. // #define LB_SETTOPINDEX 0x0197 // ;Internal NT
  4175. // #define LB_GETITEMRECT 0x0198 // ;Internal NT
  4176. // #define LB_GETITEMDATA 0x0199 // ;Internal NT
  4177. // #define LB_SETITEMDATA 0x019A // ;Internal NT
  4178. // #define LB_SELITEMRANGE 0x019B // ;Internal NT
  4179. // #define LB_SETANCHORINDEX 0x019C // ;Internal NT
  4180. // #define LB_GETANCHORINDEX 0x019D // ;Internal NT
  4181. // #define LB_SETCARETINDEX 0x019E // ;Internal NT
  4182. // #define LB_GETCARETINDEX 0x019F // ;Internal NT
  4183. // ;Internal NT
  4184. // #define LB_SETITEMHEIGHT 0x01A0 // ;Internal NT
  4185. // #define LB_GETITEMHEIGHT 0x01A1 // ;Internal NT
  4186. // #define LB_FINDSTRINGEXACT 0x01A2 // ;Internal NT
  4187. // #define LBCB_CARETON 0x01A3 // ;Internal NT
  4188. // #define LBCB_CARETOFF 0x01A4 // ;Internal NT
  4189. // #define LB_SETLOCALE 0x01A5 // ;Internal NT
  4190. // #define LB_GETLOCALE 0x01A6 // ;Internal NT
  4191. // #define LB_SETCOUNT 0x01A7 // ;Internal NT
  4192. // #define LB_INITSTORAGE 0x01A8 // ;Internal NT 4.0
  4193. // #define LB_ITEMFROMPOINT 0x01A9 // ;Internal NT 4.0
  4194. // #define LB_INSERTSTRINGUPPER 0x01AA // ;Internal NT 4.0
  4195. // #define LB_INSERTSTRINGLOWER 0x01AB // ;Internal NT 4.0
  4196. // #define LB_ADDSTRINGUPPER 0x01AC // ;Internal NT 4.0
  4197. // #define LB_ADDSTRINGLOWER 0x01AD // ;Internal NT 4.0
  4198. #define LB_LAST_32 0x01AD // ;Internal
  4199. // ;Internal
  4200. #define MN_FIRST_32 0x01E0 // ;Internal
  4201. // #define MN_SETHMENU 0x01E0 // ;Internal NT
  4202. // #define MN_GETHMENU 0x01E1 // ;Internal NT
  4203. // #define MN_SIZEWINDOW 0x01E2 // ;Internal NT
  4204. // #define MN_OPENHIERARCHY 0x01E3 // ;Internal NT
  4205. // #define MN_CLOSEHIERARCHY 0x01E4 // ;Internal NT
  4206. // #define MN_SELECTITEM 0x01E5 // ;Internal NT
  4207. // #define MN_CANCELMENUS 0x01E6 // ;Internal NT
  4208. // #define MN_SELECTFIRSTVALIDITEM 0x01E7 // ;Internal NT
  4209. // #define MN_GETPPOPUPMENU 0x01EA // ;Internal NT
  4210. // #define MN_FINDMENUWINDOWFROMPOINT 0x01EB // ;Internal NT
  4211. // #define MN_SHOWPOPUPWINDOW 0x01EC // ;Internal NT
  4212. // #define MN_BUTTONDOWN 0x01ED // ;Internal NT
  4213. // #define MN_MOUSEMOVE 0x01EE // ;Internal NT
  4214. // #define MN_BUTTONUP 0x01EF // ;Internal NT
  4215. // #define MN_SETTIMERTOOPENHIERARCHY 0x01F0 // ;Internal NT
  4216. // #define MN_DBLCLK 0x01F1 // ;Internal NT 4.0
  4217. #define MN_LAST_32 0x01E7 // ;Internal
  4218. #define WM_MOUSEFIRST 0x0200
  4219. #define WM_MOUSEMOVE 0x0200
  4220. #define WM_LBUTTONDOWN 0x0201
  4221. #define WM_LBUTTONUP 0x0202
  4222. #define WM_LBUTTONDBLCLK 0x0203
  4223. #define WM_RBUTTONDOWN 0x0204
  4224. #define WM_RBUTTONUP 0x0205
  4225. #define WM_RBUTTONDBLCLK 0x0206
  4226. #define WM_MBUTTONDOWN 0x0207
  4227. #define WM_MBUTTONUP 0x0208
  4228. #define WM_MBUTTONDBLCLK 0x0209
  4229. #if (WINVER >= 0x040A)
  4230. #define WM_MOUSEWHEEL 0x020A
  4231. #define WM_MOUSELAST 0x020A
  4232. #define WHEEL_DELTA 120 /* Value for rolling one detent */
  4233. #define WHEEL_PAGESCROLL (-1) /* Scroll one page (UINT_MAX) */
  4234. #else
  4235. #define WM_MOUSELAST 0x0209
  4236. #endif
  4237. #define WM_PARENTNOTIFY 0x0210
  4238. #define WM_ENTERMENULOOP 0x0211 // ;Internal
  4239. #define WM_EXITMENULOOP 0x0212 // ;Internal
  4240. #define WM_NEXTMENU 0x0213 // ;Internal
  4241. #define WM_SIZING 0x0214 // ;Internal 4.0
  4242. #define WM_CAPTURECHANGED 0x0215 // ;Internal 4.0
  4243. #define WM_MOVING 0x0216 // ;Internal 4.0
  4244. #define WM_POWERBROADCAST 0x0218 // ;Internal 4.0
  4245. #define WM_DEVICECHANGE 0x0219 // ;Internal 4.0
  4246. #define WM_MDICREATE 0x0220
  4247. #define WM_MDIDESTROY 0x0221
  4248. #define WM_MDIACTIVATE 0x0222
  4249. #define WM_MDIRESTORE 0x0223
  4250. #define WM_MDINEXT 0x0224
  4251. #define WM_MDIMAXIMIZE 0x0225
  4252. #define WM_MDITILE 0x0226
  4253. #define WM_MDICASCADE 0x0227
  4254. #define WM_MDIICONARRANGE 0x0228
  4255. #define WM_MDIGETACTIVE 0x0229
  4256. #define WM_DROPOBJECT 0x022A // ;Internal
  4257. #define WM_QUERYDROPOBJECT 0x022B // ;Internal
  4258. #define WM_BEGINDRAG 0x022C // ;Internal
  4259. #define WM_DRAGLOOP 0x022D // ;Internal
  4260. #define WM_DRAGSELECT 0x022E // ;Internal
  4261. #define WM_DRAGMOVE 0x022F // ;Internal
  4262. #define WM_MDISETMENU 0x0230
  4263. #define WM_ENTERSIZEMOVE 0x0231
  4264. #define WM_EXITSIZEMOVE 0x0232
  4265. #define WM_DROPFILES 0x0233
  4266. #define WM_MDIREFRESHMENU 0x0234 // ;Internal NT
  4267. // ;Internal JAPAN/KOREA
  4268. #define WM_KANJIFIRST 0x0280 // ;Internal JAPAN
  4269. #define WM_KANJILAST 0x029F // ;Internal JAPAN
  4270. #define WM_HANGEULFIRST 0x0280 // ;Internal KOREA
  4271. #define WM_HANGEULLAST 0x029F // ;Internal KOREA
  4272. #if (WINVER >= 0x40A)
  4273. #define WM_TRACKMOUSEEVENT_FIRST 0x02A0 // ;Internal
  4274. #define WM_NCMOUSEHOVER 0x02A0
  4275. #define WM_MOUSEHOVER 0x02A1
  4276. #define WM_NCMOUSELEAVE 0x02A2
  4277. #define WM_MOUSELEAVE 0x02A3
  4278. #define WM_TRACKMOUSEEVENT_LAST 0x02AF // ;Internal
  4279. #endif // (WINVER >=0x40A)
  4280. #define WM_CUT 0x0300
  4281. #define WM_COPY 0x0301
  4282. #define WM_PASTE 0x0302
  4283. #define WM_CLEAR 0x0303
  4284. #define WM_UNDO 0x0304
  4285. #define WM_RENDERFORMAT 0x0305
  4286. #define WM_RENDERALLFORMATS 0x0306
  4287. #define WM_DESTROYCLIPBOARD 0x0307
  4288. #define WM_DRAWCLIPBOARD 0x0308
  4289. #define WM_PAINTCLIPBOARD 0x0309
  4290. #define WM_SIZECLIPBOARD 0x030B
  4291. #define WM_VSCROLLCLIPBOARD 0x030A
  4292. #define WM_ASKCBFORMATNAME 0x030C
  4293. #define WM_CHANGECBCHAIN 0x030D
  4294. #define WM_HSCROLLCLIPBOARD 0x030E
  4295. #define WM_QUERYNEWPALETTE 0x030F
  4296. #define WM_PALETTEISCHANGING 0x0310
  4297. #define WM_PALETTEGONNACHANGE WM_PALETTEISCHANGING // ;Internal
  4298. #define WM_PALETTECHANGED 0x0311
  4299. #define WM_CHANGEPALETTE WM_PALETTECHANGED // ;Internal
  4300. #define WM_HOTKEY 0x0312 // ;Internal NT
  4301. #define WM_SYSMENU 0x0313 // ;Internal
  4302. #define WM_HOOKMSG 0x0314 // ;Internal NT
  4303. #define WM_EXITPROCESS 0x0315 // ;Internal NT
  4304. #define WM_WAKETHREAD 0x0316 // ;Internal NT
  4305. #define WM_PRINT 0x0317
  4306. #define WM_PRINTCLIENT 0x0318
  4307. /* WinPad specific messages */
  4308. #define WM_HANDHELDFIRST 0x0358
  4309. #define WM_HANDHELDLAST 0x035F
  4310. // ;Internal
  4311. /* Reserved for AFX */ // ;Internal
  4312. #define WM_AFXFIRST 0x0360 // ;Internal
  4313. #define WM_AFXLAST 0x037F // ;Internal
  4314. /* PenWindows specific messages */
  4315. #define WM_PENWINFIRST 0x0380
  4316. #define WM_PENWINLAST 0x038F
  4317. /* Coalescing messages */
  4318. #define WM_INTERNAL_COALESCE_FIRST 0x0390 // ;Internal
  4319. #define WM_COALESCE_FIRST 0x0390
  4320. #define WM_COALESCE_LAST 0x039F
  4321. #define WM_INTERNAL_COALESCE_LAST 0x03B0 // ;Internal
  4322. /* Multimedia messages */ /* ;Internal */
  4323. #define WM_MM_RESERVED_FIRST 0x03A0 /* ;Internal */
  4324. #define WM_MM_RESERVED_LAST 0x03DF /* ;Internal */
  4325. /* ;Internal */
  4326. /* DDE messages */ /* ;Internal */
  4327. #define WM_INTERNAL_DDE_FIRST 0x03E0 /* ;Internal */
  4328. /* #define WM_DDE_INITIATE 0x03E0 */ /* ;Internal */
  4329. /* #define WM_DDE_TERMINATE 0x03E1 */ /* ;Internal */
  4330. /* #define WM_DDE_ADVISE 0x03E2 */ /* ;Internal */
  4331. /* #define WM_DDE_UNADVISE 0x03E3 */ /* ;Internal */
  4332. /* #define WM_DDE_ACK 0x03E4 */ /* ;Internal */
  4333. /* #define WM_DDE_DATA 0x03E5 */ /* ;Internal */
  4334. /* #define WM_DDE_REQUEST 0x03E6 */ /* ;Internal */
  4335. /* #define WM_DDE_POKE 0x03E7 */ /* ;Internal */
  4336. /* #define WM_DDE_EXECUTE 0x03E8 */ /* ;Internal */
  4337. #define WM_INTERNAL_DDE_LAST 0x03EF /* ;Internal */
  4338. /* ;Internal */
  4339. /* CBT messages */ /* ;Internal */
  4340. #define WM_CBT_RESERVED_FIRST 0x03F0 /* ;Internal */
  4341. #define WM_CBT_RESERVED_LAST 0x03FF /* ;Internal */
  4342. /* ;Internal */
  4343. #define WM_USER 0x0400
  4344. /* NOTE: All messages between WM_APP and 0xBFFF are for exclusive use by apps */
  4345. #define WM_APP 0x8000
  4346. #if (WINVER >= 0x030a)
  4347. /****** Power management ****************************************************/
  4348. /* wParam for WM_POWER window message and DRV_POWER driver notification */
  4349. #define PWR_OK 1
  4350. #define PWR_FAIL (-1)
  4351. #define PWR_SUSPENDREQUEST 1
  4352. #define PWR_SUSPENDRESUME 2
  4353. #define PWR_CRITICALRESUME 3
  4354. #endif /* WINVER >= 0x030a */
  4355. #if (WINVER >= 0x0400)
  4356. /* wParam for WM_SIZING message */
  4357. #define WMSZ_KEYSIZE 0 // ;Internal
  4358. #define WMSZ_LEFT 1
  4359. #define WMSZ_RIGHT 2
  4360. #define WMSZ_TOP 3
  4361. #define WMSZ_TOPLEFT 4
  4362. #define WMSZ_TOPRIGHT 5
  4363. #define WMSZ_BOTTOM 6
  4364. #define WMSZ_BOTTOMLEFT 7
  4365. #define WMSZ_BOTTOMRIGHT 8
  4366. #define WMSZ_MOVE 9 // ;Internal
  4367. #define WMSZ_KEYMOVE 10 // ;Internal
  4368. #define WMSZ_SIZEFIRST WMSZ_LEFT // ;Internal
  4369. #endif /* WINVER >= 0x400 */
  4370. #if (WINVER >= 0x040A) // ;Internal 4.1
  4371. // ;Internal 4.1
  4372. /* WM_MENUDODRAGDROP return value */ // ;Internal 4.1
  4373. #define MNDD_CONTINUE 0x0000 // ;Internal 4.1
  4374. #define MNDD_ENDMENU 0x0001 // ;Internal 4.1
  4375. // ;Internal 4.1
  4376. typedef struct tagMENUGETOBJECTINFO // ;Internal 4.1
  4377. { // ;Internal 4.1
  4378. DWORD dwFlags; // ;Internal 4.1
  4379. UINT uPos; // ;Internal 4.1
  4380. HMENU hmenu; // ;Internal 4.1
  4381. LPVOID riid; // ;Internal 4.1
  4382. LPVOID pvObj; // ;Internal 4.1
  4383. } MENUGETOBJECTINFO, FAR * LPMENUGETOBJECTINFO; // ;Internal 4.1
  4384. // ;Internal 4.1
  4385. /* // ;Internal 4.1
  4386. * MENUGETOBJECTINFO dwFlags values // ;Internal 4.1
  4387. */ // ;Internal 4.1
  4388. // ;Internal 4.1
  4389. #define MNGOF_TOPGAP 0x00000001 // ;Internal 4.1
  4390. #define MNGOF_BOTTOMGAP 0x00000002 // ;Internal 4.1
  4391. #define MNGOF_GAP 0x00000003 // ;Internal 4.1
  4392. #define MNGOF_CROSSBOUNDARY 0x00000004 // ;Internal 4.1
  4393. // ;Internal 4.1
  4394. /* WM_MENUGETOBJECT return value */ // ;Internal 4.1
  4395. #define MNGO_NOINTERFACE 0x00000000 // ;Internal 4.1
  4396. #define MNGO_NOERROR 0x00000001 // ;Internal 4.1
  4397. // ;Internal 4.1
  4398. #endif /* WINVER >= 0x40A */ // ;Internal 4.1
  4399. /****** Application termination *********************************************/
  4400. #ifdef tagWND // ;Internal
  4401. BOOL WINAPI PostQuitMessage(int); // ;Internal
  4402. #else // ;Internal
  4403. void WINAPI PostQuitMessage(int);
  4404. #endif // ;Internal
  4405. /****** Window class management *********************************************/
  4406. #ifdef tagWND /* ;Internal */
  4407. typedef LRESULT (CALLBACK* WNDPROC)(HWND_16, UINT, WPARAM, LPARAM); /* ;Internal */
  4408. #else /* ;Internal */
  4409. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  4410. #endif /* ;Internal */
  4411. typedef struct tagWNDCLASS
  4412. {
  4413. UINT style;
  4414. WNDPROC lpfnWndProc;
  4415. int cbClsExtra;
  4416. int cbWndExtra;
  4417. HINSTANCE hInstance;
  4418. HICON hIcon;
  4419. HCURSOR hCursor;
  4420. HBRUSH hbrBackground;
  4421. LPCSTR lpszMenuName;
  4422. LPCSTR lpszClassName;
  4423. } WNDCLASS;
  4424. typedef WNDCLASS* PWNDCLASS;
  4425. typedef WNDCLASS NEAR* NPWNDCLASS;
  4426. typedef WNDCLASS FAR* LPWNDCLASS;
  4427. /* ;Internal 4.0 */
  4428. typedef struct tagWNDCLASSEX /* ;Internal 4.0 */
  4429. { /* ;Internal 4.0 */
  4430. DWORD cbSize; /* ;Internal 4.0 */
  4431. DWORD style; /* ;Internal 4.0 */
  4432. WNDPROC lpfnWndProc; /* ;Internal 4.0 */
  4433. int cbClsExtra; /* ;Internal 4.0 */
  4434. int cbWndExtra; /* ;Internal 4.0 */
  4435. HINSTANCE hInstance; /* ;Internal 4.0 */
  4436. HICON hIcon; /* ;Internal 4.0 */
  4437. HCURSOR hCursor; /* ;Internal 4.0 */
  4438. HBRUSH hbrBackground; /* ;Internal 4.0 */
  4439. LPCSTR lpszMenuName; /* ;Internal 4.0 */
  4440. LPCSTR lpszClassName; /* ;Internal 4.0 */
  4441. HICON hIconSm; /* ;Internal 4.0 */
  4442. } WNDCLASSEX, FAR* LPWNDCLASSEX; /* ;Internal 4.0 */
  4443. ATOM WINAPI RegisterClass(const WNDCLASS FAR*);
  4444. ATOM WINAPI RegisterClassEx(const WNDCLASSEX FAR *); /* ;Internal 4.0 */
  4445. BOOL WINAPI UnregisterClass(LPCSTR, HINSTANCE);
  4446. BOOL WINAPI GetClassInfo(HINSTANCE, LPCSTR, LPWNDCLASS);
  4447. BOOL WINAPI GetClassInfoEx(HINSTANCE, LPCSTR, LPWNDCLASSEX); /* ;Internal 4.0 */
  4448. int WINAPI GetClassName(HWND, LPSTR, int);
  4449. #ifndef NOWINSTYLES
  4450. /* Class styles */
  4451. #define CS_VREDRAW 0x0001
  4452. #define CS_HREDRAW 0x0002
  4453. #define CS_KEYCVTWINDOW 0x0004
  4454. #define CS_DBLCLKS 0x0008
  4455. #define CS_OEMCHARS 0x0010 // ;Internal
  4456. #define CS_OWNDC 0x0020
  4457. #define CS_CLASSDC 0x0040
  4458. #define CS_PARENTDC 0x0080
  4459. #define CS_NOKEYCVT 0x0100
  4460. #define CS_NOCLOSE 0x0200
  4461. #define CS_LVB 0x0400 // ;Internal
  4462. #define CS_SAVEBITS 0x0800
  4463. #define CS_BYTEALIGNCLIENT 0x1000
  4464. #define CS_BYTEALIGNWINDOW 0x2000
  4465. #define CS_GLOBALCLASS 0x4000
  4466. #define CS_32BITCLASS 0x00008000 // ;Internal ONLY FOR USER.EXE
  4467. #define CS_SYSTEMCLASS 0x08000000 // ;Internal ONLY FOR USER.EXE
  4468. #define CS_SHORTCUT 0x10000000 // ;Internal ONLY FOR USER.EXE
  4469. #define CS_IME 0x00010000 // ;Internal for 4.0 IME.
  4470. #endif /* NOWINSTYLES */
  4471. #ifndef NOWINOFFSETS
  4472. WORD WINAPI GetClassWord(HWND, int);
  4473. WORD WINAPI SetClassWord(HWND, int, WORD);
  4474. LONG WINAPI GetClassLong(HWND, int);
  4475. LONG WINAPI SetClassLong(HWND, int, LONG);
  4476. /* Class field offsets for GetClassLong() and GetClassWord() */
  4477. #define GCL_MENUNAME (-8)
  4478. #define GCW_HBRBACKGROUND (-10)
  4479. #define GCW_HCURSOR (-12)
  4480. #define GCW_HICON (-14)
  4481. #define GCW_HMODULE (-16)
  4482. #define GCW_CBWNDEXTRA (-18)
  4483. #define GCW_CBCLSEXTRA (-20)
  4484. #define GCL_WNDPROC (-24)
  4485. #define GCW_STYLE (-26)
  4486. #if (WINVER >= 0x030a)
  4487. #define GCW_ATOM (-32)
  4488. #if (WINVER >= 0x0400) // ;Internal 4.0
  4489. #define GCW_HICONSM (-34) // ;Internal 4.0
  4490. #define GCL_STYLE GCW_STYLE // ;Internal 4.0
  4491. #endif /* WINVER >= 0x0400 */ // ;Internal 4.0
  4492. #endif /* WINVER >= 0x030a */
  4493. #endif /* NOWINOFFSETS */
  4494. /****** Window creation/destroy *********************************************/
  4495. /* Window Styles */
  4496. #ifndef NOWINSTYLES
  4497. /* Basic window types */
  4498. #define WS_OVERLAPPED 0x00000000L
  4499. #define WS_POPUP 0x80000000L
  4500. #define WS_CHILD 0x40000000L
  4501. /* Clipping styles */
  4502. #define WS_CLIPSIBLINGS 0x04000000L
  4503. #define WS_CLIPCHILDREN 0x02000000L
  4504. /* Generic window states */
  4505. #define WS_VISIBLE 0x10000000L
  4506. #define WS_DISABLED 0x08000000L
  4507. /* Main window states */
  4508. #define WS_MINIMIZE 0x20000000L
  4509. #define WS_MAXIMIZE 0x01000000L
  4510. /* Main window styles */
  4511. #define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */
  4512. #define WS_BORDERMASK 0x00C00000L // ;Internal
  4513. #define WS_BORDER 0x00800000L
  4514. #define WS_DLGFRAME 0x00400000L
  4515. #define WS_VSCROLL 0x00200000L
  4516. #define WS_HSCROLL 0x00100000L
  4517. #define WS_SYSMENU 0x00080000L
  4518. #define WS_THICKFRAME 0x00040000L
  4519. #define WS_MINIMIZEBOX 0x00020000L
  4520. #define WS_MAXIMIZEBOX 0x00010000L
  4521. /* Control window styles */
  4522. #define WS_GROUP 0x00020000L
  4523. #define WS_TABSTOP 0x00010000L
  4524. /* Common Window Styles */
  4525. #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
  4526. #define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU)
  4527. #define WS_CHILDWINDOW (WS_CHILD)
  4528. /* Extended Window Styles */
  4529. #define WS_EX_DLGMODALFRAME 0x00000001L
  4530. #define WS_EX_DRAGOBJECT 0x00000002L // ;Internal
  4531. #define WS_EX_NOPARENTNOTIFY 0x00000004L
  4532. #if (WINVER >= 0x030a)
  4533. #define WS_EX_TOPMOST 0x00000008L
  4534. #define WS_EX_ACCEPTFILES 0x00000010L
  4535. #define WS_EX_TRANSPARENT 0x00000020L
  4536. // ;Internal 4.0
  4537. #if (WINVER >= 0x0400) // ;Internal 4.0
  4538. #define WS_EX_MDICHILD 0x00000040L // ;Internal NT
  4539. #define WS_EX_TOOLWINDOW 0x00000080L // ;Internal 4.0
  4540. #define WS_EX_WINDOWEDGE 0x00000100L // ;Internal 4.0
  4541. #define WS_EX_CLIENTEDGE 0x00000200L // ;Internal 4.0
  4542. #define WS_EX_EDGEMASK (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE) // ;Internal 4.0
  4543. #define WS_EX_CONTEXTHELP 0x00000400L // ;Internal 4.0
  4544. // ;Internal 4.0
  4545. #define WS_EX_RIGHT 0x00001000L // ;Internal 4.0
  4546. #define WS_EX_LEFT 0x00000000L // ;Internal 4.0
  4547. #define WS_EX_RTLREADING 0x00002000L // ;Internal 4.0
  4548. #define WS_EX_LTRREADING 0x00000000L // ;Internal 4.0
  4549. #define WS_EX_LEFTSCROLLBAR 0x00004000L // ;Internal 4.0
  4550. #define WS_EX_RIGHTSCROLLBAR 0x00000000L // ;Internal 4.0
  4551. #define WS_EX_CONTROLPARENT 0x00010000L // ;Internal 4.0
  4552. #define WS_EX_STATICEDGE 0x00020000L // ;Internal 4.0
  4553. #define WS_EX_APPWINDOW 0x00040000L // ;Internal 4.0
  4554. #define WS_EX_ROUNDFRAME 0x00080000L // ;Internal 4.1
  4555. #define WS_EX_ANSICREATOR 0x80000000L // ;Internal NT
  4556. // ;Internal 4.0
  4557. #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE) // ;Internal 4.0
  4558. #define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST) // ;Internal 4.0
  4559. // ;Internal 4.0
  4560. #endif // ;Internal WINVER >= 0x0400
  4561. #endif /* WINVER >= 0x030a */
  4562. #define WS_EX_VALID 0x800F7FFFL /* ;Internal */
  4563. /* ;Internal */
  4564. /* Obsolete style names */
  4565. #define WS_TILED WS_OVERLAPPED
  4566. #define WS_ICONIC WS_MINIMIZE
  4567. #define WS_SIZEBOX WS_THICKFRAME
  4568. #define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
  4569. #define WS_VALID 0xffff0000L /* ;Internal */
  4570. /* ;Internal */
  4571. #endif /* NOWINSTYLES */
  4572. #if (WINVER >= 0x0400) // ;Internal
  4573. /* WM_PRINT flags */ // ;Internal 4.0
  4574. #define PRF_CHECKVISIBLE 0x00000001L // ;Internal 4.0
  4575. #define PRF_NONCLIENT 0x00000002L // ;Internal 4.0
  4576. #define PRF_CLIENT 0x00000004L // ;Internal 4.0
  4577. #define PRF_ERASEBKGND 0x00000008L // ;Internal 4.0
  4578. #define PRF_CHILDREN 0x00000010L // ;Internal 4.0
  4579. #define PRF_OWNED 0x00000020L // ;Internal 4.0
  4580. // ;Internal 4.0
  4581. /* 3D border styles */ // ;Internal 4.0
  4582. #define BDR_RAISEDOUTER 0x0001 // ;Internal 4.0
  4583. #define BDR_SUNKENOUTER 0x0002 // ;Internal 4.0
  4584. #define BDR_RAISEDINNER 0x0004 // ;Internal 4.0
  4585. #define BDR_SUNKENINNER 0x0008 // ;Internal 4.0
  4586. // ;Internal 4.0
  4587. #define BDR_OUTER 0x0003 // ;Internal 4.0
  4588. #define BDR_INNER 0x000c // ;Internal 4.0
  4589. #define BDR_RAISED 0x0005 // ;Internal 4.0
  4590. #define BDR_SUNKEN 0x000a // ;Internal 4.0
  4591. // ;Internal 4.0
  4592. #define BDR_VALID 0x000F // ;Internal 4.0
  4593. // ;Internal 4.0
  4594. #define EDGE_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER) // ;Internal 4.0
  4595. #define EDGE_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER) // ;Internal 4.0
  4596. #define EDGE_ETCHED (BDR_SUNKENOUTER | BDR_RAISEDINNER) // ;Internal 4.0
  4597. #define EDGE_BUMP (BDR_RAISEDOUTER | BDR_SUNKENINNER) // ;Internal 4.0
  4598. // ;Internal 4.0
  4599. /* Border flags */ // ;Internal 4.0
  4600. #define BF_LEFT 0x0001 // ;Internal 4.0
  4601. #define BF_TOP 0x0002 // ;Internal 4.0
  4602. #define BF_RIGHT 0x0004 // ;Internal 4.0
  4603. #define BF_BOTTOM 0x0008 // ;Internal 4.0
  4604. // ;Internal 4.0
  4605. #define BF_TOPLEFT (BF_TOP | BF_LEFT) // ;Internal 4.0
  4606. #define BF_TOPRIGHT (BF_TOP | BF_RIGHT) // ;Internal 4.0
  4607. #define BF_BOTTOMLEFT (BF_BOTTOM | BF_LEFT) // ;Internal 4.0
  4608. #define BF_BOTTOMRIGHT (BF_BOTTOM | BF_RIGHT) // ;Internal 4.0
  4609. #define BF_RECT (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM) // ;Internal 4.0
  4610. // ;Internal 4.0
  4611. #define BF_DIAGONAL 0x0010 // ;Internal 4.0
  4612. // ;Internal 4.0
  4613. #define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL | BF_TOP | BF_RIGHT) // ;Internal 4.0
  4614. #define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL | BF_TOP | BF_LEFT) // ;Internal 4.0
  4615. #define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL | BF_BOTTOM | BF_LEFT) // ;Internal 4.0
  4616. #define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT) // ;Internal 4.0
  4617. // ;Internal 4.0
  4618. #define BF_MIDDLE 0x0800 // ;Internal 4.0
  4619. #define BF_SOFT 0x1000 // ;Internal 4.0
  4620. #define BF_ADJUST 0x2000 // ;Internal 4.0
  4621. #define BF_FLAT 0x4000 // ;Internal 4.0
  4622. #define BF_MONO 0x8000 // ;Internal 4.0
  4623. // ;Internal 4.0
  4624. // ;Internal 4.0
  4625. BOOL WINAPI DrawEdge(HDC, LPRECT, UINT, UINT); // ;Internal 4.0
  4626. // ;Internal 4.0
  4627. /* flags for DrawFrameControl */ // ;Internal 4.0
  4628. #define DFC_CAPTION 1 // ;Internal 4.0
  4629. #define DFC_MENU 2 // ;Internal 4.0
  4630. #define DFC_SCROLL 3 // ;Internal 4.0
  4631. #define DFC_BUTTON 4 // ;Internal 4.0
  4632. #define DFC_POPUPMENU 5 // ;Internal 4.0
  4633. #define DFC_CACHE 0xFFFF // ;Internal 4.0
  4634. // ;Internal 4.0
  4635. #define DFCS_CAPTIONCLOSE 0x0000 // ;Internal 4.0
  4636. #define DFCS_CAPTIONMIN 0x0001 // ;Internal 4.0
  4637. #define DFCS_CAPTIONMAX 0x0002 // ;Internal 4.0
  4638. #define DFCS_CAPTIONRESTORE 0x0003 // ;Internal 4.0
  4639. #define DFCS_CAPTIONHELP 0x0004 // ;Internal 4.0
  4640. #define DFCS_INMENU 0x0040 // ;Internal 4.0
  4641. #define DFCS_INSMALL 0x0080 // ;Internal 4.0
  4642. // ;Internal 4.0
  4643. #define DFCS_MENUARROW 0x0000 // ;Internal 4.0
  4644. #define DFCS_MENUCHECK 0x0001 // ;Internal 4.0
  4645. #define DFCS_MENUBULLET 0x0002 // ;Internal 4.0
  4646. #define DFCS_MENUARROWRIGHT 0x0004 // ;Internal 4.0
  4647. #if (WINVER >= 0x40A) // ;Internal 4.1
  4648. #define DFCS_MENUARROWUP 0x0008 // ;Internal 4.1
  4649. #define DFCS_MENUARROWDOWN 0x0010 // ;Internal 4.1
  4650. #endif // (WINVER >= 0x40A) // ;Internal 4.1
  4651. // ;Internal 4.0
  4652. #define DFCS_SCROLLMIN 0x0000 // ;Internal 4.0
  4653. #define DFCS_SCROLLVERT 0x0000 // ;Internal 4.0
  4654. #define DFCS_SCROLLMAX 0x0001 // ;Internal 4.0
  4655. #define DFCS_SCROLLHORZ 0x0002 // ;Internal 4.0
  4656. #define DFCS_SCROLLLINE 0x0004 // ;Internal 4.0
  4657. // ;Internal 4.0
  4658. #define DFCS_SCROLLUP 0x0000 // ;Internal 4.0
  4659. #define DFCS_SCROLLDOWN 0x0001 // ;Internal 4.0
  4660. #define DFCS_SCROLLLEFT 0x0002 // ;Internal 4.0
  4661. #define DFCS_SCROLLRIGHT 0x0003 // ;Internal 4.0
  4662. #define DFCS_SCROLLCOMBOBOX 0x0005 // ;Internal 4.0
  4663. #define DFCS_SCROLLSIZEGRIP 0x0008 // ;Internal 4.0
  4664. #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010 // ;Internal 4.0
  4665. // ;Internal 4.0
  4666. #define DFCS_BUTTONCHECK 0x0000 // ;Internal 4.0
  4667. #define DFCS_BUTTONRADIOIMAGE 0x0001 // ;Internal 4.0
  4668. #define DFCS_BUTTONRADIOMASK 0x0002 // ;Internal 4.0
  4669. #define DFCS_BUTTONRADIO 0x0004 // ;Internal 4.0
  4670. #define DFCS_BUTTON3STATE 0x0008 // ;Internal 4.0
  4671. #define DFCS_BUTTONPUSH 0x0010 // ;Internal 4.0
  4672. // ;Internal 4.0
  4673. #define DFCS_CACHEICON 0x0000 // ;Internal 4.0
  4674. #define DFCS_CACHEBUTTONS 0x0001 // ;Internal 4.0
  4675. // ;Internal 4.0
  4676. #define DFCS_INACTIVE 0x0100 // ;Internal 4.0
  4677. #define DFCS_PUSHED 0x0200 // ;Internal 4.0
  4678. #define DFCS_CHECKED 0x0400 // ;Internal 4.0
  4679. #if (WINVER >= 0x40A) // ;Internal 4.1
  4680. #define DFCS_TRANSPARENT 0x0800 // ;Internal 4.1
  4681. #define DFCS_HOT 0x1000 // ;Internal 4.1
  4682. #endif // (WINVER >= 0x40A) // ;Internal 4.1
  4683. #define DFCS_ADJUSTRECT 0x2000 // ;Internal 4.0
  4684. #define DFCS_FLAT 0x4000 // ;Internal 4.0
  4685. #define DFCS_MONO 0x8000 // ;Internal 4.0
  4686. // ;Internal 4.0
  4687. BOOL WINAPI DrawFrameControl(HDC, LPRECT, UINT, UINT); // ;Internal 4.0
  4688. // ;Internal 4.0
  4689. /* flags for DrawCaption */ // ;Internal 4.0
  4690. #define DC_ACTIVE 0x0001 // ;Internal 4.0
  4691. #define DC_SMALLCAP 0x0002 // ;Internal 4.0
  4692. #define DC_ICON 0x0004 // ;Internal 4.0
  4693. #define DC_TEXT 0x0008 // ;Internal 4.0
  4694. #define DC_INBUTTON 0x0010 // ;Internal 4.0
  4695. #if (WINVER >= 0x40A) // ;Internal 4.1
  4696. #define DC_GRADIENT 0x0020 // ;Internal 4.1
  4697. #endif // (WINVER >=0x40A) // ;Internal 4.1
  4698. #define DC_NOVISIBLE 0x0800 // ;Internal
  4699. #define DC_BUTTONS 0x1000 // ;Internal
  4700. #define DC_NOSENDMSG 0x2000 // ;Internal
  4701. #define DC_CENTER 0x4000 // ;Internal
  4702. #define DC_FRAME 0x8000 // ;Internal
  4703. #define DC_CAPTION (DC_ICON | DC_TEXT | DC_BUTTONS)// ;Internal
  4704. #define DC_NC (DC_CAPTION | DC_FRAME) // ;Internal
  4705. // ;Internal 4.0
  4706. BOOL WINAPI DrawCaption(HWND, HDC, LPRECT, UINT); // ;Internal 4.0
  4707. BOOL WINAPI DrawCaptionTemp(HWND, HDC, LPRECT, HFONT, HICON, LPSTR, UINT); // ;Internal 4.0
  4708. // ;Internal 4.0
  4709. BOOL WINAPI PlaySoundEvent(int idSound); // ;Internal
  4710. // ;Internal 4.0
  4711. #define IDANI_OPEN 1 // ;Internal 4.0
  4712. #define IDANI_CLOSE 2 // ;Internal 4.0
  4713. #define IDANI_CAPTION 3 // ;Internal 4.0
  4714. #if (WINVER >= 0x40A) // ;Internal 4.1
  4715. #define IDANI_BORDER 4 // ;Internal 4.1
  4716. #define IDANI_SLIDE 5 // ;Internal 4.1
  4717. #endif // (WINVER >=0x40A) // ;Internal 4.1
  4718. BOOL WINAPI DrawAnimatedRects(HWND, int, LPCRECT, LPCRECT); // ;Internal 4.0
  4719. #endif // WINVER >= VER40 // ;Internal
  4720. #if (WINVER >= 0x40A) // ;Internal 4.1
  4721. #define PAS_IN 0x0001 // ;Internal 4.1
  4722. #define PAS_OUT 0x0002 // ;Internal 4.1
  4723. #define PAS_LEFT 0x0004 // ;Internal 4.1
  4724. #define PAS_RIGHT 0x0008 // ;Internal 4.1
  4725. #define PAS_UP 0x0010 // ;Internal 4.1
  4726. #define PAS_DOWN 0x0020 // ;Internal 4.1
  4727. #define PAS_HORZ (PAS_LEFT | PAS_RIGHT) // ;Internal
  4728. #define PAS_VERT (PAS_UP | PAS_DOWN) // ;Internal
  4729. #endif // (WINVER >=0x40A) // ;Internal 4.1
  4730. /* Special value for CreateWindow, et al. */
  4731. #define HWND_DESKTOP ((HWND)0)
  4732. #if (WINVER >= 0x40A) // ;Internal 4.1
  4733. #define HWND_MESSAGE ((HWND)-3)
  4734. #endif // (WINVER >=0x40A) // ;Internal 4.1
  4735. #ifdef tagWND // ;Internal
  4736. BOOL WINAPI IsWindow(HWND_16); // ;Internal
  4737. #else // ;Internal
  4738. BOOL WINAPI IsWindow(HWND);
  4739. #endif // tagWND // ;Internal
  4740. #ifdef tagWND /* ;Internal */
  4741. HWND_16 WINAPI CreateWindow(LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND_16, HMENU_16, HINSTANCE, void FAR*); /* ;Internal */
  4742. HWND_16 WINAPI CreateWindowEx(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND_16, HMENU_16, HINSTANCE, void FAR*); /* ;Internal */
  4743. #else /* ;Internal */
  4744. HWND WINAPI CreateWindow(LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, void FAR*);
  4745. HWND WINAPI CreateWindowEx(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, void FAR*);
  4746. #endif /* ;Internal */
  4747. /* WM_CREATE/WM_NCCREATE lParam struct */
  4748. typedef struct tagCREATESTRUCT
  4749. {
  4750. void FAR* lpCreateParams;
  4751. HINSTANCE hInstance;
  4752. #ifdef tagWND /* ;Internal */
  4753. HMENU_16 hMenu; /* ;Internal */
  4754. HWND_16 hwndParent; /* ;Internal */
  4755. #else /* ;Internal */
  4756. HMENU hMenu;
  4757. HWND hwndParent;
  4758. #endif /* ;Internal */
  4759. int cy;
  4760. int cx;
  4761. int y;
  4762. int x;
  4763. LONG style;
  4764. LPCSTR lpszName;
  4765. LPCSTR lpszClass;
  4766. DWORD dwExStyle;
  4767. } CREATESTRUCT, FAR * LPCREATESTRUCT;
  4768. BOOL WINAPI DestroyWindow(HWND);
  4769. /* Basic window attributes */
  4770. HTASK WINAPI GetWindowTask(HWND);
  4771. BOOL WINAPI IsChild(HWND, HWND);
  4772. #ifdef tagWND /* ;Internal */
  4773. HWND_16 WINAPI GetParent(HWND); /* ;Internal */
  4774. HWND_16 WINAPI SetParent(HWND, HWND);/* ;Internal */
  4775. #else /* ;Internal */
  4776. HWND WINAPI GetParent(HWND);
  4777. HWND WINAPI SetParent(HWND, HWND);
  4778. #endif /* ;Internal */
  4779. BOOL WINAPI IsWindowVisible(HWND);
  4780. BOOL WINAPI ShowWindow(HWND, int);
  4781. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  4782. BOOL WINAPI ShowWindowAsync(HWND, int); /* ;Internal 4.0 */
  4783. #endif /* ;Internal 4.0 */
  4784. #if (WINVER >= 0x040A) /* ;Internal 4.1 */
  4785. BOOL WINAPI AnimateWindow(HWND, DWORD, DWORD); /* ;Internal 4.1 */
  4786. #endif /* ;Internal 4.1 */
  4787. #ifndef NOSHOWWINDOW
  4788. #define SW_HIDE 0
  4789. #define SW_SHOWNORMAL 1
  4790. #define SW_NORMAL SW_SHOWNORMAL
  4791. #define SW_SHOWMINIMIZED 2
  4792. #define SW_SHOWMAXIMIZED 3
  4793. #define SW_MAXIMIZE SW_SHOWMAXIMIZED
  4794. #define SW_SHOWNOACTIVATE 4
  4795. #define SW_SHOW 5
  4796. #define SW_MINIMIZE 6
  4797. #define SW_SHOWMINNOACTIVE 7
  4798. #define SW_SHOWNA 8
  4799. #define SW_RESTORE 9
  4800. #define SW_SHOWDEFAULT 10 /* ;Internal NT */
  4801. #define SW_MAX 10 /* ;Internal */
  4802. /* Obsolete ShowWindow() command names */
  4803. #define HIDE_WINDOW SW_HIDE
  4804. #define SHOW_OPENWINDOW SW_SHOWNORMAL
  4805. #define SHOW_ICONWINDOW SW_SHOWMINIMIZED
  4806. #define SHOW_FULLSCREEN SW_SHOWMAXIMIZED
  4807. #define SHOW_OPENNOACTIVATE SW_SHOWNOACTIVATE
  4808. /* WM_SHOWWINDOW wParam codes */
  4809. #define SW_PARENTCLOSING 1
  4810. #define SW_OTHERMAXIMIZED 2
  4811. #define SW_PARENTOPENING 3
  4812. #define SW_OTHERRESTORED 4
  4813. /* Obsolete constant names */
  4814. #define SW_OTHERZOOM SW_OTHERMAXIMIZED
  4815. #define SW_OTHERUNZOOM SW_OTHERRESTORED
  4816. #endif /* NOSHOWWINDOW */
  4817. #if (WINVER >=0x40A) // ;Internal
  4818. // // ;Internal
  4819. // AnimateWindow() Commands // ;Internal
  4820. // // ;Internal
  4821. #define AW_HOR_POSITIVE 0x00000001 // ;Internal
  4822. #define AW_HOR_NEGATIVE 0x00000002 // ;Internal
  4823. #define AW_VER_POSITIVE 0x00000004 // ;Internal
  4824. #define AW_VER_NEGATIVE 0x00000008 // ;Internal
  4825. #define AW_CENTER 0x00000010 // ;Internal
  4826. #define AW_HIDE 0x00010000 // ;Internal
  4827. #define AW_ACTIVATE 0x00020000 // ;Internal
  4828. #define AW_SLIDE 0x00040000 // ;Internal
  4829. #define AW_BLEND 0x00080000 // ;Internal
  4830. // ;Internal
  4831. #define AW_VALID (AW_HOR_POSITIVE |\
  4832. AW_HOR_NEGATIVE |\
  4833. AW_VER_POSITIVE |\
  4834. AW_VER_NEGATIVE |\
  4835. AW_CENTER |\
  4836. AW_HIDE |\
  4837. AW_ACTIVATE |\
  4838. AW_SLIDE |\
  4839. AW_BLEND) // ;Internal
  4840. #endif // (WINVER >=0x40A) // ;Internal
  4841. /* Enabled state */
  4842. BOOL WINAPI EnableWindow(HWND,BOOL);
  4843. BOOL WINAPI IsWindowEnabled(HWND);
  4844. /* Window text */
  4845. #ifdef tagWND // ;Internal
  4846. BOOL WINAPI SetWindowText(HWND, LPCSTR); // ;Internal
  4847. DWORD WINAPI GetWindowTextLength(HWND); // ;Internal
  4848. #else // ;Internal
  4849. void WINAPI SetWindowText(HWND, LPCSTR);
  4850. int WINAPI GetWindowTextLength(HWND);
  4851. #endif // ;Internal
  4852. int WINAPI GetWindowText(HWND, LPSTR, int);
  4853. /* Window words */
  4854. WORD WINAPI GetWindowWord(HWND, int);
  4855. WORD WINAPI SetWindowWord(HWND, int, WORD);
  4856. LONG WINAPI GetWindowLong(HWND, int);
  4857. LONG WINAPI SetWindowLong(HWND, int, LONG);
  4858. /* Window field offsets for GetWindowLong() and GetWindowWord() */
  4859. #ifndef NOWINOFFSETS
  4860. #define GWL_WNDPROC (-4)
  4861. #define GWW_HINSTANCE (-6)
  4862. #define GWW_HWNDPARENT (-8)
  4863. #define GWW_ID (-12)
  4864. #define GWL_STYLE (-16)
  4865. #define GWL_EXSTYLE (-20)
  4866. #define GWL_USERDATA (-21) /* ;Internal NT */
  4867. #endif /* NOWINOFFSETS */
  4868. /* ;Internal NT */
  4869. // BOOL WINAPI IsWindowUnicode(HWND); /* ;Internal NT */
  4870. #ifdef FE_IME // ;Internal IMM
  4871. #define SWIMC_SET (0) // ;internal IMM
  4872. #define SWIMC_RESET (1) // ;internal IMM
  4873. #define SWIMC_HIMC (2) // ;internal IMM
  4874. #define SWIMC_HSAVEDIMC (3) // ;internal IMM
  4875. #define SWIMC_RESETFORTHISIMC (4) // ;internal IMM
  4876. #define SWIMC_SETNULLTOIMC (5) // ;internal IMM
  4877. #endif // ;Internal IMM
  4878. /****** Window size, position, Z-order, and visibility **********************/
  4879. #define CW_USEDEFAULT ((int)0x8000)
  4880. #ifdef tagWND // ;Internal
  4881. BOOL WINAPI GetClientRect(HWND, LPRECT); // ;Internal
  4882. BOOL WINAPI GetWindowRect(HWND, LPRECT); // ;Internal
  4883. #else // ;Internal
  4884. void WINAPI GetClientRect(HWND, LPRECT);
  4885. void WINAPI GetWindowRect(HWND, LPRECT);
  4886. #endif // ;Internal
  4887. // Multiple Monitor APIs // ;Internal
  4888. #if (WINVER >= 0x040A) // ;Internal
  4889. // ;Internal
  4890. #ifdef tagWND // ;Internal
  4891. #define HMONITOR PMONITOR // ;Internal
  4892. #else // ;Internal
  4893. DECLARE_HANDLE(HMONITOR); // ;Internal
  4894. #endif // tagWND // ;Internal
  4895. // ;Internal
  4896. #define MONITOR_DEFAULTTONULL 0x0000 // ;Internal
  4897. #define MONITOR_DEFAULTTOPRIMARY 0x0001 // ;Internal
  4898. #define MONITOR_DEFAULTTONEAREST 0x0002 // ;Internal
  4899. #define MONITOR_VALID 0x0003 // ;Internal
  4900. // ;Internal
  4901. #define MONITORINFOF_PRIMARY 0x00000001 // ;Internal
  4902. // ;Internal
  4903. HMONITOR WINAPI MonitorFromPoint(POINT, UINT); // ;Internal
  4904. HMONITOR WINAPI MonitorFromRect(LPCRECT, UINT); // ;Internal
  4905. HMONITOR WINAPI MonitorFromWindow(HWND, UINT); // ;Internal
  4906. // ;Internal
  4907. // ;Internal
  4908. typedef struct tagMONITORINFO // ;Internal
  4909. { // ;Internal
  4910. DWORD cbSize; // ;Internal
  4911. RECTL rcMonitor; // ;Internal
  4912. RECTL rcWork; // ;Internal
  4913. DWORD dwFlags; // ;Internal
  4914. } MONITORINFO, FAR * LPMONITORINFO; // ;Internal
  4915. // ;Internal
  4916. typedef struct tagMONITORINFOEX // ;Internal
  4917. { // ;Internal
  4918. MONITORINFO mi; // ;Internal
  4919. char szDeviceName[32]; // ;Internal
  4920. } MONITORINFOEX, FAR * LPMONITORINFOEX; // ;Internal
  4921. // ;Internal
  4922. BOOL WINAPI GetMonitorInfo(HMONITOR, LPMONITORINFO); // ;Internal
  4923. // ;Internal
  4924. // ;Internal
  4925. typedef BOOL (CALLBACK* MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM); // ;Internal
  4926. BOOL WINAPI EnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM); // ;Internal
  4927. #endif // WINVER >= 0x040A // ;Internal
  4928. #if (WINVER >= 0x030a)
  4929. typedef struct tagWINDOWPLACEMENT
  4930. {
  4931. UINT length;
  4932. UINT flags;
  4933. UINT showCmd;
  4934. POINT ptMinPosition;
  4935. POINT ptMaxPosition;
  4936. RECT rcNormalPosition;
  4937. } WINDOWPLACEMENT;
  4938. typedef WINDOWPLACEMENT *PWINDOWPLACEMENT;
  4939. typedef WINDOWPLACEMENT FAR* LPWINDOWPLACEMENT;
  4940. #define WPF_SETMINPOSITION 0x0001
  4941. #define WPF_RESTORETOMAXIMIZED 0x0002
  4942. #define WPF_VALID 0x0003 /* ;Internal */
  4943. BOOL WINAPI GetWindowPlacement(HWND, WINDOWPLACEMENT FAR*);
  4944. BOOL WINAPI SetWindowPlacement(HWND, const WINDOWPLACEMENT FAR*);
  4945. #endif /* WINVER >= 0x030a */
  4946. #ifdef tagWND // ;Internal
  4947. BOOL WINAPI SetWindowPos(HWND, HWNDC, int, int, int, int, UINT); // ;Internal
  4948. #else // ;Internal
  4949. BOOL WINAPI SetWindowPos(HWND, HWND, int, int, int, int, UINT);
  4950. #endif // ;Internal
  4951. // ;Internal
  4952. /* SetWindowPos() and WINDOWPOS flags */
  4953. #define SWP_NOSIZE 0x0001
  4954. #define SWP_NOMOVE 0x0002
  4955. #define SWP_NOZORDER 0x0004
  4956. #define SWP_NOREDRAW 0x0008
  4957. #define SWP_NOACTIVATE 0x0010
  4958. #define SWP_FRAMECHANGED 0x0020 /* The frame changed: send WM_NCCALCSIZE */
  4959. #define SWP_SHOWWINDOW 0x0040
  4960. #define SWP_HIDEWINDOW 0x0080
  4961. #define SWP_NOCOPYBITS 0x0100
  4962. #define SWP_NOOWNERZORDER 0x0200 /* Don't do owner Z ordering */
  4963. #define SWP_DRAWFRAME SWP_FRAMECHANGED
  4964. #define SWP_NOREPOSITION SWP_NOOWNERZORDER
  4965. #define SWP_NOCLIENTSIZE 0x0800 // Client didn't resize ;Internal
  4966. #define SWP_NOCLIENTMOVE 0x1000 // Client didn't move ;Internal
  4967. #define SWP_NOSENDCHANGING 0x0400
  4968. #define SWP_DEFERERASE 0x2000
  4969. #define SWP_ASYNCWINDOWPOS 0x4000 /* ;Internal NT BOGUS - make sure this is the same as NT! */
  4970. #define SWP_STATECHANGE 0x8000 /* ;Internal Force size, move messages */
  4971. /* Don't do any drawing or erasing */ /* ;Internal */
  4972. #define SWP_DEFERDRAWING SWP_DEFERERASE /* ;Internal */
  4973. #define SWP_CREATESPB 0x4000 /* ;Internal */
  4974. /* ;Internal */
  4975. #define SWP_CHANGEMASK (SWP_NOSIZE | SWP_NOMOVE | /* ;Internal */ \
  4976. SWP_NOZORDER | SWP_FRAMECHANGED | /* ;Internal */ \
  4977. SWP_SHOWWINDOW | SWP_HIDEWINDOW | /* ;Internal */ \
  4978. SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE)/* ;Internal */
  4979. /* ;Internal */
  4980. #define SWP_NOCHANGE (SWP_NOSIZE | SWP_NOMOVE | /* ;Internal */ \
  4981. SWP_NOZORDER | SWP_NOCLIENTSIZE | /* ;Internal */ \
  4982. SWP_NOCLIENTMOVE) /* ;Internal */
  4983. #define SWP_VALID 0x67ff /* ;Internal */
  4984. /* ;Internal */
  4985. /* SetWindowPos() hwndInsertAfter field values */
  4986. #define HWND_TOP ((HWND)0)
  4987. #define HWND_BOTTOM ((HWND)1)
  4988. #define HWND_TOPMOST ((HWND)-1)
  4989. #define HWND_NOTOPMOST ((HWND)-2)
  4990. #define HWND_GROUPTOTOP HWND_TOPMOST /* ;Internal */
  4991. #ifndef NODEFERWINDOWPOS
  4992. DECLARE_HANDLE(HDWP);
  4993. HDWP WINAPI BeginDeferWindowPos(int);
  4994. #ifdef tagWND // ;Internal
  4995. HDWP WINAPI DeferWindowPos(HDWP, HWND, HWNDC, int, int, int, int, UINT); // ;Internal
  4996. #else // ;Internal
  4997. HDWP WINAPI DeferWindowPos(HDWP, HWND, HWND, int, int, int, int, UINT);
  4998. #endif // ;Internal
  4999. BOOL WINAPI EndDeferWindowPos(HDWP);
  5000. #if (WINVER >= 0x0400) // ;Internal
  5001. BOOL WINAPI EndDeferWindowPosEx(HDWP, BOOL); // ;Internal NT
  5002. #endif // ;Internal
  5003. #endif /* NODEFERWINDOWPOS */
  5004. BOOL WINAPI MoveWindow(HWND, int, int, int, int, BOOL);
  5005. BOOL WINAPI BringWindowToTop(HWND);
  5006. #if (WINVER >= 0x030a)
  5007. /* WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam */
  5008. typedef struct tagWINDOWPOS
  5009. {
  5010. #ifdef tagWND /* ;Internal */
  5011. HWND_16 hwnd; /* ;Internal */
  5012. HWND_16 hwndInsertAfter; /* ;Internal */
  5013. #else /* ;Internal */
  5014. HWND hwnd;
  5015. HWND hwndInsertAfter;
  5016. #endif /* ;Internal */
  5017. int x;
  5018. int y;
  5019. int cx;
  5020. int cy;
  5021. UINT flags;
  5022. } WINDOWPOS;
  5023. typedef WINDOWPOS FAR* LPWINDOWPOS;
  5024. #endif /* WINVER >= 0x030a */
  5025. /* WM_SIZE message wParam values */
  5026. #define SIZE_RESTORED 0
  5027. #define SIZE_MINIMIZED 1
  5028. #define SIZE_MAXIMIZED 2
  5029. #define SIZE_MAXSHOW 3
  5030. #define SIZE_MAXHIDE 4
  5031. /* Obsolete constant names */
  5032. #define SIZENORMAL SIZE_RESTORED
  5033. #define SIZEICONIC SIZE_MINIMIZED
  5034. #define SIZEFULLSCREEN SIZE_MAXIMIZED
  5035. #define SIZEZOOMSHOW SIZE_MAXSHOW
  5036. #define SIZEZOOMHIDE SIZE_MAXHIDE
  5037. /****** Window proc implementation & subclassing support *********************/
  5038. LRESULT WINAPI DefWindowProc(HWND, UINT, WPARAM, LPARAM);
  5039. #ifdef STRICT
  5040. LRESULT WINAPI CallWindowProc(WNDPROC, HWND, UINT, WPARAM, LPARAM);
  5041. #else
  5042. LRESULT WINAPI CallWindowProc(FARPROC, HWND, UINT, WPARAM, LPARAM);
  5043. #endif
  5044. /****** Main window support **************************************************/
  5045. void WINAPI AdjustWindowRect(LPRECT, DWORD, BOOL);
  5046. #ifdef tagWND // ;Internal
  5047. BOOL WINAPI AdjustWindowRectEx(LPRECT, DWORD, BOOL, DWORD); // ;Internal
  5048. #else // ;Internal
  5049. void WINAPI AdjustWindowRectEx(LPRECT, DWORD, BOOL, DWORD);
  5050. #endif // ;Internal
  5051. /* Struct pointed to by WM_GETMINMAXINFO lParam */
  5052. typedef struct tagMINMAXINFO
  5053. {
  5054. #if (WINVER >= 0x40A)
  5055. POINT ptMinSize;
  5056. #else
  5057. POINT ptReserved;
  5058. #endif // (WINVER >= 0x40A)
  5059. POINT ptMaxSize;
  5060. POINT ptMaxPosition;
  5061. POINT ptMinTrackSize;
  5062. POINT ptMaxTrackSize;
  5063. } MINMAXINFO, FAR * LPMINMAXINFO;
  5064. BOOL WINAPI FlashWindow(HWND, BOOL);
  5065. #if (WINVER >= 0x40A)
  5066. #define FLASHW_STOP 0 // ;internal 4.1
  5067. #define FLASHW_CAPTION 0x00000001 // ;internal 4.1
  5068. #define FLASHW_TRAY 0x00000002 // ;internal 4.1
  5069. #define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY) // ;internal 4.1
  5070. #define FLASHW_TIMER 0x00000004 // ;internal 4.1
  5071. #define FLASHW_FLASHNOFG 0x00000008 // ;internal 4.1
  5072. #define FLASHW_TIMERNOFG 0x0000000C // ;internal 4.1
  5073. #define FLASHW_VALID (FLASHW_ALL | FLASHW_TIMERNOFG) // ;internal 4.1
  5074. #define FLASHW_KILLTIMER 0x40000000 // ;internal 4.1
  5075. #define FLASHW_ON 0x80000000 // ;internal 4.1
  5076. #endif
  5077. #ifdef tagWND // ;Internal
  5078. BOOL WINAPI ShowOwnedPopups(HWND, BOOL); // ;Internal
  5079. #else // ;Internal
  5080. void WINAPI ShowOwnedPopups(HWND, BOOL);
  5081. #endif // ;Internal
  5082. /* Obsolete functions */
  5083. BOOL WINAPI OpenIcon(HWND);
  5084. #ifdef tagWND // ;Internal
  5085. BOOL WINAPI CloseWindow(HWND); // ;Internal
  5086. #else // ;Internal
  5087. void WINAPI CloseWindow(HWND);
  5088. #endif // ;Internal
  5089. BOOL WINAPI AnyPopup(void);
  5090. BOOL WINAPI IsIconic(HWND);
  5091. BOOL WINAPI IsZoomed(HWND);
  5092. /****** Window coordinate mapping and hit-testing ***************************/
  5093. #ifdef tagWND // ;Internal
  5094. BOOL WINAPI ClientToScreen(HWND, LPPOINT); // ;Internal
  5095. BOOL WINAPI ScreenToClient(HWND, LPPOINT); // ;Internal
  5096. #else // ;Internal
  5097. void WINAPI ClientToScreen(HWND, LPPOINT);
  5098. void WINAPI ScreenToClient(HWND, LPPOINT);
  5099. #endif // ;Internal
  5100. #if (WINVER >= 0x030a)
  5101. void WINAPI MapWindowPoints(HWND hwndFrom, HWND hwndTo, POINT FAR* lppt, UINT cpt);
  5102. #endif /* WINVER >= 0x030a */
  5103. #ifdef tagWND /* ;Internal */
  5104. HWND_16 WINAPI WindowFromPoint(POINT); /* ;Internal */
  5105. HWND_16 WINAPI ChildWindowFromPoint(HWND, POINT); /* ;Internal */
  5106. #else /* ;Internal */
  5107. HWND WINAPI WindowFromPoint(POINT);
  5108. HWND WINAPI ChildWindowFromPoint(HWND, POINT);
  5109. #endif /* ;Internal */
  5110. /* ;Internal 4.0 */
  5111. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  5112. #define CWP_ALL 0x0000 /* ;Internal 4.0 */
  5113. #define CWP_SKIPINVISIBLE 0x0001 /* ;Internal 4.0 */
  5114. #define CWP_SKIPDISABLED 0x0002 /* ;Internal 4.0 */
  5115. #define CWP_SKIPTRANSPARENT 0x0004 /* ;Internal 4.0 */
  5116. #define CWP_VALID 0x0007 /* ;Internal 4.0 */
  5117. /* ;Internal 4.0 */
  5118. #ifdef tagWND /* ;Internal 4.0 */
  5119. HWND_16 WINAPI ChildWindowFromPointEx(HWND, POINT, UINT); /* ;Internal 4.0 */
  5120. #else /* ;Internal 4.0 */
  5121. HWND WINAPI ChildWindowFromPointEx(HWND, POINT, UINT); /* ;Internal 4.0 */
  5122. #endif /* ;Internal 4.0 */
  5123. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  5124. /****** Window query and enumeration ****************************************/
  5125. #ifdef tagWND /* ;Internal */
  5126. HWND_16 WINAPI GetDesktopWindow(void); /* ;Internal */
  5127. HWND_16 WINAPI FindWindow(LPCSTR, LPCSTR); /* ;Internal */
  5128. HWND_16 WINAPI FindWindowEx(HWND, HWND, LPCSTR, LPCSTR); /* ;Internal 4.0 */
  5129. HWND_16 WINAPI GetShellWindow(void); /* ;Internal 4.0 */
  5130. BOOL WINAPI SetShellWindow(HWND_16); /* ;Internal 4.0 */
  5131. #else /* ;Internal */
  5132. HWND WINAPI GetDesktopWindow(void);
  5133. HWND WINAPI FindWindow(LPCSTR, LPCSTR);
  5134. HWND WINAPI FindWindowEx(HWND, HWND, LPCSTR, LPCSTR); /* ;Internal 4.0 */
  5135. HWND WINAPI GetShellWindow(void); /* ;Internal 4.0 */
  5136. BOOL WINAPI SetShellWindow(HWND); /* ;Internal 4.0 */
  5137. #endif /* ;Internal */
  5138. #ifdef STRICT
  5139. #ifdef tagWND /* ;Internal */
  5140. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND_16, LPARAM); /* ;Internal */
  5141. #else /* ;Internal */
  5142. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  5143. #endif /* ;Internal */
  5144. #else
  5145. typedef FARPROC WNDENUMPROC;
  5146. #endif
  5147. BOOL WINAPI EnumWindows(WNDENUMPROC, LPARAM);
  5148. BOOL WINAPI EnumChildWindows(HWND, WNDENUMPROC, LPARAM);
  5149. BOOL WINAPI EnumTaskWindows(HTASK, WNDENUMPROC, LPARAM);
  5150. #if (WINVER >= 0x0400) // ;Internal 4.0
  5151. BOOL WINAPI EnumWindowsEx(DWORD, HWND, WNDENUMPROC, LPARAM); // ;Internal 4.0
  5152. #endif // ;Internal 4.0
  5153. #ifdef tagWND /* ;Internal */
  5154. HWND_16 WINAPI GetTopWindow(HWND); /* ;Internal */
  5155. HWND_16 WINAPI GetWindow(HWND, UINT); /* ;Internal */
  5156. HWND_16 WINAPI GetNextWindow(HWND, UINT); /* ;Internal */
  5157. #else /* ;Internal */
  5158. HWND WINAPI GetTopWindow(HWND);
  5159. HWND WINAPI GetWindow(HWND, UINT);
  5160. HWND WINAPI GetNextWindow(HWND, UINT);
  5161. #endif /* ;Internal */
  5162. /* GetWindow() constants */
  5163. #define GW_HWNDFIRST 0
  5164. #define GW_HWNDLAST 1
  5165. #define GW_HWNDNEXT 2
  5166. #define GW_HWNDPREV 3
  5167. #define GW_OWNER 4
  5168. #define GW_CHILD 5
  5169. #define GW_ENABLEDPOPUP 6 /* ;Internal */
  5170. #define GW_MAX 6 /* ;Internal */
  5171. /* ;Internal */
  5172. #ifdef tagWND /* ;Internal */
  5173. HWND_16 WINAPI GetNextQueueWindow(HWND, int); /* ;Internal */
  5174. #else /* ;Internal */
  5175. HWND WINAPI GetNextQueueWindow(HWND, int); /* ;Internal */
  5176. #endif /* ;Internal */
  5177. /****** Window property support *********************************************/
  5178. BOOL WINAPI SetProp(HWND, LPCSTR, HANDLE);
  5179. HANDLE WINAPI GetProp(HWND, LPCSTR);
  5180. HANDLE WINAPI RemoveProp(HWND, LPCSTR);
  5181. /* ;Internal 4.0 */
  5182. #if (WINVER >= 0x400) /* ;Internal 4.0 */
  5183. BOOL WINAPI SetPropEx(HWND, LPCSTR, DWORD); /* ;Internal 4.0 */
  5184. DWORD WINAPI GetPropEx(HWND, LPCSTR); /* ;Internal 4.0 */
  5185. DWORD WINAPI RemovePropEx(HWND, LPCSTR); /* ;Internal 4.0 */
  5186. #endif /* (WINVER >= 0x400) */ /* ;Internal 4.0 */
  5187. #ifdef STRICT
  5188. #ifdef tagWND /* ;Internal */
  5189. typedef BOOL (CALLBACK* PROPENUMPROC)(HWND_16, LPCSTR, HANDLE); /* ;Internal */
  5190. #else /* ;Internal */
  5191. typedef BOOL (CALLBACK* PROPENUMPROC)(HWND, LPCSTR, HANDLE);
  5192. #endif /* ;Internal */
  5193. #else
  5194. typedef FARPROC PROPENUMPROC;
  5195. #endif
  5196. int WINAPI EnumProps(HWND, PROPENUMPROC);
  5197. /****** Window drawing support **********************************************/
  5198. HDC WINAPI GetDC(HWND);
  5199. int WINAPI ReleaseDC(HWND, HDC);
  5200. HDC WINAPI GetWindowDC(HWND);
  5201. #if (WINVER >= 0x030a)
  5202. HDC WINAPI GetDCEx(register HWND hwnd, HRGN hrgnClip, DWORD flags);
  5203. #define DCX_WINDOW 0x00000001L
  5204. #define DCX_CACHE 0x00000002L
  5205. #define DCX_NORESETATTRS 0x00000004L // ;Internal
  5206. #define DCX_CLIPCHILDREN 0x00000008L
  5207. #define DCX_CLIPSIBLINGS 0x00000010L
  5208. #define DCX_PARENTCLIP 0x00000020L
  5209. #define DCX_EXCLUDERGN 0x00000040L
  5210. #define DCX_INTERSECTRGN 0x00000080L
  5211. #define DCX_EXCLUDEUPDATE 0x00000100L // ;Internal
  5212. #define DCX_INTERSECTUPDATE 0x00000200L // ;Internal
  5213. #define DCX_LOCKWINDOWUPDATE 0x00000400L
  5214. #define DCX_INVALID 0x00000800L // ;Internal
  5215. #define DCX_INUSE 0x00001000L // ;Internal
  5216. #define DCX_SAVEDRGNINVALID 0x00002000L // ;Internal
  5217. #if (WINVER >= 0x040A) // ;Internal
  5218. #define DCX_MONITOR 0x00004000L // ;Internal
  5219. #endif // (WINVER >=0x040A) // ;Internal
  5220. #define DCX_USESTYLE 0x00010000L
  5221. #define DCX_NEEDFONT 0x00020000L // ;Internal OBSOLETE
  5222. #define DCX_NODELETERGN 0x00040000L // ;Internal
  5223. #define DCX_NOCLIPCHILDREN 0x00080000L // ;Internal
  5224. #define DCX_NORECOMPUTE 0x00100000L // ;Internal
  5225. #define DCX_VALIDATE 0x00200000L // ;Internal
  5226. // ;Internal
  5227. #define DCX_MATCHMASK (DCX_WINDOW | DCX_CLIPCHILDREN | /* ;Internal */ \
  5228. DCX_CACHE | DCX_CLIPSIBLINGS | /* ;Internal */ \
  5229. DCX_LOCKWINDOWUPDATE) /* ;Internal */
  5230. #define DCX_VALID 0x000104fbL /* ;Internal */
  5231. #endif /* WINVER >= 0x030a */
  5232. /* ;Internal NT */
  5233. #if (WINVER >= 0x0400) /* ;Internal NT */
  5234. #ifdef tagWND /* ;Internal NT */
  5235. HWND_16 WINAPI WindowFromDC(HDC); /* ;Internal NT */
  5236. #else /* ;Internal NT */
  5237. HWND WINAPI WindowFromDC(HDC); /* ;Internal NT */
  5238. #endif /* ;Internal NT */
  5239. #endif /* WINVER >= 0x0400 */ /* ;Internal NT */
  5240. /****** Window repainting ***************************************************/
  5241. // /* WM_SYNCTASK commands */ /* ;Internal NT */
  5242. // #define ST_BEGINSWP 0 /* ;Internal NT */
  5243. // #define ST_ENDSWP 1 /* ;Internal NT */
  5244. /* BeginPaint() return structure */
  5245. typedef struct tagPAINTSTRUCT
  5246. {
  5247. HDC hdc;
  5248. BOOL fErase;
  5249. RECT rcPaint;
  5250. BOOL fRestore;
  5251. BOOL fIncUpdate;
  5252. BYTE rgbReserved[16];
  5253. // BYTE rgbReserved[32]; /* ;Internal NT */
  5254. } PAINTSTRUCT;
  5255. typedef PAINTSTRUCT* PPAINTSTRUCT;
  5256. typedef PAINTSTRUCT NEAR* NPPAINTSTRUCT;
  5257. typedef PAINTSTRUCT FAR* LPPAINTSTRUCT;
  5258. HDC WINAPI BeginPaint(HWND, LPPAINTSTRUCT);
  5259. #ifdef tagWND // ;Internal
  5260. BOOL WINAPI EndPaint(HWND, const PAINTSTRUCT FAR*); // ;Internal
  5261. #else // ;Internal
  5262. void WINAPI EndPaint(HWND, const PAINTSTRUCT FAR*);
  5263. #endif // ;Internal
  5264. #ifdef tagWND // ;Internal
  5265. BOOL WINAPI UpdateWindow(HWND); // ;Internal
  5266. #else // ;Internal
  5267. void WINAPI UpdateWindow(HWND);
  5268. #endif // ;Internal
  5269. int WINAPI ExcludeUpdateRgn(HDC, HWND);
  5270. #if (WINVER >= 0x030a)
  5271. BOOL WINAPI LockWindowUpdate(HWND hwndLock);
  5272. #endif /* WINVER >= 0x030a */
  5273. BOOL WINAPI GetUpdateRect(HWND, LPRECT, BOOL);
  5274. int WINAPI GetUpdateRgn(HWND, HRGN, BOOL);
  5275. #ifdef tagWND // ;Internal
  5276. BOOL WINAPI InvalidateRect(HWND, LPCRECT, BOOL); // ;Internal
  5277. BOOL WINAPI ValidateRect(HWND, LPCRECT); // ;Internal
  5278. BOOL WINAPI InvalidateRgn(HWND, HRGN, BOOL); // ;Internal
  5279. BOOL WINAPI ValidateRgn(HWND, HRGN); // ;Internal
  5280. #else // ;Internal
  5281. void WINAPI InvalidateRect(HWND, LPCRECT, BOOL);
  5282. void WINAPI ValidateRect(HWND, LPCRECT);
  5283. void WINAPI InvalidateRgn(HWND, HRGN, BOOL);
  5284. void WINAPI ValidateRgn(HWND, HRGN);
  5285. #endif // ;Internal
  5286. int WINAPI GetWindowRgn(HWND, HRGN); // ;Internal 4.0
  5287. int WINAPI SetWindowRgn(HWND, HRGN, BOOL); // ;Internal 4.0
  5288. #if (WINVER >= 0x030a)
  5289. BOOL WINAPI RedrawWindow(HWND hwnd, LPCRECT lprcUpdate, HRGN hrgnUpdate, UINT flags);
  5290. #define RDW_INVALIDATE 0x0001
  5291. #define RDW_INTERNALPAINT 0x0002
  5292. #define RDW_ERASE 0x0004
  5293. #define RDW_VALIDATE 0x0008
  5294. #define RDW_NOINTERNALPAINT 0x0010
  5295. #define RDW_NOERASE 0x0020
  5296. #define RDW_NOCHILDREN 0x0040
  5297. #define RDW_ALLCHILDREN 0x0080
  5298. #define RDW_UPDATENOW 0x0100
  5299. #define RDW_ERASENOW 0x0200
  5300. #define RDW_FRAME 0x0400
  5301. #define RDW_NOFRAME 0x0800
  5302. // ;Internal
  5303. #define RDW_REDRAWWINDOW 0x1000 // ;Internal Called from RedrawWindow()
  5304. #define RDW_SUBTRACTSELF 0x2000 // ;Internal Subtract self from hrgn
  5305. #define RDW_COPYRGN 0x4000 // ;Internal Copy the passed-in region
  5306. #define RDW_IGNOREUPDATEDIRTY 0x8000 // ;Internal ignore WFUPDATEDIRTY
  5307. #define RDW_VALID 0x0fff /* ;Internal */
  5308. #endif /* WINVER >= 0x030a */
  5309. /* ;Internal 4.0 */
  5310. BOOL WINAPI PaintDesktop(HDC hdc); /* ;Internal 4.0 */
  5311. /****** Window scrolling ****************************************************/
  5312. void WINAPI ScrollWindow(HWND, int, int, LPCRECT, LPCRECT);
  5313. BOOL WINAPI ScrollDC(HDC, int, int, LPCRECT, LPCRECT, HRGN, LPRECT);
  5314. #if (WINVER >= 0x030a)
  5315. int WINAPI ScrollWindowEx(HWND, int, int, LPCRECT, LPCRECT, HRGN, LPRECT, UINT);
  5316. #define SW_SCROLLCHILDREN 0x0001
  5317. #define SW_INVALIDATE 0x0002
  5318. #define SW_ERASE 0x0004
  5319. #if (WINVER >= 0x40A)
  5320. #define SW_SMOOTHSCROLL 0x0010
  5321. #endif
  5322. #define SW_SCROLLWINDOW 0x8000 /* ;Internal */
  5323. #define SW_VALID 0x8017 /* ;Internal */
  5324. #endif /* WINVER >= 0x030a */
  5325. /****** Non-client window area management ************************************/
  5326. #if (WINVER >= 0x030a)
  5327. /* WM_NCCALCSIZE return flags */
  5328. #define WVR_ALIGNTOP 0x0010
  5329. #define WVR_ALIGNLEFT 0x0020
  5330. #define WVR_ALIGNBOTTOM 0x0040
  5331. #define WVR_ALIGNRIGHT 0x0080
  5332. #define WVR_HREDRAW 0x0100
  5333. #define WVR_VREDRAW 0x0200
  5334. #define WVR_REDRAW (WVR_HREDRAW | WVR_VREDRAW)
  5335. #define WVR_VALIDRECTS 0x0400
  5336. /* ;Internal */
  5337. #define WVR_MINVALID WVR_ALIGNTOP /* ;Internal */
  5338. #define WVR_MAXVALID WVR_VALIDRECTS /* ;Internal */
  5339. /* WM_NCCALCSIZE parameter structure */
  5340. typedef struct tagNCCALCSIZE_PARAMS
  5341. {
  5342. RECT rgrc[3];
  5343. WINDOWPOS FAR* lppos;
  5344. } NCCALCSIZE_PARAMS;
  5345. #else /* WINVER >= 0x030a */
  5346. typedef struct tagNCCALCSIZE_PARAMS
  5347. {
  5348. RECT rgrc[2];
  5349. } NCCALCSIZE_PARAMS;
  5350. #endif /* WINVER >= 0x030a */
  5351. typedef NCCALCSIZE_PARAMS FAR* LPNCCALCSIZE_PARAMS;
  5352. /* WM_NCHITTEST return codes */
  5353. #define HTERROR (-2)
  5354. #define HTTRANSPARENT (-1)
  5355. #define HTNOWHERE 0
  5356. #define HTCLIENT 1
  5357. #define HTCAPTION 2
  5358. #define HTSYSMENU 3
  5359. #define HTSIZE 4
  5360. #define HTMENU 5
  5361. #define HTHSCROLL 6
  5362. #define HTVSCROLL 7
  5363. #define HTMINBUTTON 8
  5364. #define HTMAXBUTTON 9
  5365. #define HTLEFT 10
  5366. #define HTRIGHT 11
  5367. #define HTTOP 12
  5368. #define HTTOPLEFT 13
  5369. #define HTTOPRIGHT 14
  5370. #define HTBOTTOM 15
  5371. #define HTBOTTOMLEFT 16
  5372. #define HTBOTTOMRIGHT 17
  5373. #define HTBORDER 18
  5374. #define HTGROWBOX HTSIZE
  5375. #define HTREDUCE HTMINBUTTON
  5376. #define HTZOOM HTMAXBUTTON
  5377. #define HTSIZEFIRST HTLEFT /* ;Internal */
  5378. #define HTSIZELAST HTBOTTOMRIGHT /* ;Internal */
  5379. #define HTOBJECT 19 // ;Internal 4.0
  5380. #define HTCLOSE 20 // ;Internal 4.0
  5381. #define HTHELP 21 // ;Internal 4.0
  5382. #define HTMAX 21 // ;Internal
  5383. //***** Drag-and-drop support ********************************* ;Internal
  5384. // ;Internal
  5385. // The rest of this section was formerly in userproc.h // ;Internal
  5386. // ;Internal
  5387. typedef struct _dropstruct // ;Internal
  5388. { // ;Internal
  5389. #ifdef tagWND // ;Internal
  5390. HWND_16 hwndSource; // ;Internal
  5391. HWND_16 hwndSink; // ;Internal
  5392. #else // ;Internal
  5393. HWND hwndSource; // ;Internal
  5394. HWND hwndSink; // ;Internal
  5395. #endif // ;Internal
  5396. WORD wFmt; // ;Internal
  5397. DWORD dwData; // ;Internal
  5398. POINT ptDrop; // ;Internal
  5399. DWORD dwControlData; // ;Internal
  5400. } DROPSTRUCT; // ;Internal
  5401. // ;Internal
  5402. typedef DROPSTRUCT FAR * LPDROPSTRUCT; // ;Internal
  5403. // ;Internal
  5404. #define DOF_EXECUTABLE 0x8001 // ;Internal
  5405. #define DOF_DOCUMENT 0x8002 // ;Internal
  5406. #define DOF_DIRECTORY 0x8003 // ;Internal
  5407. #define DOF_MULTIPLE 0x8004 // ;Internal
  5408. #define DOF_PROGMAN 0x0001 // ;Internal
  5409. #define DOF_SHELLDATA 0x0002 // ;Internal
  5410. // ;Internal
  5411. // special responses to WM_DROPOBJECT // ;Internal
  5412. // DO_DROPFILE -> send a WM_DROPFILES message // ;Internal
  5413. // DO_PRINTFILE -> print the files being dragged // ;Internal
  5414. #define DO_DROPFILE 0x454C4946L // ;Internal
  5415. #define DO_PRINTFILE 0x544E5250L // ;Internal
  5416. // ;Internal
  5417. WORD API GetInternalWindowPos(HWND,LPRECT,LPPOINT); // ;Internal
  5418. BOOL API SetInternalWindowPos(HWND,WORD,LPRECT,LPPOINT); // ;Internal
  5419. // ;Internal
  5420. #ifdef tagWND // ;Internal
  5421. // DragObject goes through layer! // ;Internal
  5422. LRESULT API DragObject(HWND, HWND, WORD, DWORD, HANDLE); // ;Internal
  5423. BOOL API DragDetect(HWND_16, POINT); // ;Internal
  5424. // ;Internal
  5425. // FillWindow goes through layer! // ;Internal
  5426. void CALLBACK FillWindow(HWND, HWND, HDC, HBRUSH); // ;Internal
  5427. #else // ;Internal
  5428. // DragObject goes through layer! // ;Internal
  5429. LRESULT API DragObject(HWND, HWND, WORD, DWORD, HANDLE); // ;Internal
  5430. BOOL API DragDetect(HWND, POINT); // ;Internal
  5431. // ;Internal
  5432. void CALLBACK FillWindow(HWND, HWND, HDC, HBRUSH); // ;Internal
  5433. #endif // ;Internal
  5434. // ;Internal
  5435. /****** Window activation ***************************************************/
  5436. #ifdef tagWND // ;Internal
  5437. HWND_16 WINAPI SetActiveWindow(HWND); // ;Internal
  5438. HWND_16 WINAPI GetActiveWindow(void); // ;Internal
  5439. HWND_16 WINAPI GetLastActivePopup(HWND); // ;Internal
  5440. BOOL WINAPI SetForegroundWindow(HWND); // ;Internal NT
  5441. HWND_16 WINAPI GetForegroundWindow(void); // ;Internal NT
  5442. #else // ;Internal
  5443. HWND WINAPI SetActiveWindow(HWND);
  5444. HWND WINAPI GetActiveWindow(void);
  5445. HWND WINAPI GetLastActivePopup(HWND);
  5446. #if (WINVER >= 0x0400) // ;Internal
  5447. BOOL WINAPI SetForegroundWindow(HWND); // ;Internal NT
  5448. HWND WINAPI GetForegroundWindow(void); // ;Internal NT
  5449. #endif // ;Internal
  5450. #endif // ;Internal
  5451. /* WM_ACTIVATE state values */
  5452. #define WA_INACTIVE 0
  5453. #define WA_ACTIVE 1
  5454. #define WA_CLICKACTIVE 2
  5455. //***** Server ********************************************* ;Internal NT
  5456. // ;Internal NT
  5457. // /* Desktops */ ;Internal NT
  5458. // #define DESKTOP_ENUMWINDOWS 0x0001L ;Internal NT
  5459. // #define DESKTOP_CREATEWINDOW 0x0002L ;Internal NT
  5460. // #define DESKTOP_CREATEMENU 0x0004L ;Internal NT
  5461. // #define DESKTOP_HOOKCONTROL 0x0008L ;Internal NT
  5462. // #define DESKTOP_JOURNALRECORD 0x0010L ;Internal NT
  5463. // #define DESKTOP_JOURNALPLAYBACK 0x0020L ;Internal NT
  5464. // #define DESKTOP_ENUMERATE 0x0040L ;Internal NT
  5465. // ;Internal NT
  5466. // HDESK WINAPI GetThreadDesktop(DWORD idThread); ;Internal NT
  5467. // ;Internal NT
  5468. // /* WinStations */ ;Internal NT
  5469. // #define WINSTA_ENUMDESKTOPS 0x0001L ;Internal NT
  5470. // #define WINSTA_READATTRIBUTES 0x0002L ;Internal NT
  5471. // #define WINSTA_ACCESSCLIPBOARD 0x0004L ;Internal NT
  5472. // #define WINSTA_CREATEDESKTOP 0x0008L ;Internal NT
  5473. // #define WINSTA_WRITEATTRIBUTES 0x0010L ;Internal NT
  5474. // #define WINSTA_ACCESSGLOBALATOMS 0x0020L ;Internal NT
  5475. // #define WINSTA_EXITWINDOWS 0x0040L ;Internal NT
  5476. // #define WINSTA_ENUMERATE 0x0100L ;Internal NT
  5477. // #define WINSTA_READSCREEN 0x0200L ;Internal NT
  5478. // ;Internal NT
  5479. // HWINSTA WINAPI GetProcessWindowStation(); ;Internal NT
  5480. // ;Internal NT
  5481. // /* Security */ ;Internal NT
  5482. // #define WIN_ACCESSWINDOW 0x0001L ;Internal NT
  5483. // #define WIN_ENUMERATE 0x0002L ;Internal NT
  5484. // #define MENU_ACCESSMENU 0x0001L ;Internal NT
  5485. // ;Internal NT
  5486. // BOOL WINAPI SetUserObjectSecurity(HANDLE, ;Internal NT
  5487. // PSECURITY_INFORMATION, PSECURITY_DESCRIPTOR); ;Internal NT
  5488. // BOOL WINAPI GetUserObjectSecurity(HANDLE, ;Internal NT
  5489. // PSECURITY_INFORMATION, PSECURITY_DESCRIPTOR, ;Internal NT
  5490. // DWORD, LPDWORD); ;Internal NT
  5491. // BOOL WINAPI ImpersonateDDEClientWindow(HWND, HWND); ;Internal NT
  5492. // ;Internal NT
  5493. /****** Keyboard input support **********************************************/
  5494. #ifdef tagWND /* ;Internal */
  5495. HWND_16 WINAPI SetFocus(HWND); /* ;Internal */
  5496. HWND_16 WINAPI GetFocus(void); /* ;Internal */
  5497. #else /* ;Internal */
  5498. HWND WINAPI SetFocus(HWND);
  5499. HWND WINAPI GetFocus(void);
  5500. #endif /* ;Internal */
  5501. int WINAPI GetKeyState(int);
  5502. int WINAPI GetAsyncKeyState(int);
  5503. #ifdef tagWND // ;Internal
  5504. BOOL WINAPI GetKeyboardState(LPBYTE); // ;Internal
  5505. BOOL WINAPI GetKeyboardState(LPBYTE); // ;Internal
  5506. #else // ;Internal
  5507. void WINAPI GetKeyboardState(LPBYTE);
  5508. void WINAPI SetKeyboardState(LPBYTE);
  5509. #endif // ;Internalx
  5510. /* WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags */
  5511. #define KF_EXTENDED 0x0100
  5512. #define KF_DLGMODE 0x0800
  5513. #define KF_MENUMODE 0x1000
  5514. #define KF_ALTDOWN 0x2000
  5515. #define KF_REPEAT 0x4000
  5516. #define KF_UP 0x8000
  5517. /* Virtual key codes */
  5518. #ifndef NOVIRTUALKEYCODES
  5519. #define VK_LBUTTON 0x01
  5520. #define VK_RBUTTON 0x02
  5521. #define VK_CANCEL 0x03
  5522. #define VK_MBUTTON 0x04
  5523. #define VK_BACK 0x08
  5524. #define VK_TAB 0x09
  5525. #define VK_CLEAR 0x0C
  5526. #define VK_RETURN 0x0D
  5527. #define VK_SHIFT 0x10
  5528. #define VK_CONTROL 0x11
  5529. #define VK_MENU 0x12
  5530. #define VK_PAUSE 0x13
  5531. #define VK_CAPITAL 0x14
  5532. #define VK_KANA 0x15 /* ;Internal JAPAN */
  5533. #define VK_KANJI 0x19 /* ;Internal JAPAN */
  5534. #define VK_HANGEUL 0x15 /* ;Internal KOREA */
  5535. #define VK_JUNJA 0x17 /* ;Internal KOREA */
  5536. #define VK_HANJA 0x19 /* ;Internal KOREA */
  5537. #define VK_ESCAPE 0x1B
  5538. #define VK_SPACE 0x20
  5539. #define VK_PRIOR 0x21
  5540. #define VK_NEXT 0x22
  5541. #define VK_END 0x23
  5542. #define VK_HOME 0x24
  5543. #define VK_LEFT 0x25
  5544. #define VK_UP 0x26
  5545. #define VK_RIGHT 0x27
  5546. #define VK_DOWN 0x28
  5547. #define VK_SELECT 0x29
  5548. #define VK_PRINT 0x2A
  5549. #define VK_EXECUTE 0x2B
  5550. #define VK_SNAPSHOT 0x2C
  5551. #define VK_INSERT 0x2D
  5552. #define VK_DELETE 0x2E
  5553. #define VK_HELP 0x2F
  5554. #define VK_LWIN 0x5B
  5555. #define VK_RWIN 0x5C
  5556. #define VK_APPS 0x5D
  5557. #define VK_POWER 0x5E
  5558. #define VK_SLEEP 0x5F
  5559. #define VK_NUMPAD0 0x60
  5560. #define VK_NUMPAD1 0x61
  5561. #define VK_NUMPAD2 0x62
  5562. #define VK_NUMPAD3 0x63
  5563. #define VK_NUMPAD4 0x64
  5564. #define VK_NUMPAD5 0x65
  5565. #define VK_NUMPAD6 0x66
  5566. #define VK_NUMPAD7 0x67
  5567. #define VK_NUMPAD8 0x68
  5568. #define VK_NUMPAD9 0x69
  5569. #define VK_MULTIPLY 0x6A
  5570. #define VK_ADD 0x6B
  5571. #define VK_SEPARATOR 0x6C
  5572. #define VK_SUBTRACT 0x6D
  5573. #define VK_DECIMAL 0x6E
  5574. #define VK_DIVIDE 0x6F
  5575. #define VK_F1 0x70
  5576. #define VK_F2 0x71
  5577. #define VK_F3 0x72
  5578. #define VK_F4 0x73
  5579. #define VK_F5 0x74
  5580. #define VK_F6 0x75
  5581. #define VK_F7 0x76
  5582. #define VK_F8 0x77
  5583. #define VK_F9 0x78
  5584. #define VK_F10 0x79
  5585. #define VK_F11 0x7A
  5586. #define VK_F12 0x7B
  5587. #define VK_F13 0x7C
  5588. #define VK_F14 0x7D
  5589. #define VK_F15 0x7E
  5590. #define VK_F16 0x7F
  5591. #define VK_F17 0x80
  5592. #define VK_F18 0x81
  5593. #define VK_F19 0x82
  5594. #define VK_F20 0x83
  5595. #define VK_F21 0x84
  5596. #define VK_F22 0x85
  5597. #define VK_F23 0x86
  5598. #define VK_F24 0x87
  5599. #define VK_NUMLOCK 0x90
  5600. #define VK_SCROLL 0x91
  5601. /* VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' */
  5602. /* VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '9' */
  5603. #endif /* NOVIRTUALKEYCODES */
  5604. /* ;Internal */
  5605. BOOL WINAPI IsTwoByteCharPrefix(char); /* ;Internal */
  5606. /* ;Internal NT */
  5607. /* Keyboard Layout */ /* ;Internal NT */
  5608. #define HKL_PREV 0 /* ;Internal NT */
  5609. #define HKL_NEXT 1 /* ;Internal NT */
  5610. /* ;Internal NT */
  5611. #define KLF_ACTIVATE 0x1 /* ;Internal NT */
  5612. #define KLF_SUBSTITUTE_OK 0x2 /* ;Internal NT */
  5613. #define KLF_UNLOADPREVIOUS 0x4 /* ;Internal NT */
  5614. #define KLF_REORDER 0x8 /* ;Internal NT */
  5615. /* ;Internal NT */
  5616. #define KLF_REPLACELANG 0x10 /* ;Internal 4.0 */
  5617. #define KLF_NOTELLSHELL 0x80 /* ;Internal 4.0 */
  5618. #define KL_NAMELENGTH 9 /* ;Internal NT */
  5619. HKL WINAPI LoadKeyboardLayout(LPCSTR, UINT); /* ;Internal NT */
  5620. HKL WINAPI GetKeyboardLayout(DWORD); /* ;Internal 4.0 */
  5621. UINT WINAPI GetKeyboardLayoutList(UINT, HKL FAR *); /* ;Internal 4.0 */
  5622. HKL WINAPI ActivateKeyboardLayout(HKL, UINT); /* ;Internal NT */
  5623. BOOL WINAPI UnloadKeyboardLayout(HKL); /* ;Internal NT */
  5624. BOOL WINAPI GetKeyboardLayoutName(LPSTR); /* ;Internal NT */
  5625. /* SetWindowsHook() keyboard hook */
  5626. #define WH_KEYBOARD 2
  5627. /****** Mouse input support *************************************************/
  5628. #ifdef tagWND // ;Internal
  5629. HWND_16 WINAPI SetCapture(HWND); // ;Internal
  5630. HWND_16 WINAPI GetCapture(void); // ;Internal
  5631. BOOL WINAPI ReleaseCapture(void); // ;Internal
  5632. #else // ;Internal
  5633. HWND WINAPI SetCapture(HWND);
  5634. HWND WINAPI GetCapture(void);
  5635. void WINAPI ReleaseCapture(void);
  5636. #endif // ;Internal
  5637. BOOL WINAPI SwapMouseButton(BOOL);
  5638. /* Mouse message wParam key states */
  5639. #ifndef NOKEYSTATES
  5640. #define MK_LBUTTON 0x0001
  5641. #define MK_RBUTTON 0x0002
  5642. #define MK_SHIFT 0x0004
  5643. #define MK_CONTROL 0x0008
  5644. #define MK_MBUTTON 0x0010
  5645. #endif /* NOKEYSTATES */
  5646. #if (WINVER >= 0x40A)
  5647. #ifndef NOTRACKMOUSEEVENT
  5648. #define TME_HOVER 0x00000001
  5649. #define TME_LEAVE 0x00000002
  5650. #define TME_NONCLIENT 0x00000010
  5651. #define TME_QUERY 0x40000000
  5652. #define TME_CANCEL 0x80000000
  5653. #define TME_VALID (TME_HOVER | TME_LEAVE | TME_NONCLIENT | TME_QUERY | TME_CANCEL) // ;Internal
  5654. #define HOVER_DEFAULT 0xFFFFFFFF
  5655. typedef struct tagTRACKMOUSEEVENT {
  5656. DWORD cbSize;
  5657. DWORD dwFlags;
  5658. #ifdef tagWND /* ;Internal */
  5659. HWND_16 hwndTrack; /* ;Internal */
  5660. #else /* ;Internal */
  5661. HWND hwndTrack;
  5662. #endif /* ;Internal */
  5663. DWORD dwHoverTime;
  5664. } TRACKMOUSEEVENT, FAR *LPTRACKMOUSEEVENT;
  5665. BOOL WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT);
  5666. #endif /* !NOTRACKMOUSEEVENT */
  5667. #endif // (WINVER >=0x40A)
  5668. /* WM_MOUSEACTIVATE return codes */
  5669. #define MA_ACTIVATE 1
  5670. #define MA_ACTIVATEANDEAT 2
  5671. #define MA_NOACTIVATE 3
  5672. #if (WINVER >= 0x030a)
  5673. #define MA_NOACTIVATEANDEAT 4
  5674. #endif /* WINVER >= 0x030a */
  5675. /* SetWindowsHook() mouse hook */
  5676. #ifndef NOWH
  5677. #define WH_MOUSE 7
  5678. typedef struct tagMOUSEHOOKSTRUCT
  5679. {
  5680. POINT pt;
  5681. #ifdef tagWND /* ;Internal */
  5682. HWND_16 hwnd; /* ;Internal */
  5683. #else /* ;Internal */
  5684. HWND hwnd;
  5685. #endif /* ;Internal */
  5686. UINT wHitTestCode;
  5687. DWORD dwExtraInfo;
  5688. } MOUSEHOOKSTRUCT;
  5689. typedef MOUSEHOOKSTRUCT FAR* LPMOUSEHOOKSTRUCT;
  5690. #endif /* NOWH */
  5691. /****** Mode control ********************************************************/
  5692. #ifdef tagWND /* ;Internal */
  5693. HWND_16 WINAPI GetSysModalWindow(void); /* ;Internal */
  5694. HWND_16 WINAPI SetSysModalWindow(HWND); /* ;Internal */
  5695. #else /* ;Internal */
  5696. HWND WINAPI GetSysModalWindow(void);
  5697. HWND WINAPI SetSysModalWindow(HWND);
  5698. #endif /* ;Internal */
  5699. /****** Timer support *******************************************************/
  5700. #ifdef STRICT
  5701. #ifdef tagWND /* ;Internal */
  5702. typedef void (CALLBACK* TIMERPROC)(HWND_16, UINT, UINT, DWORD); /* ;Internal */
  5703. #else /* ;Internal */
  5704. typedef void (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD);
  5705. #endif /* ;Internal */
  5706. #else
  5707. typedef FARPROC TIMERPROC;
  5708. #endif
  5709. UINT WINAPI SetTimer(HWND, UINT, UINT, TIMERPROC);
  5710. BOOL WINAPI KillTimer(HWND, UINT);
  5711. /* ;Internal */
  5712. WORD FAR SetSystemTimer(HWND, int, int, TIMERPROC); /* ;Internal */
  5713. BOOL FAR KillSystemTimer(HWND, int); /* ;Internal */
  5714. HBRUSH CALLBACK GetControlBrush(HWND, HDC, UINT); /* ;Internal */
  5715. void CALLBACK PaintRect(HWND, HWND, HDC, HBRUSH, LPRECT); /* ;Internal */
  5716. VOID WINAPI SwitchToThisWindow(HWND, BOOL); /* ;Internal */
  5717. /****** Accelerator support *************************************************/
  5718. DECLARE_HANDLE(HACCEL);
  5719. HACCEL WINAPI LoadAccelerators(HINSTANCE, LPCSTR);
  5720. #ifndef NOMSG
  5721. int WINAPI TranslateAccelerator(HWND, HACCEL, LPMSG);
  5722. #endif
  5723. /* ;Internal NT */
  5724. #define FVIRTKEY 0x01 /* ;Internal NT */
  5725. #define FNOINVERT 0x02 /* ;Internal NT */
  5726. #define FSHIFT 0x04 /* ;Internal NT */
  5727. #define FCONTROL 0x08 /* ;Internal NT */
  5728. #define FALT 0x10 /* ;Internal NT */
  5729. #define FLASTKEY 0x80 /* ;Internal NT */
  5730. /* ;Internal NT */
  5731. typedef struct tagACCEL /* ;Internal NT */
  5732. { /* ;Internal NT */
  5733. BYTE fVirt; /* ;Internal NT */
  5734. WORD key; /* ;Internal NT */
  5735. WORD cmd; /* ;Internal NT */
  5736. } /* ;Internal NT */
  5737. ACCEL, FAR* LPACCEL; /* ;Internal NT */
  5738. /* ;Internal NT */
  5739. HACCEL WINAPI CreateAcceleratorTable(LPACCEL, int); /* ;Internal NT */
  5740. int WINAPI CopyAcceleratorTable(HACCEL, LPACCEL, int); /* ;Internal NT */
  5741. BOOL WINAPI DestroyAcceleratorTable(HACCEL); /* ;Internal NT */
  5742. /* ;Internal NT */
  5743. // #define IDHOT_SNAPWINDOW (-1) /* ;Internal NT */
  5744. // #define IDHOT_SNAPDESKTOP (-2) /* ;Internal NT */
  5745. /* ;Internal NT */
  5746. #ifdef tagWND /* ;Internal NT */
  5747. BOOL WINAPI RegisterHotKey(HWND_16, DWORD, UINT, UINT); /* ;Internal NT */
  5748. BOOL WINAPI UnregisterHotKey(HWND_16, DWORD); /* ;Internal NT */
  5749. #else /* ;Internal NT */
  5750. BOOL WINAPI RegisterHotKey(HWND, DWORD, UINT, UINT); /* ;Internal NT */
  5751. BOOL WINAPI UnregisterHotKey(HWND, DWORD); /* ;Internal NT */
  5752. #endif /* ;Internal NT */
  5753. #define MOD_ALT 0x0001 /* ;Internal NT */
  5754. #define MOD_CONTROL 0x0002 /* ;Internal NT */
  5755. #define MOD_SHIFT 0x0004 /* ;Internal NT */
  5756. #define MOD_WIN 0x0008 /* ;Internal NT */
  5757. /****** Menu support ********************************************************/
  5758. #ifndef NOMENUS
  5759. /* Menu template header */
  5760. typedef struct tagMENUITEMTEMPLATEHEADER
  5761. {
  5762. UINT versionNumber;
  5763. UINT offset;
  5764. } MENUITEMTEMPLATEHEADER;
  5765. /* Menu template item struct */
  5766. typedef struct tagMENUITEMTEMPLATE
  5767. {
  5768. UINT mtOption;
  5769. UINT mtID;
  5770. char mtString[1];
  5771. } MENUITEMTEMPLATE;
  5772. #if (WINVER >= 0x0400) // ;Internal 4.0
  5773. typedef struct tagMENUEXTEMPLATE // ;Internal 4.0
  5774. { // ;Internal 4.0
  5775. WORD wMenuVer; // ;Internal 4.0
  5776. WORD dwHdrSize; // ;Internal 4.0
  5777. } MENUEXTEMPLATE, FAR *LPMENUEXTEMPLATE; // ;Internal 4.0
  5778. // ;Internal 4.0
  5779. typedef struct tagMENUEXHEADER // ;Internal 4.0
  5780. { // ;Internal 4.0
  5781. DWORD dwHelpID; // ;Internal 4.0
  5782. } MENUEXHEADER, FAR *LPMENUEXHEADER; // ;Internal 4.0
  5783. // ;Internal 4.0
  5784. typedef struct tagMENUEXITEMTEMPLATE // ;Internal 4.0
  5785. { // ;Internal 4.0
  5786. DWORD fType; // ;Internal 4.0
  5787. DWORD fState; // ;Internal 4.0
  5788. WORD wID; // ;Internal 4.0
  5789. BYTE bResInfo; // ;Internal 4.0
  5790. } MENUEXITEMTEMPLATE, FAR *LPMENUEXITEMTEMPLATE; // ;Internal 4.0
  5791. /* Menu String */ // ;Internal 4.0
  5792. /* if popup, MENUEXHEADER */ // ;Internal 4.0
  5793. #endif // ;Internal 4.0
  5794. // ;Internal 4.0
  5795. #if (WINVER >= 0x030a) // ;Internal
  5796. #ifdef tagWND // ;Internal
  5797. BOOL WINAPI IsMenu(HMENU_16); // ;Internal
  5798. #else // ;Internal
  5799. BOOL WINAPI IsMenu(HMENU);
  5800. #endif // tagWND // ;Internal
  5801. #endif /* WINVER >= 0x030a */ // ;Internal
  5802. HMENU WINAPI CreateMenu(void);
  5803. HMENU WINAPI CreatePopupMenu(void);
  5804. HMENU WINAPI LoadMenu(HINSTANCE, LPCSTR);
  5805. HMENU WINAPI LoadMenuIndirect(const void FAR*);
  5806. #ifdef tagWND // ;Internal
  5807. DWORD WINAPI GetMenu(HWND); // ;Internal
  5808. HMENU_16 WINAPI GetSystemMenu(HWND, BOOL); // ;Internal
  5809. HMENU_16 WINAPI GetSubMenu(HMENU, UINT); // ;Internal
  5810. BOOL WINAPI InsertMenu(HMENU_16, UINT, UINT, UINT, LPCSTR); // ;Internal
  5811. BOOL WINAPI AppendMenu(HMENU_16, UINT, UINT, LPCSTR); // ;Internal
  5812. BOOL WINAPI ModifyMenu(HMENU_16, UINT, UINT, UINT, LPCSTR); // ;Internal
  5813. BOOL WINAPI ChangeMenu(HMENU_16, UINT, LPCSTR, UINT, UINT); // ;Internal
  5814. BOOL WINAPI SetMenuItemBitmaps(HMENU_16, UINT, UINT, HBITMAP, HBITMAP); // ;Internal
  5815. int WINAPI GetMenuString(HMENU_16, UINT, LPSTR, int, UINT); // ;Internal
  5816. #else // ;Internal
  5817. HMENU WINAPI GetMenu(HWND);
  5818. HMENU WINAPI GetSystemMenu(HWND, BOOL);
  5819. HMENU WINAPI GetSubMenu(HMENU, UINT);
  5820. BOOL WINAPI InsertMenu(HMENU, UINT, UINT, UINT, LPCSTR);
  5821. BOOL WINAPI AppendMenu(HMENU, UINT, UINT, LPCSTR);
  5822. BOOL WINAPI ModifyMenu(HMENU, UINT, UINT, UINT, LPCSTR);
  5823. BOOL WINAPI ChangeMenu(HMENU, UINT, LPCSTR, UINT, UINT);
  5824. BOOL WINAPI SetMenuItemBitmaps(HMENU, UINT, UINT, HBITMAP, HBITMAP);
  5825. int WINAPI GetMenuString(HMENU, UINT, LPSTR, int, UINT);
  5826. #endif // tagWND // ;Internal
  5827. BOOL WINAPI DestroyMenu(HMENU);
  5828. BOOL WINAPI SetMenu(HWND, HMENU);
  5829. BOOL WINAPI SetSystemMenu(HWND, HMENU); /* ;Internal */
  5830. #ifdef tagWND // ;Internal
  5831. BOOL WINAPI DrawMenuBar(HWND); // ;Internal
  5832. #else // ;Internal
  5833. void WINAPI DrawMenuBar(HWND);
  5834. #endif // ;Internal
  5835. int WINAPI DrawMenuBarTemp(HWND, HDC, LPRECT, HMENU, HFONT); // ;Internal
  5836. BOOL WINAPI HiliteMenuItem(HWND, HMENU, UINT, UINT);
  5837. BOOL WINAPI RemoveMenu(HMENU, UINT, UINT);
  5838. BOOL WINAPI DeleteMenu(HMENU, UINT, UINT);
  5839. #define MF_INSERT 0x0000 /* Obsolete -- only used by ChangeMenu */
  5840. #define MF_CHANGE 0x0080 /* Obsolete -- only used by ChangeMenu */
  5841. #define MF_APPEND 0x0100 /* Obsolete -- only used by ChangeMenu */
  5842. #define MF_DELETE 0x0200 /* Obsolete -- only used by ChangeMenu */
  5843. #define MF_REMOVE 0x1000 /* Obsolete -- only used by ChangeMenu */
  5844. #define MF_BYCOMMAND 0x0000 /* Obsolete -- only old APIs use these */
  5845. #define MF_BYPOSITION 0x0400 /* Obsolete -- only old APIs use these */
  5846. #define MF_USECHECKBITMAPS 0x0200 /* Obsolete -- replaced by MF_RADIOCHECK */
  5847. #define MF_HELP 0x4000 /* Obsolete -- use MF_RIGHTJUSTIFY */
  5848. #define MF_POPUP 0x0010 /* Obsolete -- replace by hSubMenu field */
  5849. #define MF_END 0x0080 /* Obsolete -- only used by old RES files */
  5850. #define MF_SYSMENU 0x2000 /* Passed back during WM_MENUSELECT */
  5851. #define MF_MOUSESELECT 0x8000 /* Passed back during WM_MENUSELECT */
  5852. #define MFT_STRING 0x0000
  5853. #define MFT_BITMAP 0x0004 /* Obsolete -- use MIIM_BITMAP instead */
  5854. #define MFT_MENUBARBREAK 0x0020
  5855. #define MFT_MENUBREAK 0x0040
  5856. #define MFT_OWNERDRAW 0x0100
  5857. #define MFT_RADIOCHECK 0x0200
  5858. #define MFT_SEPARATOR 0x0800
  5859. #define MFT_RIGHTORDER 0x2000
  5860. #define MFT_RIGHTJUSTIFY 0x4000
  5861. #define MFT_MASK 0x6B64 // ;Internal
  5862. #define MFS_GRAYED 0x0003
  5863. #define MFS_DISABLED MFS_GRAYED
  5864. #define MFS_CHECKED 0x0008
  5865. #define MFS_HILITE 0x0080
  5866. #define MFS_ENABLED 0x0000
  5867. #define MFS_UNCHECKED 0x0000
  5868. #define MFS_UNHILITE 0x0000
  5869. #if (WINVER >= 0x40A) // ;Internal 4.1
  5870. #define MFS_HOTTRACK 0x0100 // ;Internal 4.1
  5871. #define MFS_TOPGAPDROP 0x0200 // ;Internal 4.1
  5872. #define MFS_BOTTOMGAPDROP 0x0400 // ;Internal 4.1
  5873. #define MFS_GAPDROP (MFS_TOPGAPDROP | MFS_BOTTOMGAPDROP) // ;Internal 4.1
  5874. #endif // (WINVER >= 0x40A) // ;Internal 4.1
  5875. #define MFS_DEFAULT 0x1000
  5876. #define MFS_MASK 0x1F8B // ;Internal
  5877. #define MFR_POPUP 0x01
  5878. #define MFR_END 0x80
  5879. /* old names for menu types & states */
  5880. #define MF_SEPARATOR MFT_SEPARATOR
  5881. #define MF_GRAYED 0x0001
  5882. #define MF_DISABLED 0x0002
  5883. #define MF_CHECKED MFS_CHECKED
  5884. #define MF_ENABLED MFS_ENABLED
  5885. #define MF_UNCHECKED MFS_UNCHECKED
  5886. #define MF_UNHILITE MFS_UNHILITE
  5887. #define MF_STRING 0x0000 /* Obsolete -- use MIIM_STRING instead */
  5888. #define MF_BITMAP MFT_BITMAP /* Obsolete -- use MIIM_BITMAP instead */
  5889. #define MF_OWNERDRAW MFT_OWNERDRAW
  5890. #define MF_MENUBARBREAK MFT_MENUBARBREAK
  5891. #define MF_MENUBREAK MFT_MENUBREAK
  5892. #define MF_HILITE MFS_HILITE
  5893. #define MF_DEFAULT MFS_DEFAULT
  5894. #define MF_RIGHTJUSTIFY MFT_RIGHTJUSTIFY
  5895. #define MFT_OLDAPI_MASK 0x4B64 // ;Internal
  5896. #define MFS_OLDAPI_MASK 0x008B // ;Internal
  5897. #define MFT_NONSTRING 0x0904 // MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR ;Internal
  5898. #define MFT_BREAK 0x0060 // MF_MENUBREAK | MF_MENUBARBREAK ;Internal
  5899. #ifdef tagWND // ;Internal
  5900. DWORD WINAPI EnableMenuItem(HMENU, UINT, UINT); // ;Internal
  5901. DWORD WINAPI CheckMenuItem(HMENU, UINT, UINT); // ;Internal
  5902. #else // ;Internal
  5903. UINT WINAPI EnableMenuItem(HMENU, UINT, UINT);
  5904. UINT WINAPI CheckMenuItem(HMENU, UINT, UINT);
  5905. #endif // ;Internal
  5906. BOOL WINAPI CheckMenuRadioItem(HMENU, UINT, UINT, UINT, UINT); // ;Internal 4.0
  5907. int WINAPI GetMenuItemCount(HMENU);
  5908. #ifdef tagWND // ;Internal
  5909. DWORD WINAPI GetMenuItemID(HMENU, UINT); // ;Internal
  5910. DWORD WINAPI GetMenuState(HMENU, UINT, UINT); // ;Internal
  5911. #else // ;Internal
  5912. UINT WINAPI GetMenuItemID(HMENU, UINT);
  5913. UINT WINAPI GetMenuState(HMENU, UINT, UINT);
  5914. #endif // ;Internal
  5915. DWORD WINAPI GetMenuCheckMarkDimensions(void);
  5916. BOOL WINAPI TrackPopupMenu(HMENU, UINT, int, int, int, HWND, LPCRECT);
  5917. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  5918. /* return codes for WM_MENUCHAR */ /* ;Internal 4.0 */
  5919. #define MNC_IGNORE 0 /* ;Internal 4.0 */
  5920. #define MNC_CLOSE 1 /* ;Internal 4.0 */
  5921. #define MNC_EXECUTE 2 /* ;Internal 4.0 */
  5922. #define MNC_SELECT 3 /* ;Internal 4.0 */
  5923. /* ;Internal 4.0 */
  5924. typedef struct tagTPMPARAMS /* ;Internal 4.0 */
  5925. { /* ;Internal 4.0 */
  5926. DWORD cbSize; /* ;Internal 4.0 */
  5927. RECT rcExclude; /* ;Internal 4.0 */
  5928. } /* ;Internal 4.0 */
  5929. TPMPARAMS, FAR *LPTPMPARAMS; /* ;Internal 4.0 */
  5930. /* ;Internal 4.0 */
  5931. BOOL WINAPI TrackPopupMenuEx(HMENU, UINT, int, int, HWND, LPTPMPARAMS); /* ;Internal 4.0 */
  5932. /* ;Internal 4.0 */
  5933. #if (WINVER >= 0x40A) /* ;Internal 4.1 */
  5934. #define MNS_NOCHECK 0x80000000 /* ;Internal 4.1 */
  5935. #define MNS_MODELESS 0x40000000 /* ;Internal 4.1 */
  5936. #define MNS_DRAGDROP 0x20000000 /* ;Internal 4.1 */
  5937. #define MNS_AUTODISMISS 0x10000000 /* ;Internal 4.1 */
  5938. #define MNS_NOTIFYBYPOS 0x08000000 /* ;Internal 4.1 */
  5939. #define MNS_CHECKORBMP 0x04000000 // ;Internal 4.1 */
  5940. #define MNS_VALID 0xFC000000 // ;Internal
  5941. /* ;Internal 4.1 */
  5942. #define MIM_MAXHEIGHT 0x00000001 /* ;Internal 4.1 */
  5943. #define MIM_BACKGROUND 0x00000002 /* ;Internal 4.1 */
  5944. #define MIM_HELPID 0x00000004 /* ;Internal 4.1 */
  5945. #define MIM_MENUDATA 0x00000008 /* ;Internal 4.1 */
  5946. #define MIM_STYLE 0x00000010 /* ;Internal 4.1 */
  5947. #define MIM_APPLYTOSUBMENUS 0x80000000 /* ;Internal 4.1 */
  5948. #define MIM_MASK 0x8000001F // ;Internal
  5949. /* ;Internal 4.1 */
  5950. typedef struct tagMENUINFO /* ;Internal 4.1 */
  5951. { /* ;Internal 4.1 */
  5952. DWORD cbSize; /* ;Internal 4.1 */
  5953. DWORD fMask; /* ;Internal 4.1 */
  5954. DWORD dwStyle; /* ;Internal 4.1 */
  5955. DWORD cyMax; /* ;Internal 4.1 */
  5956. DWORD hbrBack; /* ;Internal 4.1 */
  5957. DWORD dwContextHelpID; /* ;Internal 4.1 */
  5958. DWORD dwMenuData; /* ;Internal 4.1 */
  5959. } /* ;Internal 4.1 */
  5960. MENUINFO, FAR *LPMENUINFO; /* ;Internal 4.1 */
  5961. typedef const MENUINFO FAR *LPCMENUINFO; /* ;Internal 4.1 */
  5962. #endif // (WINVER >= 0x40A) /* ;Internal 4.1 */
  5963. /* ;Internal 4.0 */
  5964. #define MIIM_STATE 0x00000001 /* ;Internal 4.0 */
  5965. #define MIIM_ID 0x00000002 /* ;Internal 4.0 */
  5966. #define MIIM_SUBMENU 0x00000004 /* ;Internal 4.0 */
  5967. #define MIIM_CHECKMARKS 0x00000008 /* ;Internal 4.0 */
  5968. #define MIIM_TYPE 0x00000010 /* ;Internal 4.0 */
  5969. #define MIIM_DATA 0x00000020 /* ;Internal 4.0 */
  5970. #if (WINVER >= 0x40A) /* ;Internal 4.1 */
  5971. #define MIIM_STRING 0x00000040 /* ;Internal 4.1 */
  5972. #define MIIM_BITMAP 0x00000080 /* ;Internal 4.1 */
  5973. #define MIIM_FTYPE 0x00000100 /* ;Internal 4.1 */
  5974. #define HBMMENU_CALLBACK ((HBITMAP) -1) /* ;Internal 4.1 */
  5975. #define HBMMENU_MIN ((HBITMAP) 0) /* ;Internal 4.1 */
  5976. #define HBMMENU_SYSTEM ((HBITMAP) 1) /* ;Internal 4.1 */
  5977. #define HBMMENU_MBARFIRST ((HBITMAP) 2) /* ;Internal 4.1 */
  5978. #define HBMMENU_MBAR_RESTORE ((HBITMAP) 2) /* ;Internal 4.1 */
  5979. #define HBMMENU_MBAR_MINIMIZE ((HBITMAP) 3) /* ;Internal 4.1 */
  5980. #define HBMMENU_BULLET ((HBITMAP) 4) /* ;Internal 4.1 */
  5981. #define HBMMENU_MBAR_CLOSE ((HBITMAP) 5) /* ;Internal 4.1 */
  5982. #define HBMMENU_MBAR_CLOSE_D ((HBITMAP) 6) /* ;Internal 4.1 */
  5983. #define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP) 7) /* ;Internal 4.1 */
  5984. #define HBMMENU_MBARLAST ((HBITMAP) 7) /* ;Internal 4.1 */
  5985. #define HBMMENU_POPUPFIRST ((HBITMAP) 8) /* ;Internal 4.1 */
  5986. #define HBMMENU_POPUP_CLOSE ((HBITMAP) 8) /* ;Internal 4.1 */
  5987. #define HBMMENU_POPUP_RESTORE ((HBITMAP) 9) /* ;Internal 4.1 */
  5988. #define HBMMENU_POPUP_MAXIMIZE ((HBITMAP) 10) /* ;Internal 4.1 */
  5989. #define HBMMENU_POPUP_MINIMIZE ((HBITMAP) 11) /* ;Internal 4.1 */
  5990. #define HBMMENU_POPUPLAST ((HBITMAP) 11) /* ;Internal 4.1 */
  5991. #define HBMMENU_MAX ((HBITMAP) 12) /* ;Internal 4.1 */
  5992. #endif // (WINVER >= 0x40A) /* ;Internal 4.1 */
  5993. #define MIIM40_MASK 0x0000006F // ;Internal
  5994. #define MIIM_MASK 0x000001FF // ;Internal
  5995. /* ;Internal 4.0 */
  5996. typedef struct tagMENUITEMINFO40 /* ;Internal 4.1 */
  5997. { /* ;Internal 4.1 */
  5998. DWORD cbSize; /* ;Internal 4.1 */
  5999. DWORD fMask; /* ;Internal 4.1 */
  6000. UINT fType; /* ;Internal 4.1 */
  6001. UINT fState; /* ;Internal 4.1 */
  6002. UINT wID; /* ;Internal 4.1 */
  6003. #ifdef tagWND /* ;Internal 4.1 */
  6004. HMENU_16 hSubMenu; /* ;Internal 4.1 */
  6005. #else /* ;Internal 4.1 */
  6006. HMENU hSubMenu; /* ;Internal 4.1 */
  6007. #endif /* ;Internal 4.1 */
  6008. HBITMAP hbmpChecked; /* ;Internal 4.1 */
  6009. HBITMAP hbmpUnchecked; /* ;Internal 4.1 */
  6010. DWORD dwItemData; /* ;Internal 4.1 */
  6011. LPSTR dwTypeData; /* ;Internal 4.1 */
  6012. UINT cch; /* ;Internal 4.1 */
  6013. } /* ;Internal 4.1 */
  6014. MENUITEMINFO40, FAR* LPMENUITEMINFO40; /* ;Internal 4.1 */
  6015. typedef const MENUITEMINFO40 FAR * LPCMENUITEMINFO40; /* ;Internal 4.1 */
  6016. /* ;Internal 4.0 */
  6017. typedef struct tagMENUITEMINFO /* ;Internal 4.0 */
  6018. { /* ;Internal 4.0 */
  6019. DWORD cbSize; /* ;Internal 4.0 */
  6020. DWORD fMask; /* ;Internal 4.0 */
  6021. UINT fType; /* ;Internal 4.0 */
  6022. UINT fState; /* ;Internal 4.0 */
  6023. UINT wID; /* ;Internal 4.0 */
  6024. #ifdef tagWND /* ;Internal 4.0 */
  6025. HMENU_16 hSubMenu; /* ;Internal 4.0 */
  6026. #else /* ;Internal 4.0 */
  6027. HMENU hSubMenu; /* ;Internal 4.0 */
  6028. #endif /* ;Internal 4.0 */
  6029. HBITMAP hbmpChecked; /* ;Internal 4.0 */
  6030. HBITMAP hbmpUnchecked; /* ;Internal 4.0 */
  6031. DWORD dwItemData; /* ;Internal 4.0 */
  6032. LPSTR dwTypeData; /* ;Internal 4.0 */
  6033. UINT cch; /* ;Internal 4.0 */
  6034. #if (WINVER >= 0x40A) /* ;Internal 4.1 */
  6035. HBITMAP hbmpItem; /* ;Internal 4.1 */
  6036. #endif // (WINVER >= 0x40A) /* ;Internal 4.1 */
  6037. } /* ;Internal 4.0 */
  6038. MENUITEMINFO, FAR* LPMENUITEMINFO; /* ;Internal 4.0 */
  6039. typedef const MENUITEMINFO FAR * LPCMENUITEMINFO; /* ;Internal 4.0 */
  6040. /* ;Internal 4.0 */
  6041. BOOL WINAPI InsertMenuItem (HMENU, UINT, BOOL, LPCMENUITEMINFO); /* ;Internal 4.0 */
  6042. BOOL WINAPI GetMenuItemInfo(HMENU, UINT, BOOL, LPMENUITEMINFO); /* ;Internal 4.0 */
  6043. BOOL WINAPI SetMenuItemInfo(HMENU, UINT, BOOL, LPCMENUITEMINFO); /* ;Internal 4.0 */
  6044. #if (WINVER >= 0x40A) /* ;Internal 4.1 */
  6045. BOOL WINAPI GetMenuInfo(HMENU, LPMENUINFO); /* ;Internal 4.1 */
  6046. BOOL WINAPI SetMenuInfo(HMENU, LPCMENUINFO); /* ;Internal 4.1 */
  6047. #endif // (WINVER >= 0x40A) /* ;Internal 4.1 */
  6048. /* ;Internal 4.0 */
  6049. #define GMDI_USEDISABLED 0x0001 /* ;Internal 4.0 */
  6050. #define GMDI_GOINTOPOPUPS 0x0002 /* ;Internal 4.0 */
  6051. DWORD WINAPI GetMenuDefaultItem(HMENU, BOOL, UINT); /* ;Internal 4.0 */
  6052. BOOL WINAPI SetMenuDefaultItem(HMENU, UINT, BOOL); /* ;Internal 4.0 */
  6053. /* ;Internal 4.0 */
  6054. BOOL WINAPI GetMenuItemRect(HWND, HMENU, UINT, LPRECT); /* ;Internal 4.0 */
  6055. int WINAPI MenuItemFromPoint(HWND, HMENU, POINT); /* ;Internal 4.0 */
  6056. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  6057. /* ;Internal 4.0 */
  6058. /* Flags for TrackPopupMenu */
  6059. #define TPM_LEFTBUTTON 0x0000
  6060. #if (WINVER >= 0x030a)
  6061. #define TPM_RIGHTBUTTON 0x0002
  6062. #define TPM_LEFTALIGN 0x0000
  6063. #define TPM_CENTERALIGN 0x0004
  6064. #define TPM_RIGHTALIGN 0x0008
  6065. // ;Internal
  6066. #if (WINVER >= 0x0400) // ;Internal
  6067. #define TPM_TOPALIGN 0x0000 // ;Internal 4.0
  6068. #define TPM_VCENTERALIGN 0x0010 // ;Internal 4.0
  6069. #define TPM_BOTTOMALIGN 0x0020 // ;Internal 4.0
  6070. // ;Internal 4.0
  6071. #define TPM_HORIZONTAL 0x0000 // ;Internal 4.0
  6072. #define TPM_VERTICAL 0x0040 // ;Internal 4.0
  6073. #define TPM_NONOTIFY 0x0080 // ;Internal 4.0
  6074. #define TPM_RETURNCMD 0x0100 // ;Internal 4.0
  6075. #define TPM_SYSMENU 0x0200 // ;Internal
  6076. #if (WINVER >= 0x040A) // ;Internal 4.1
  6077. #define TPM_RECURSE 0x0001 // ;Internal 4.1
  6078. #endif /* WINVER >= 0x040A */ // ;Internal 4.1
  6079. #endif /* WINVER >= 0x0400 */ // ;Internal
  6080. #endif /* WINVER >= 0x030a */
  6081. #endif /* NOMENUS */
  6082. /****** Scroll bar support **************************************************/
  6083. #ifndef NOSCROLL
  6084. /* WM_H/VSCROLL commands */
  6085. #define SB_LINEUP 0
  6086. #define SB_LINELEFT 0
  6087. #define SB_LINEDOWN 1
  6088. #define SB_LINERIGHT 1
  6089. #define SB_PAGEUP 2
  6090. #define SB_PAGELEFT 2
  6091. #define SB_PAGEDOWN 3
  6092. #define SB_PAGERIGHT 3
  6093. #define SB_THUMBPOSITION 4
  6094. #define SB_THUMBTRACK 5
  6095. #define SB_TOP 6
  6096. #define SB_LEFT 6
  6097. #define SB_BOTTOM 7
  6098. #define SB_RIGHT 7
  6099. #define SB_ENDSCROLL 8
  6100. #define SB_MSGCMD_MAX 8 /* ;Internal */
  6101. /* Scroll bar selection constants */
  6102. #define SB_HORZ 0
  6103. #define SB_VERT 1
  6104. #define SB_CTL 2
  6105. #define SB_BOTH 3
  6106. #define SB_MAX 3 // ;Internal
  6107. int WINAPI SetScrollPos(HWND, int, int, BOOL);
  6108. #ifdef tagWND // ;Internal
  6109. LONG WINAPI GetScrollPos(HWND, int); // ;Internal
  6110. BOOL WINAPI GetScrollRange(HWND, int, LPINT, LPINT); // ;Internal
  6111. BOOL WINAPI SetScrollRange(HWND, int, int, int, BOOL); // ;Internal
  6112. BOOL WINAPI ShowScrollBar(HWND, int, BOOL); // ;Internal
  6113. #else // ;Internal
  6114. int WINAPI GetScrollPos(HWND, int);
  6115. void WINAPI GetScrollRange(HWND, int, LPINT, LPINT);
  6116. void WINAPI SetScrollRange(HWND, int, int, int, BOOL);
  6117. void WINAPI ShowScrollBar(HWND, int, BOOL);
  6118. #endif // ;Internal
  6119. BOOL WINAPI EnableScrollBar(HWND, int, UINT);
  6120. /* EnableScrollBar() flags */
  6121. #define ESB_ENABLE_BOTH 0x0000
  6122. #define ESB_DISABLE_BOTH 0x0003
  6123. #define ESB_DISABLE_LEFT 0x0001
  6124. #define ESB_DISABLE_RIGHT 0x0002
  6125. #define ESB_DISABLE_UP 0x0001
  6126. #define ESB_DISABLE_DOWN 0x0002
  6127. #define ESB_DISABLE_LTUP ESB_DISABLE_LEFT
  6128. #define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT
  6129. #define ESB_MAX 0x0003 // ;Internal
  6130. #define SB_DISABLE_MASK ESB_DISABLE_BOTH // ;Internal
  6131. // ;Internal
  6132. #define SBM_FIRST_16 WM_USER // ;Internal
  6133. #define SBM_SETPOS (WM_USER) // ;Internal
  6134. #define SBM_GETPOS (WM_USER+1) // ;Internal
  6135. #define SBM_SETRANGE (WM_USER+2) // ;Internal
  6136. #define SBM_GETRANGE (WM_USER+3) // ;Internal
  6137. #define SBM_ENABLE_ARROWS (WM_USER+4) // ;Internal
  6138. // ;Internal
  6139. #if (WINVER >= 0x0400) // ;Internal 4.0
  6140. #define SBM_SETRANGEREDRAW (WM_USER+6) // ;Internal 4.0
  6141. #define SBM_SETSCROLLINFO (WM_USER+9) // ;Internal 4.0
  6142. #define SBM_GETSCROLLINFO (WM_USER+10) // ;Internal 4.0
  6143. #define SBM_MSGMAX (WM_USER+11) // ;Internal 4.0
  6144. // ;Internal 4.0
  6145. #define SIF_RANGE 0x0001 // ;Internal 4.0
  6146. #define SIF_PAGE 0x0002 // ;Internal 4.0
  6147. #define SIF_POS 0x0004 // ;Internal 4.0
  6148. #define SIF_DISABLENOSCROLL 0x0008 // ;Internal 4.0
  6149. #define SIF_TRACKPOS 0x0010 // ;Internal 4.0
  6150. #define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)// ;Internal
  6151. #define SIF_RETURNOLDPOS 0x1000 // ;Internal
  6152. #define SIF_NOSCROLL 0x2000 // ;Internal
  6153. #define SIF_MASK 0x701F // ;Internal
  6154. // ;Internal 4.0
  6155. typedef struct tagSCROLLINFO // ;Internal 4.0
  6156. { // ;Internal 4.0
  6157. DWORD cbSize; // ;Internal 4.0
  6158. DWORD fMask; // ;Internal 4.0
  6159. LONG nMin; // ;Internal 4.0
  6160. LONG nMax; // ;Internal 4.0
  6161. DWORD nPage; // ;Internal 4.0
  6162. LONG nPos; // ;Internal 4.0
  6163. LONG nTrackPos; // ;Internal 4.0
  6164. } // ;Internal 4.0
  6165. SCROLLINFO, FAR *LPSCROLLINFO; // ;Internal 4.0
  6166. typedef const SCROLLINFO FAR *LPCSCROLLINFO; // ;Internal 4.0
  6167. // ;Internal 4.0
  6168. LONG WINAPI SetScrollInfo(HWND, int, LPCSCROLLINFO, BOOL); // ;Internal 4.0
  6169. BOOL WINAPI GetScrollInfo(HWND, int, LPSCROLLINFO); // ;Internal 4.0
  6170. #endif /* WINVER >= 0x0400 */ // ;Internal 4.0
  6171. #endif /* NOSCROLL */
  6172. /******* Clipboard manager **************************************************/
  6173. #ifndef NOCLIPBOARD
  6174. /* Predefined Clipboard Formats */
  6175. #define CF_FIRST 1
  6176. #define CF_TEXT 1
  6177. #define CF_BITMAP 2
  6178. #define CF_METAFILEPICT 3
  6179. #define CF_SYLK 4
  6180. #define CF_DIF 5
  6181. #define CF_TIFF 6
  6182. #define CF_OEMTEXT 7
  6183. #define CF_DIB 8
  6184. #define CF_PALETTE 9
  6185. #define CF_PENDATA 10
  6186. #define CF_RIFF 11
  6187. #define CF_WAVE 12
  6188. #define CF_UNICODETEXT 13 // ;Internal NT
  6189. #define CF_ENHMETAFILE 14 // ;Internal NT
  6190. #define CF_HDROP 15 // ;Internal 4.0
  6191. #define CF_LOCALE 16 // ;Internal 4.0
  6192. #define CF_MAX 17 // ;Internal 4.0
  6193. #define CF_OWNERDISPLAY 0x0080
  6194. #define CF_DSPTEXT 0x0081
  6195. #define CF_DSPBITMAP 0x0082
  6196. #define CF_DSPMETAFILEPICT 0x0083
  6197. #define CF_DSPENHMETAFILE 0x008E /* ;Internal NT */
  6198. /* "Private" formats don't get GlobalFree()'d */
  6199. #define CF_PRIVATEFIRST 0x0200
  6200. #define CF_PRIVATELAST 0x02FF
  6201. /* "GDIOBJ" formats do get DeleteObject()'d */
  6202. #define CF_GDIOBJFIRST 0x0300
  6203. #define CF_GDIOBJLAST 0x03FF
  6204. /* Clipboard Manager Functions */
  6205. BOOL WINAPI OpenClipboard(HWND);
  6206. BOOL WINAPI CloseClipboard(void);
  6207. BOOL WINAPI EmptyClipboard(void);
  6208. #if (WINVER >= 0x030a)
  6209. #ifdef tagWND /* ;Internal */
  6210. HWND_16 WINAPI GetOpenClipboardWindow(void); /* ;Internal */
  6211. #else /* ;Internal */
  6212. HWND WINAPI GetOpenClipboardWindow(void);
  6213. #endif /* ;Internal */
  6214. #endif /* WINVER >= 0x030a */
  6215. #ifdef tagWND /* ;Internal */
  6216. HWND_16 WINAPI GetClipboardOwner(void); /* ;Internal */
  6217. HWND_16 WINAPI SetClipboardViewer(HWND); /* ;Internal */
  6218. HWND_16 WINAPI GetClipboardViewer(void); /* ;Internal */
  6219. #else /* ;Internal */
  6220. HWND WINAPI GetClipboardOwner(void);
  6221. HWND WINAPI SetClipboardViewer(HWND);
  6222. HWND WINAPI GetClipboardViewer(void);
  6223. #endif /* ;Internal */
  6224. HANDLE WINAPI SetClipboardData(UINT, HANDLE);
  6225. HANDLE WINAPI GetClipboardData(UINT);
  6226. BOOL WINAPI IsClipboardFormatAvailable(UINT);
  6227. #ifdef tagWND // ;Internal
  6228. DWORD WINAPI GetPriorityClipboardFormat(UINT FAR*, int); // ;Internal
  6229. #else // ;Internal
  6230. int WINAPI GetPriorityClipboardFormat(UINT FAR*, int);
  6231. #endif // ;Internal
  6232. UINT WINAPI RegisterClipboardFormat(LPCSTR);
  6233. int WINAPI CountClipboardFormats(void);
  6234. UINT WINAPI EnumClipboardFormats(UINT);
  6235. int WINAPI GetClipboardFormatName(UINT, LPSTR, int);
  6236. BOOL WINAPI ChangeClipboardChain(HWND, HWND);
  6237. #endif /* NOCLIPBOARD */
  6238. /* ;Internal NT */
  6239. // /* LPARAM of WM_COPYDATA */ /* ;Internal NT */
  6240. // typedef struct tagCOPYDATASTRUCT /* ;Internal NT */
  6241. // { /* ;Internal NT */
  6242. // DWORD dwData; /* ;Internal NT */
  6243. // DWORD cbData; /* ;Internal NT */
  6244. // LPSTR lpData; /* ;Internal NT */
  6245. // } COPYDATASTRUCT, FAR *LPCOPYDATASTRUCT; /* ;Internal NT */
  6246. /****** Mouse cursor support *************************************************/
  6247. HCURSOR WINAPI LoadCursor(HINSTANCE, LPCSTR);
  6248. HCURSOR WINAPI CreateCursor(HINSTANCE, int, int, int, int, const void FAR*, const void FAR*);
  6249. BOOL WINAPI DestroyCursor(HCURSOR);
  6250. #if (WINVER >= 0x030a)
  6251. HCURSOR WINAPI CopyCursor(HINSTANCE, HCURSOR);
  6252. #endif /* WINVER >= 0x030a */
  6253. int WINAPI ShowCursor(BOOL);
  6254. #ifdef tagWND // ;Internal
  6255. BOOL WINAPI ClipCursor(LPCRECT); // ;Internal
  6256. BOOL WINAPI SetCursorPos(int, int); // ;Internal
  6257. BOOL WINAPI GetCursorPos(LPPOINT); // ;Internal
  6258. #else // ;Internal
  6259. void WINAPI ClipCursor(LPCRECT);
  6260. void WINAPI SetCursorPos(int, int);
  6261. void WINAPI GetCursorPos(LPPOINT);
  6262. #endif // ;Internal
  6263. HCURSOR WINAPI SetCursor(HCURSOR);
  6264. #if (WINVER >= 0x030a)
  6265. HCURSOR WINAPI GetCursor(void);
  6266. #ifdef tagWND // ;Internal
  6267. BOOL WINAPI GetClipCursor(LPRECT); // ;Internal
  6268. #else // ;Internal
  6269. void WINAPI GetClipCursor(LPRECT);
  6270. #endif // ;Internal
  6271. #endif /* WINVER >= 0x030a */
  6272. /* Standard cursor resource IDs */
  6273. #define IDC_ARROW MAKEINTRESOURCE(32512)
  6274. #define IDC_IBEAM MAKEINTRESOURCE(32513)
  6275. #define IDC_WAIT MAKEINTRESOURCE(32514)
  6276. #define IDC_CROSS MAKEINTRESOURCE(32515)
  6277. #define IDC_UPARROW MAKEINTRESOURCE(32516)
  6278. #define IDC_NWPEN MAKEINTRESOURCE(32631) // ;Internal
  6279. #define IDC_HUNG MAKEINTRESOURCE(32632) // ;Internal
  6280. #define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */
  6281. #define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */
  6282. #define IDC_SIZENWSE MAKEINTRESOURCE(32642)
  6283. #define IDC_SIZENESW MAKEINTRESOURCE(32643)
  6284. #define IDC_SIZEWE MAKEINTRESOURCE(32644)
  6285. #define IDC_SIZENS MAKEINTRESOURCE(32645)
  6286. #define IDC_SIZEALL MAKEINTRESOURCE(32646)
  6287. #define IDC_NO MAKEINTRESOURCE(32648)
  6288. #define IDC_APPSTARTING MAKEINTRESOURCE(32650) // ;Internal NT 4.0
  6289. #if (WINVER >= 0x0400) // ;Internal 4.0
  6290. #define IDC_HELP MAKEINTRESOURCE(32651) // ;Internal 4.0
  6291. #endif /* WINVER >= 0x400 */ // ;Internal 4.0
  6292. /****** Icon support *********************************************************/
  6293. HICON WINAPI LoadIcon(HINSTANCE, LPCSTR);
  6294. HICON WINAPI CreateIcon(HINSTANCE, int, int, BYTE, BYTE, const void FAR*, const void FAR*);
  6295. BOOL WINAPI DestroyIcon(HICON);
  6296. #if (WINVER >= 0x030a)
  6297. HICON WINAPI CopyIcon(HINSTANCE, HICON);
  6298. /* ;Internal NT */
  6299. /* Icon/cursor information */ /* ;Internal NT */
  6300. typedef struct tagICONINFO /* ;Internal NT */
  6301. { /* ;Internal NT */
  6302. BOOL fIcon; /* ;Internal NT */
  6303. int xHotspot; /* ;Internal NT */
  6304. int yHotspot; /* ;Internal NT */
  6305. HBITMAP hbmMask; /* ;Internal NT */
  6306. HBITMAP hbmColor; /* ;Internal NT */
  6307. } ICONINFO, *PICONINFO, FAR *LPICONINFO; /* ;Internal NT */
  6308. /* ;Internal NT */
  6309. HICON WINAPI CreateIconIndirect(const ICONINFO FAR *); /* ;Internal NT */
  6310. BOOL WINAPI GetIconInfo(HICON, LPICONINFO); /* ;Internal NT */
  6311. /* ;Internal 4.0 */
  6312. #define RES_ICON 1 /* ;Internal 4.0 */
  6313. #define RES_CURSOR 2 /* ;Internal 4.0 */
  6314. typedef struct tagNEWHEADER
  6315. {
  6316. WORD Reserved;
  6317. WORD ResType; /* RES_ICON or RES_CURSOR */
  6318. WORD ResCount;
  6319. } NEWHEADER, FAR *LPNEWHEADER;
  6320. // ;Internal
  6321. #ifdef STRICT // ;Internal
  6322. int WINAPI LookupIconIdFromDirectoryEx(LPNEWHEADER, BOOL, int, int, UINT); // ;Internal 4.0
  6323. #else // ;Internal
  6324. int WINAPI LookupIconIdFromDirectoryEx(LPVOID, BOOL, int, int, UINT); // ;Internal 4.0
  6325. #endif /* STRICT */ // ;Internal
  6326. // ;Internal 4.0
  6327. HICON WINAPI CreateIconFromResourceEx(LPVOID, DWORD, BOOL, DWORD, // ;Internal 4.0
  6328. UINT, UINT, UINT); // ;Internal 4.0
  6329. #if (WINVER >= 0x0400)
  6330. /* Icon/Cursor header */
  6331. typedef struct tagCURSORSHAPE
  6332. {
  6333. int xHotSpot;
  6334. int yHotSpot;
  6335. int cx;
  6336. int cy;
  6337. int cbWidth;
  6338. BYTE Planes;
  6339. BYTE BitsPixel;
  6340. } CURSORSHAPE, FAR *LPCURSORSHAPE;
  6341. #define IMAGE_BITMAP 0 // ;Internal 4.0
  6342. #define IMAGE_ICON 1 // ;Internal 4.0
  6343. #define IMAGE_CURSOR 2 // ;Internal 4.0
  6344. #define IMAGE_ENHMETAFILE 3 // ;Internal 4.0
  6345. #define IMAGE_MAX 4 // ;Internal 4.0
  6346. // ;Internal 4.0
  6347. HANDLE WINAPI LoadImage(HINSTANCE, LPCSTR, UINT, int, int, UINT); // ;Internal 4.0
  6348. HANDLE WINAPI CopyImage(HINSTANCE, HANDLE, UINT, int, int, UINT); // ;Internal 4.0
  6349. // ;Internal 4.0
  6350. #define LR_DEFAULTCOLOR 0x0000 // ;Internal 4.0
  6351. #define LR_MONOCHROME 0x0001 // ;Internal 4.0
  6352. #define LR_COLOR 0x0002 // ;Internal 4.0
  6353. #define LR_COPYRETURNORG 0x0004 // ;Internal 4.0
  6354. #define LR_COPYDELETEORG 0x0008 // ;Internal 4.0
  6355. #define LR_LOADFROMFILE 0x0010 // ;Internal 4.0
  6356. #define LR_LOADTRANSPARENT 0x0020 // ;Internal 4.0
  6357. #define LR_DEFAULTSIZE 0x0040 // ;Internal 4.0
  6358. #define LR_VGACOLOR 0x0080 // ;Internal 4.0
  6359. #define LR_LOADMAP3DCOLORS 0x1000 // ;Internal 4.0
  6360. #define LR_CREATEDIBSECTION 0x2000 // ;Internal 4.0
  6361. #define LR_COPYFROMRESOURCE 0x4000 // ;Internal 4.0
  6362. #define LR_SHARED 0x8000 // ;Internal 4.0
  6363. // ;Internal 4.0
  6364. #define DI_MASK 0x0001 // ;Internal 4.0
  6365. #define DI_IMAGE 0x0002 // ;Internal 4.0
  6366. #define DI_NORMAL 0x0003 // ;Internal 4.0
  6367. #define DI_COMPAT 0x0004 // ;Internal 4.0
  6368. #define DI_DEFAULTSIZE 0x0008 // ;Internal 4.0
  6369. // ;Internal 4.0
  6370. BOOL WINAPI DrawIconEx(HDC hdc, int x, int y, HICON hIcon, int cx, // ;Internal 4.0
  6371. int cy, UINT istepIfAniCur, HBRUSH hbrFastDraw, UINT diFlags); // ;Internal 4.0
  6372. #endif /* WINVER >= 0x0400 */
  6373. #endif /* WINVER >= 0x030a */
  6374. BOOL WINAPI DrawIcon(HDC, int, int, HICON);
  6375. #ifndef NOICONS
  6376. /* Standard icon resource IDs */
  6377. #ifdef RC_INVOKED
  6378. #define IDI_APPLICATION 32512
  6379. #define IDI_ERROR 32513 /* ;win40: Name changed from IDI_HAND */
  6380. #define IDI_QUESTION 32514
  6381. #define IDI_WARNING 32515 /* ;win40: Name changed from IDI_EXCLAMATION */
  6382. #define IDI_INFORMATION 32516 /* ;win40: Name changed from IDI_ASTERISK */
  6383. #define IDI_WINLOGO 32517 /* ;Internal NT */
  6384. #else
  6385. #define IDI_APPLICATION MAKEINTRESOURCE(32512)
  6386. #define IDI_ERROR MAKEINTRESOURCE(32513) /* ;win40: Name changed from IDI_HAND */
  6387. #define IDI_QUESTION MAKEINTRESOURCE(32514)
  6388. #define IDI_WARNING MAKEINTRESOURCE(32515) /* ;win40: Name changed from IDI_EXCLAMATION */
  6389. #define IDI_INFORMATION MAKEINTRESOURCE(32516) /* ;win40: Name changed from IDI_ASTERISK */
  6390. #define IDI_WINLOGO MAKEINTRESOURCE(32517) /* ;Internal NT */
  6391. #endif /* RC_INVOKED */
  6392. #define IDI_HAND IDI_ERROR
  6393. #define IDI_EXCLAMATION IDI_WARNING
  6394. #define IDI_ASTERISK IDI_INFORMATION
  6395. #endif /* NOICONS */
  6396. /****** Caret support ********************************************************/
  6397. #ifdef tagWND /* ;Internal */
  6398. BOOL WINAPI CreateCaret(HWND, HBITMAP, int, int); /* ;Internal */
  6399. BOOL WINAPI DestroyCaret(void); /* ;Internal */
  6400. BOOL WINAPI ShowCaret(HWND); /* ;Internal */
  6401. BOOL WINAPI HideCaret(HWND); /* ;Internal */
  6402. BOOL WINAPI SetCaretPos(int, int); /* ;Internal */
  6403. BOOL WINAPI SetCaretBlinkTime(UINT); /* ;Internal */
  6404. BOOL WINAPI GetCaretPos(LPPOINT); /* ;Internal */
  6405. #else /* ;Internal */
  6406. void WINAPI CreateCaret(HWND, HBITMAP, int, int);
  6407. void WINAPI DestroyCaret(void);
  6408. void WINAPI ShowCaret(HWND);
  6409. void WINAPI HideCaret(HWND);
  6410. void WINAPI SetCaretPos(int, int);
  6411. void WINAPI SetCaretBlinkTime(UINT);
  6412. void WINAPI GetCaretPos(LPPOINT);
  6413. #endif /* ;Internal */
  6414. UINT WINAPI GetCaretBlinkTime(void);
  6415. /****** WM_SYSCOMMAND support ***********************************************/
  6416. #ifndef NOSYSCOMMANDS
  6417. /* System Menu Command Values */
  6418. #define SC_SIZE 0xF000
  6419. #define SC_MOVE 0xF010
  6420. #define SC_MINIMIZE 0xF020
  6421. #define SC_MAXIMIZE 0xF030
  6422. #define SC_NEXTWINDOW 0xF040
  6423. #define SC_PREVWINDOW 0xF050
  6424. #define SC_CLOSE 0xF060
  6425. #define SC_VSCROLL 0xF070
  6426. #define SC_HSCROLL 0xF080
  6427. #define SC_MOUSEMENU 0xF090
  6428. #define SC_KEYMENU 0xF100
  6429. #define SC_ARRANGE 0xF110
  6430. #define SC_RESTORE 0xF120
  6431. #define SC_TASKLIST 0xF130
  6432. #define SC_SCREENSAVE 0xF140
  6433. #define SC_HOTKEY 0xF150
  6434. #define SC_DEFAULT 0xF160 /* ;Internal 4.0 */
  6435. #define SC_MONITORPOWER 0xF170 /* ;Internal 4.0 */
  6436. #define SC_CONTEXTHELP 0xF180 /* ;Internal 4.0 */
  6437. #define SC_SYSTEMSLEEP 0xF190 /* ;Internal 4.10 */
  6438. #define SC_SEPARATOR 0xF00F /* ;Internal 4.0 */
  6439. /* Obsolete names */
  6440. #define SC_ICON SC_MINIMIZE
  6441. #define SC_ZOOM SC_MAXIMIZE
  6442. #endif /* NOSYSCOMMANDS */
  6443. /****** MDI Support *********************************************************/
  6444. #ifndef NOMDI
  6445. /* CreateWindow lpParams structure for creating MDI client */
  6446. typedef struct tagCLIENTCREATESTRUCT
  6447. {
  6448. #ifdef tagWND /* ;Internal */
  6449. HMENU_16 hWindowMenu; /* ;Internal */
  6450. #else /* ;Internal */
  6451. HMENU hWindowMenu;
  6452. #endif /* ;Internal */
  6453. UINT idFirstChild;
  6454. } CLIENTCREATESTRUCT;
  6455. typedef CLIENTCREATESTRUCT FAR* LPCLIENTCREATESTRUCT;
  6456. /* MDI client style bits */
  6457. #if (WINVER >= 0x030a)
  6458. #define MDIS_ALLCHILDSTYLES 0x0001
  6459. #endif /* WINVER >= 0x030a */
  6460. /* WM_MDICREATE message structure */
  6461. typedef struct tagMDICREATESTRUCT
  6462. {
  6463. LPCSTR szClass;
  6464. LPCSTR szTitle;
  6465. HINSTANCE hOwner;
  6466. int x;
  6467. int y;
  6468. int cx;
  6469. int cy;
  6470. DWORD style;
  6471. LPARAM lParam;
  6472. } MDICREATESTRUCT;
  6473. typedef MDICREATESTRUCT FAR* LPMDICREATESTRUCT;
  6474. #if (WINVER >= 0x030a)
  6475. /* wParam values for WM_MDITILE and WM_MDICASCADE messages. */
  6476. #define MDITILE_VERTICAL 0x0000
  6477. #define MDITILE_HORIZONTAL 0x0001
  6478. #define MDITILE_SKIPDISABLED 0x0002
  6479. #endif /* WINVER >= 0x030a */
  6480. #ifdef tagWND /* ;Internal */
  6481. LRESULT WINAPI DefFrameProc(HWND, HWND_16, UINT, WPARAM, LPARAM); /* ;Internal */
  6482. #else /* ;Internal */
  6483. LRESULT WINAPI DefFrameProc(HWND, HWND, UINT, WPARAM, LPARAM);
  6484. #endif /* ;Internal */
  6485. LRESULT WINAPI DefMDIChildProc(HWND, UINT, WPARAM, LPARAM);
  6486. #ifndef NOMSG
  6487. BOOL WINAPI TranslateMDISysAccel(HWND, LPMSG);
  6488. #endif
  6489. UINT WINAPI ArrangeIconicWindows(HWND);
  6490. BOOL WINAPI TileChildWindows(HWND, UINT);
  6491. BOOL WINAPI CascadeChildWindows(HWND, UINT);
  6492. /* ;Internal 4.0 */
  6493. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  6494. #ifdef tagWND /* ;Internal 4.0 */
  6495. typedef const HWND_16 FAR *LPHWND; /* ;Internal 4.0 */
  6496. #else /* ;Internal 4.0 */
  6497. typedef const HWND FAR *LPHWND; /* ;Internal 4.0 */
  6498. #endif /* tagWND */ /* ;Internal 4.0 */
  6499. /* ;Internal 4.0 */
  6500. UINT WINAPI TileWindows (HWND, UINT, LPCRECT, UINT, LPHWND); /* ;Internal 4.0 */
  6501. UINT WINAPI CascadeWindows(HWND, UINT, LPCRECT, UINT, LPHWND); /* ;Internal 4.0 */
  6502. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  6503. #endif /* NOMDI */
  6504. /****** Dialog and Control Management ***************************************/
  6505. #ifndef NOCTLMGR
  6506. /* Dialog window class */
  6507. #define WC_DIALOG (MAKEINTATOM(0x8002))
  6508. /* cbWndExtra bytes needed by dialog manager for dialog classes */
  6509. #define DLGWINDOWEXTRA 30
  6510. /* Dialog styles */
  6511. #define DS_ABSALIGN 0x0001L
  6512. #define DS_SYSMODAL 0x0002L
  6513. #define DS_LOCALEDIT 0x0020L
  6514. #define DS_SETFONT 0x0040L
  6515. #define DS_MODALFRAME 0x0080L
  6516. #define DS_NOIDLEMSG 0x0100L
  6517. #define DS_SETFOREGROUND 0x0200L // ;Internal NT
  6518. #define DS_VALID31 0x03e7L // ;Internal
  6519. #if (WINVER >= 0x0400) // ;Internal
  6520. #define DS_3DLOOK 0x0004L // ;Internal 4.0
  6521. #define DS_FIXEDSYS 0x0008L // ;Internal 4.0
  6522. #define DS_NOFAILCREATE 0x0010L // ;Internal 4.0
  6523. #define DS_CONTROL 0x0400L // ;Internal 4.0
  6524. #define DS_RECURSE DS_CONTROL // ;Internal BOGUS GOING AWAY
  6525. #define DS_CENTER 0x0800L // ;Internal 4.0
  6526. #define DS_CENTERMOUSE 0x1000L // ;Internal 4.0
  6527. #define DS_CONTEXTHELP 0x2000L // ;Internal 4.0
  6528. #define DS_COMMONDIALOG 0x4000L // ;Internal
  6529. #define DS_VALID40 0x7FFFL // ;Internal
  6530. #endif /* WINVER >= 0x0400 */ // ;Internal
  6531. /* Dialog messages */
  6532. #define DM_GETDEFID (WM_USER+0)
  6533. #define DM_SETDEFID (WM_USER+1)
  6534. #define DM_REPOSITION (WM_USER+2) /* ;Internal 4.0 */
  6535. /* ;Internal 4.0 */
  6536. #if WINVER >= 0x0400 /* ;Internal 4.0 */
  6537. #define PSM_PAGEINFO (WM_USER+100) /* ;Internal 4.0 */
  6538. #define PSM_SHEETINFO (WM_USER+101) /* ;Internal 4.0 */
  6539. /* ;Internal 4.0 */
  6540. #define PSI_SETACTIVE 0x0001L /* ;Internal 4.0 */
  6541. #define PSI_KILLACTIVE 0x0002L /* ;Internal 4.0 */
  6542. #define PSI_APPLY 0x0003L /* ;Internal 4.0 */
  6543. #define PSI_RESET 0x0004L /* ;Internal 4.0 */
  6544. #define PSI_HASHELP 0x0005L /* ;Internal 4.0 */
  6545. #define PSI_HELP 0x0006L /* ;Internal 4.0 */
  6546. /* ;Internal 4.0 */
  6547. #define PSI_CHANGED 0x0001L /* ;Internal 4.0 */
  6548. #define PSI_GUISTART 0x0002L /* ;Internal 4.0 */
  6549. #define PSI_REBOOT 0x0003L /* ;Internal 4.0 */
  6550. #define PSI_GETSIBLINGS 0x0004L /* ;Internal 4.0 */
  6551. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  6552. /* Returned in HIWORD() of DM_GETDEFID result if msg is supported */
  6553. #define DC_HASDEFID 0x534B
  6554. #ifdef STRICT
  6555. #ifdef tagWND /* ;Internal */
  6556. typedef BOOL (CALLBACK* DLGPROC)(HWND_16, UINT, WPARAM, LPARAM);/* ;Internal */
  6557. #else /* ;Internal */
  6558. typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  6559. #endif /* ;Internal */
  6560. #else
  6561. typedef FARPROC DLGPROC;
  6562. #endif
  6563. /* Get/SetWindowWord/Long offsets for use with WC_DIALOG windows */
  6564. #define DWL_MSGRESULT 0
  6565. #define DWL_DLGPROC 4
  6566. #define DWL_USER 8
  6567. #ifndef NOMSG
  6568. BOOL WINAPI IsDialogMessage(HWND, LPMSG);
  6569. #endif
  6570. #ifdef tagWND /* ;Internal */
  6571. LRESULT WINAPI DefDlgProc(HWND_16, UINT, WPARAM, LPARAM); /* ;Internal */
  6572. #else /* ;Internal */
  6573. LRESULT WINAPI DefDlgProc(HWND, UINT, WPARAM, LPARAM);
  6574. #endif /* ;Internal */
  6575. #ifdef tagWND /* ;Internal */
  6576. HWND_16 WINAPI CreateDialog(HINSTANCE, LPCSTR, HWND, DLGPROC); /* ;Internal */
  6577. HWND_16 WINAPI CreateDialogIndirect(HINSTANCE, const void FAR*, HWND, DLGPROC); /* ;Internal */
  6578. HWND_16 WINAPI CreateDialogParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM); /* ;Internal */
  6579. HWND_16 WINAPI CreateDialogIndirectParam(HINSTANCE, const void FAR*, HWND, DLGPROC, LPARAM); /* ;Internal */
  6580. #else /* ;Internal */
  6581. HWND WINAPI CreateDialog(HINSTANCE, LPCSTR, HWND, DLGPROC);
  6582. HWND WINAPI CreateDialogIndirect(HINSTANCE, const void FAR*, HWND, DLGPROC);
  6583. HWND WINAPI CreateDialogParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM);
  6584. HWND WINAPI CreateDialogIndirectParam(HINSTANCE, const void FAR*, HWND, DLGPROC, LPARAM);
  6585. #endif /* ;Internal */
  6586. int WINAPI DialogBox(HINSTANCE, LPCSTR, HWND, DLGPROC);
  6587. int WINAPI DialogBoxIndirect(HINSTANCE, HGLOBAL, HWND, DLGPROC);
  6588. #ifdef tagWND /* ;Internal */
  6589. long WINAPI DialogBoxParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM); /* ;Internal */
  6590. long WINAPI DialogBoxIndirectParam(HINSTANCE, HGLOBAL, HWND, DLGPROC, LPARAM); /* ;Internal */
  6591. #else /* ;Internal */
  6592. int WINAPI DialogBoxParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM);
  6593. int WINAPI DialogBoxIndirectParam(HINSTANCE, HGLOBAL, HWND, DLGPROC, LPARAM);
  6594. #endif /* ;Internal */
  6595. void WINAPI EndDialog(HWND, int);
  6596. BOOL WINAPI EndDialog32(HWND, long); /* ;Internal NT */
  6597. #ifdef tagWND /* ;Internal */
  6598. long WINAPI GetDlgCtrlID(HWND); /* ;Internal */
  6599. HWND_16 WINAPI GetDlgItem(HWND, int); /* ;Internal */
  6600. #else /* ;Internal */
  6601. int WINAPI GetDlgCtrlID(HWND);
  6602. HWND WINAPI GetDlgItem(HWND, int);
  6603. #endif /* ;Internal */
  6604. LRESULT WINAPI SendDlgItemMessage(HWND, int, UINT, WPARAM, LPARAM);
  6605. void WINAPI SetDlgItemInt(HWND, int, UINT, BOOL);
  6606. UINT WINAPI GetDlgItemInt(HWND, int, BOOL FAR *, BOOL);
  6607. void WINAPI SetDlgItemText(HWND, int, LPCSTR);
  6608. int WINAPI GetDlgItemText(HWND, int, LPSTR, int);
  6609. void WINAPI CheckDlgButton(HWND, int, UINT);
  6610. void WINAPI CheckRadioButton(HWND, int, int, int);
  6611. UINT WINAPI IsDlgButtonChecked(HWND, int);
  6612. #ifdef tagWND /* ;Internal */
  6613. HWND_16 WINAPI GetNextDlgGroupItem(HWND, HWND, BOOL); /* ;Internal */
  6614. HWND_16 WINAPI GetNextDlgTabItem(HWND, HWND, BOOL); /* ;Internal */
  6615. #else /* ;Internal */
  6616. HWND WINAPI GetNextDlgGroupItem(HWND, HWND, BOOL);
  6617. HWND WINAPI GetNextDlgTabItem(HWND, HWND, BOOL);
  6618. #endif /* ;Internal */
  6619. #ifdef tagWND // ;Internal
  6620. BOOL WINAPI MapDialogRect(HWND, LPRECT); // ;Internal
  6621. #else // ;Internal
  6622. void WINAPI MapDialogRect(HWND, LPRECT);
  6623. #endif // ;Internal
  6624. DWORD WINAPI GetDialogBaseUnits(void);
  6625. /* dialog codes */
  6626. #define DLGC_WANTARROWS 0x0001
  6627. #define DLGC_WANTTAB 0x0002
  6628. #define DLGC_WANTALLKEYS 0x0004
  6629. #define DLGC_WANTMESSAGE 0x0004
  6630. #define DLGC_HASSETSEL 0x0008
  6631. #define DLGC_DEFPUSHBUTTON 0x0010
  6632. #define DLGC_UNDEFPUSHBUTTON 0x0020
  6633. #define DLGC_RADIOBUTTON 0x0040
  6634. #define DLGC_WANTCHARS 0x0080
  6635. #define DLGC_STATIC 0x0100
  6636. #define DLGC_BUTTON 0x2000
  6637. /* WM_CTLCOLOR control IDs */
  6638. #define CTLCOLOR_MSGBOX 0
  6639. #define CTLCOLOR_EDIT 1
  6640. #define CTLCOLOR_LISTBOX 2
  6641. #define CTLCOLOR_BTN 3
  6642. #define CTLCOLOR_DLG 4
  6643. #define CTLCOLOR_SCROLLBAR 5
  6644. #define CTLCOLOR_STATIC 6
  6645. #define CTLCOLOR_MAX 7 // ;Internal
  6646. #endif /* NOCTLMGR */
  6647. /* Standard dialog button IDs */
  6648. #define IDOK 1
  6649. #define IDCANCEL 2
  6650. #define IDABORT 3
  6651. #define IDRETRY 4
  6652. #define IDIGNORE 5
  6653. #define IDYES 6
  6654. #define IDNO 7
  6655. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  6656. #define IDCLOSE 8 /* ;Internal 4.0 */
  6657. #define IDHELP 9 /* ;Internal 4.0 */
  6658. #define IDUSERICON 10 /* ;Internal 4.0 */
  6659. #endif /* ;Internal 4.0 */
  6660. //***** Control Notification support ********************* ;Internal 4.0
  6661. // should this be marked internal? // ;Internal 4.0
  6662. typedef struct tagNMHDR
  6663. {
  6664. #ifdef tagWND
  6665. HWND_16 hwndFrom;
  6666. #else
  6667. HWND hwndFrom;
  6668. #endif
  6669. WORD _wDummy1;
  6670. UINT idFrom;
  6671. WORD _wDummy2;
  6672. UINT code;
  6673. WORD _wDummy3;
  6674. } NMHDR;
  6675. typedef NMHDR FAR * LPNMHDR;
  6676. typedef struct tagSTYLESTRUCT // ;Internal 4.0
  6677. { // ;Internal 4.0
  6678. /* Win4.0 fields */ // ;Internal 4.0
  6679. DWORD styleOld; // ;Internal 4.0
  6680. DWORD styleNew; // ;Internal 4.0
  6681. } STYLESTRUCT; // ;Internal 4.0
  6682. typedef STYLESTRUCT FAR * LPSTYLESTRUCT; // ;Internal 4.0
  6683. // ;Internal 4.0
  6684. /****** Owner draw control support ******************************************/
  6685. /* Owner draw control types */
  6686. #define ODT_MENU 1
  6687. #define ODT_LISTBOX 2
  6688. #define ODT_COMBOBOX 3
  6689. #define ODT_BUTTON 4
  6690. #define ODT_STATIC 5 /* ;Internal 4.0 */
  6691. /* Owner draw actions */
  6692. #define ODA_DRAWENTIRE 0x0001
  6693. #define ODA_SELECT 0x0002
  6694. #define ODA_FOCUS 0x0004
  6695. /* Owner draw state */
  6696. #define ODS_SELECTED 0x0001
  6697. #define ODS_GRAYED 0x0002
  6698. #define ODS_DISABLED 0x0004
  6699. #define ODS_CHECKED 0x0008
  6700. #define ODS_FOCUS 0x0010
  6701. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  6702. #define ODS_DEFAULT 0x0020 /* ;Internal 4.0 */
  6703. #define ODS_COMBOBOXEDIT 0x1000 /* ;Internal 4.0 */
  6704. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  6705. #if (WINVER >= 0x040A) /* ;Internal 4.1 */
  6706. #define ODS_HOTLIGHT 0x0040 /* ;Internal 4.1 */
  6707. #define ODS_INACTIVE 0x0080 /* ;Internal 4.1 */
  6708. #endif /* WINVER >= 0x040A */ /* ;Internal 4.1 */
  6709. /* LPARAM of WM_DRAWITEM is LPDRAWITEMSTRUCT */
  6710. typedef struct tagDRAWITEMSTRUCT
  6711. {
  6712. UINT CtlType;
  6713. UINT CtlID;
  6714. UINT itemID;
  6715. UINT itemAction;
  6716. UINT itemState;
  6717. #ifdef tagWND /* ;Internal */
  6718. HWND_16 hwndItem; /* ;Internal */
  6719. #else /* ;Internal */
  6720. HWND hwndItem;
  6721. #endif /* ;Internal */
  6722. HDC hDC;
  6723. RECT rcItem;
  6724. DWORD itemData;
  6725. } DRAWITEMSTRUCT;
  6726. typedef DRAWITEMSTRUCT NEAR* PDRAWITEMSTRUCT;
  6727. typedef DRAWITEMSTRUCT FAR* LPDRAWITEMSTRUCT;
  6728. /* LPARAM of WM_MEASUREITEM is LPMEASUREITEMSTRUCT */
  6729. typedef struct tagMEASUREITEMSTRUCT
  6730. {
  6731. UINT CtlType;
  6732. UINT CtlID;
  6733. UINT itemID;
  6734. UINT itemWidth;
  6735. UINT itemHeight;
  6736. DWORD itemData;
  6737. } MEASUREITEMSTRUCT;
  6738. typedef MEASUREITEMSTRUCT NEAR* PMEASUREITEMSTRUCT;
  6739. typedef MEASUREITEMSTRUCT FAR* LPMEASUREITEMSTRUCT;
  6740. /* LPARAM of WM_DELETEITEM is LPDELETEITEMSTRUCT */
  6741. typedef struct tagDELETEITEMSTRUCT
  6742. {
  6743. UINT CtlType;
  6744. UINT CtlID;
  6745. UINT itemID;
  6746. #ifdef tagWND /* ;Internal */
  6747. HWND_16 hwndItem; /* ;Internal */
  6748. #else /* ;Internal */
  6749. HWND hwndItem;
  6750. #endif /* ;Internal */
  6751. DWORD itemData;
  6752. } DELETEITEMSTRUCT;
  6753. typedef DELETEITEMSTRUCT NEAR* PDELETEITEMSTRUCT;
  6754. typedef DELETEITEMSTRUCT FAR* LPDELETEITEMSTRUCT;
  6755. /* LPARAM of WM_COMPAREITEM is LPCOMPAREITEMSTRUCT */
  6756. typedef struct tagCOMPAREITEMSTRUCT
  6757. {
  6758. UINT CtlType;
  6759. UINT CtlID;
  6760. #ifdef tagWND /* ;Internal */
  6761. HWND_16 hwndItem; /* ;Internal */
  6762. #else /* ;Internal */
  6763. HWND hwndItem;
  6764. #endif /* ;Internal */
  6765. UINT itemID1;
  6766. DWORD itemData1;
  6767. UINT itemID2;
  6768. DWORD itemData2;
  6769. } COMPAREITEMSTRUCT;
  6770. typedef COMPAREITEMSTRUCT NEAR* PCOMPAREITEMSTRUCT;
  6771. typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT;
  6772. /****** Static control ******************************************************/
  6773. #ifndef NOCTLMGR
  6774. /* Static Control Styles */
  6775. #define SS_LEFT 0x00000000L
  6776. #define SS_CENTER 0x00000001L
  6777. #define SS_RIGHT 0x00000002L
  6778. #define SS_ICON 0x00000003L
  6779. #define SS_BLACKRECT 0x00000004L
  6780. #define SS_GRAYRECT 0x00000005L
  6781. #define SS_WHITERECT 0x00000006L
  6782. #define SS_BLACKFRAME 0x00000007L
  6783. #define SS_GRAYFRAME 0x00000008L
  6784. #define SS_WHITEFRAME 0x00000009L
  6785. #define SS_USERITEM 0x0000000AL // ;Internal
  6786. #define SS_SIMPLE 0x0000000BL
  6787. #define SS_LEFTNOWORDWRAP 0x0000000CL
  6788. #define SS_OWNERDRAW 0x0000000DL // ;Internal 4.0
  6789. #define SS_BITMAP 0x0000000EL // ;Internal 4.0
  6790. #define SS_ENHMETAFILE 0x0000000FL // ;Internal 4.0
  6791. #define SS_ETCHEDHORZ 0x00000010L // ;Internal 4.0
  6792. #define SS_ETCHEDVERT 0x00000011L // ;Internal 4.0
  6793. #define SS_ETCHEDFRAME 0x00000012L // ;Internal 4.0
  6794. #define SS_TYPEMASK 0x0000001FL // ;Internal 4.0
  6795. #define SS_NOPREFIX 0x00000080L
  6796. #define SS_NOTIFY 0x00000100L // ;Internal 4.0
  6797. #define SS_CENTERIMAGE 0x00000200L // ;Internal 4.0
  6798. #define SS_RIGHTJUST 0x00000400L // ;Internal 4.0
  6799. #define SS_REALSIZEIMAGE 0x00000800L // ;Internal 4.0
  6800. #define SS_SUNKEN 0x00001000L // ;Internal 4.0
  6801. #define SS_EDITCONTROL 0x00002000L // ;Internal
  6802. #if (WINVER >= 0x030a)
  6803. #ifndef NOWINMESSAGES
  6804. /* Static Control Mesages */
  6805. #define STM_FIRST_16 WM_USER // ;Internal
  6806. #define STM_SETICON (WM_USER+0)
  6807. #define STM_GETICON (WM_USER+1)
  6808. #if (WINVER >= 0x0400) // ;Internal 4.0
  6809. #define STM_SETIMAGE (WM_USER+2) // ;Internal 4.0
  6810. #define STM_GETIMAGE (WM_USER+3) // ;Internal 4.0
  6811. // ;Internal 4.0
  6812. #define STN_CLICKED 0 // ;Internal 4.0
  6813. #define STN_DBLCLK 1 // ;Internal 4.0
  6814. #define STN_ENABLE 2 // ;Internal 4.0
  6815. #define STN_DISABLE 3 // ;Internal 4.0
  6816. #endif /* WINVER >= 0x0400 */ // ;Internal 4.0
  6817. #define STM_MSGMAX (WM_USER+4) // ;Internal 4.0
  6818. #endif /* NOWINMESSAGES */
  6819. #endif /* WINVER >= 0x030a */
  6820. #endif /* NOCTLMGR */
  6821. /****** Button control *****************************************************/
  6822. #ifndef NOCTLMGR
  6823. /* Button Control Styles */
  6824. #define BS_PUSHBUTTON 0x00000000L
  6825. #define BS_DEFPUSHBUTTON 0x00000001L
  6826. #define BS_CHECKBOX 0x00000002L
  6827. #define BS_AUTOCHECKBOX 0x00000003L
  6828. #define BS_RADIOBUTTON 0x00000004L
  6829. #define BS_3STATE 0x00000005L
  6830. #define BS_AUTO3STATE 0x00000006L
  6831. #define BS_GROUPBOX 0x00000007L
  6832. #define BS_USERBUTTON 0x00000008L
  6833. #define BS_AUTORADIOBUTTON 0x00000009L
  6834. #define BS_PUSHBOX 0x0000000AL // ;Internal
  6835. #define BS_OWNERDRAW 0x0000000BL
  6836. #define BS_TYPEMASK 0x0000000FL // ;Internal
  6837. #define BS_TEXT 0x00000000L // ;Internal 4.0
  6838. #define BS_RIGHTBUTTON 0x00000020L
  6839. #define BS_ICON 0x00000040L // ;Internal 4.0
  6840. #define BS_BITMAP 0x00000080L // ;Internal 4.0
  6841. #define BS_IMAGEMASK 0x000000C0L // ;Internal 4.0
  6842. // ;Internal 4.0
  6843. #define BS_LEFT 0x00000100L // ;Internal 4.0
  6844. #define BS_RIGHT 0x00000200L // ;Internal 4.0
  6845. #define BS_CENTER 0x00000300L // ;Internal 4.0
  6846. #define BS_HORZMASK 0x00000300L // ;Internal 4.0
  6847. #define BS_TOP 0x00000400L // ;Internal 4.0
  6848. #define BS_BOTTOM 0x00000800L // ;Internal 4.0
  6849. #define BS_VCENTER 0x00000C00L // ;Internal 4.0
  6850. #define BS_VERTMASK 0x00000C00L // ;Internal 4.0
  6851. #define BS_ALIGNMASK 0x00000F00L // ;Internal 4.0
  6852. // ;Internal 4.0
  6853. #define BS_PUSHLIKE 0x00001000L // ;Internal 4.0
  6854. #define BS_MULTILINE 0x00002000L // ;Internal 4.0
  6855. #define BS_NOTIFY 0x00004000L // ;Internal 4.0
  6856. #define BS_FLAT 0x00008000L // ;Internal 4.0
  6857. #define BS_LEFTTEXT BS_RIGHTBUTTON
  6858. #ifndef NOWINMESSAGES
  6859. /* Button Control Messages */
  6860. #define BM_FIRST_16 WM_USER // ;Internal
  6861. #define BM_GETCHECK (WM_USER+0)
  6862. #define BM_SETCHECK (WM_USER+1)
  6863. #define BM_GETSTATE (WM_USER+2)
  6864. #define BM_SETSTATE (WM_USER+3)
  6865. #define BM_SETSTYLE (WM_USER+4)
  6866. #define BM_CLICK (WM_USER+5)
  6867. #define BM_GETIMAGE (WM_USER+6) // ;Internal 4.0
  6868. #define BM_SETIMAGE (WM_USER+7) // ;Internal 4.0
  6869. #define BM_MSGMAX (WM_USER+8) // ;Internal 4.0
  6870. #define BST_UNCHECKED 0x0000
  6871. #define BST_CHECKED 0x0001
  6872. #define BST_INDETERMINATE 0x0002
  6873. #define BST_CHECKMASK 0x0003 // ;Internal
  6874. #define BST_PUSHED 0x0004
  6875. #define BST_FOCUS 0x0008
  6876. #define BST_INCLICK 0x0010 // ;Internal -- inside click code
  6877. #define BST_CAPTURED 0x0020 // ;Internal -- we have mouse capture
  6878. #define BST_MOUSE 0x0040 // ;Internal -- mouse initiated
  6879. #define BST_DONTCLICK 0x0080 // ;Internal -- Don't check on get focus.
  6880. #define BST_INBMCLICK 0x0100 // ;Internal -- processing BM_CLICK message
  6881. /* User Button Notification Codes */
  6882. #define BN_CLICKED 0
  6883. #define BN_PAINT 1
  6884. #define BN_PUSHED 2
  6885. #define BN_HILITE BN_PUSHED
  6886. #define BN_UNPUSHED 3
  6887. #define BN_UNHILITE BN_UNPUSHED
  6888. #define BN_DISABLE 4
  6889. #define BN_DBLCLK 5
  6890. #define BN_DOUBLECLICKED BN_DBLCLK
  6891. #define BN_SETFOCUS 6 /* ;Internal 4.0 */
  6892. #define BN_KILLFOCUS 7 /* ;Internal 4.0 */
  6893. #endif /* NOWINMESSAGES */
  6894. #endif /* NOCTLMGR */
  6895. /****** Edit control *******************************************************/
  6896. #ifndef NOCTLMGR
  6897. /* Edit control styles */
  6898. #ifndef NOWINSTYLES
  6899. #define ES_LEFT 0x0000L
  6900. #define ES_CENTER 0x0001L
  6901. #define ES_RIGHT 0x0002L
  6902. #define ES_MULTILINE 0x0004L
  6903. #define ES_UPPERCASE 0x0008L
  6904. #define ES_LOWERCASE 0x0010L
  6905. #define ES_PASSWORD 0x0020L
  6906. #define ES_AUTOVSCROLL 0x0040L
  6907. #define ES_AUTOHSCROLL 0x0080L
  6908. #define ES_NOHIDESEL 0x0100L
  6909. #define ES_COMBOBOX 0x0200L /* ;Internal */
  6910. #define ES_OEMCONVERT 0x0400L
  6911. #if (WINVER >= 0x030a)
  6912. #define ES_READONLY 0x0800L
  6913. #define ES_WANTRETURN 0x1000L
  6914. #endif /* WINVER >= 0x030a */
  6915. #if (WINVER >= 0x0400)
  6916. #define ES_NUMBER 0x2000L
  6917. #endif /* WINVER >= 0x0400 */
  6918. #endif /* NOWINSTYLES */
  6919. /* Edit control messages */
  6920. #ifndef NOWINMESSAGES
  6921. #define EM_FIRST_16 WM_USER // ;Internal
  6922. #define EM_GETSEL (WM_USER+0)
  6923. #define EM_SETSEL (WM_USER+1)
  6924. #define EM_GETRECT (WM_USER+2)
  6925. #define EM_SETRECT (WM_USER+3)
  6926. #define EM_SETRECTNP (WM_USER+4)
  6927. #define EM_SCROLL (WM_USER+5) // ;Internal
  6928. #define EM_LINESCROLL (WM_USER+6)
  6929. #define EM_SCROLLCARET (WM_USER+7)
  6930. #define EM_GETMODIFY (WM_USER+8)
  6931. #define EM_SETMODIFY (WM_USER+9)
  6932. #define EM_GETLINECOUNT (WM_USER+10)
  6933. #define EM_LINEINDEX (WM_USER+11)
  6934. #define EM_SETHANDLE (WM_USER+12)
  6935. #define EM_GETHANDLE (WM_USER+13)
  6936. #define EM_GETTHUMB (WM_USER+14) // ;Internal
  6937. #define EM_LINELENGTH (WM_USER+17)
  6938. #define EM_REPLACESEL (WM_USER+18)
  6939. #define EM_SETFONT (WM_USER+19) /* NOT IMPLEMENTED: use WM_SETFONT */
  6940. #define EM_GETLINE (WM_USER+20)
  6941. #define EM_SETLIMITTEXT (WM_USER+21)
  6942. #define EM_CANUNDO (WM_USER+22)
  6943. #define EM_UNDO (WM_USER+23)
  6944. #define EM_FMTLINES (WM_USER+24)
  6945. #define EM_LINEFROMCHAR (WM_USER+25)
  6946. #define EM_SETWORDBREAK (WM_USER+26) /* NOT IMPLEMENTED: use EM_SETWORDBREAK */
  6947. #define EM_SETTABSTOPS (WM_USER+27)
  6948. #define EM_SETPASSWORDCHAR (WM_USER+28)
  6949. #define EM_EMPTYUNDOBUFFER (WM_USER+29)
  6950. #if (WINVER >= 0x030a)
  6951. #define EM_GETFIRSTVISIBLELINE (WM_USER+30)
  6952. #define EM_SETREADONLY (WM_USER+31)
  6953. #define EM_SETWORDBREAKPROC (WM_USER+32)
  6954. #define EM_GETWORDBREAKPROC (WM_USER+33)
  6955. #define EM_GETPASSWORDCHAR (WM_USER+34)
  6956. #endif /* WINVER >= 0x030a */
  6957. /* ;Internal 4.0 */
  6958. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  6959. #define EM_SETMARGINS (WM_USER+35) /* ;Internal 4.0 */
  6960. #define EM_GETMARGINS (WM_USER+36) /* ;Internal 4.0 */
  6961. #define EM_GETLIMITTEXT (WM_USER+37) /* ;Internal 4.0 */
  6962. #define EM_POSFROMCHAR (WM_USER+38) /* ;Internal 4.0 */
  6963. #define EM_CHARFROMPOS (WM_USER+39) /* ;Internal 4.0 */
  6964. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  6965. #if (WINVER >= 0x0400) /* ;Internal 4.1 */
  6966. #define EM_SETIMESTATUS (WM_USER+40) /* ;Internal 4.1 */
  6967. #define EM_GETIMESTATUS (WM_USER+41) /* ;Internal 4.1 */
  6968. #endif /* WINVER >= 0x040A */ /* ;Internal 4.1 */
  6969. #define EM_LIMITTEXT EM_SETLIMITTEXT
  6970. #define EM_MSGMAX (WM_USER+42) // ;Internal 4.0
  6971. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  6972. #define EM_RESERVED1 (WM_USER+0x40) // ;Internal
  6973. #define EM_RESERVED2 (WM_USER+0x41) // ;Internal
  6974. #define EM_RESERVED3 (WM_USER+0x42) // ;Internal
  6975. #define EM_RESERVED4 (WM_USER+0x43) // ;Internal
  6976. #define EM_RESERVED5 (WM_USER+0x44) // ;Internal
  6977. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  6978. #endif /* NOWINMESSAGES */
  6979. #if (WINVER >= 0x030a)
  6980. typedef int (CALLBACK* EDITWORDBREAKPROC)(LPSTR lpch, int ichCurrent, int cch, int code);
  6981. /* EDITWORDBREAKPROC code values */
  6982. #define WB_LEFT 0
  6983. #define WB_RIGHT 1
  6984. #define WB_ISDELIMITER 2
  6985. #endif /* WINVER >= 0x030a */
  6986. /* Edit control notification codes */
  6987. #define EN_SETFOCUS 0x0100
  6988. #define EN_KILLFOCUS 0x0200
  6989. #define EN_CHANGE 0x0300
  6990. #define EN_UPDATE 0x0400
  6991. #define EN_ERRSPACE 0x0500
  6992. #define EN_MAXTEXT 0x0501
  6993. #define EN_HSCROLL 0x0601
  6994. #define EN_VSCROLL 0x0602
  6995. #if (WINVER >= 0x0400)
  6996. #define EN_ALIGN_LTR (0x700)
  6997. #define EN_ALIGN_RTL (0x701)
  6998. #endif
  6999. /* ;Internal 4.0 */
  7000. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  7001. #define EC_LEFTMARGIN 0x0001 /* ;Internal 4.0 */
  7002. #define EC_RIGHTMARGIN 0x0002 /* ;Internal 4.0 */
  7003. #define EC_USEFONTINFO 0xffff /* ;Internal 4.0 */
  7004. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  7005. #if (WINVER >= 0x0400) /* ;Internal 4.1 */
  7006. /* wParam of EM_GET/SETIMESTATUS */ /* ;Internal 4.1 */
  7007. #define EMSIS_COMPOSITIONSTRING 0x0001 /* ;Internal 4.1 */
  7008. #define EMSIS_GETLBBIT 0x8001 /* ;Internal 4.1 */
  7009. /* ;Internal 4.1 */
  7010. /* lParam for EMSIS_COMPOSITIONSTRING */ /* ;Internal 4.1 */
  7011. #define EIMES_GETCOMPSTRATONCE 0x0001 /* ;Internal 4.1 */
  7012. #define EIMES_CANCELCOMPSTRINFOCUS 0x0002 /* ;Internal 4.1 */
  7013. #define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004 /* ;Internal 4.1 */
  7014. #endif /* WINVER >= 0x040A */ /* ;Internal 4.1 */
  7015. #endif /* NOCTLMGR */
  7016. /****** Scroll bar control *************************************************/
  7017. /* Also see scrolling support */
  7018. #ifndef NOCTLMGR
  7019. #ifndef NOWINSTYLES
  7020. /* Scroll bar styles */
  7021. #define SBS_HORZ 0x0000L /* Type of scrollbar */
  7022. #define SBS_VERT 0x0001L /* Type of scrollbar */
  7023. #define SBS_TOPALIGN 0x0002L
  7024. #define SBS_LEFTALIGN 0x0002L
  7025. #define SBS_BOTTOMALIGN 0x0004L
  7026. #define SBS_RIGHTALIGN 0x0004L
  7027. #define SBS_SIZEBOXTOPLEFTALIGN 0x0002L
  7028. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  7029. #define SBS_SIZEBOX 0x0008L /* Type of scrollbar */
  7030. #define SBS_SIZEGRIP 0x0010L /* Type of scrollbar */
  7031. #endif /* NOWINSTYLES */
  7032. #endif /* NOCTLMGR */
  7033. /****** Listbox control ****************************************************/
  7034. #ifndef NOCTLMGR
  7035. /* Listbox styles */
  7036. #ifndef NOWINSTYLES
  7037. #define LBS_NOTIFY 0x0001L
  7038. #define LBS_SORT 0x0002L
  7039. #define LBS_NOREDRAW 0x0004L
  7040. #define LBS_MULTIPLESEL 0x0008L
  7041. #define LBS_OWNERDRAWFIXED 0x0010L
  7042. #define LBS_OWNERDRAWVARIABLE 0x0020L
  7043. #define LBS_HASSTRINGS 0x0040L
  7044. #define LBS_USETABSTOPS 0x0080L
  7045. #define LBS_NOINTEGRALHEIGHT 0x0100L
  7046. #define LBS_MULTICOLUMN 0x0200L
  7047. #define LBS_WANTKEYBOARDINPUT 0x0400L
  7048. #define LBS_EXTENDEDSEL 0x0800L
  7049. #if (WINVER >= 0x030a)
  7050. #define LBS_DISABLENOSCROLL 0x1000L
  7051. #define LBS_NODATA 0x2000L
  7052. #if (WINVER >= 0x0400)
  7053. #define LBS_NOSEL 0x4000L
  7054. #endif /* WINVER >= 0x0400 */
  7055. #endif /* WINVER >= 0x030a */
  7056. #define LBS_COMBOBOX 0x8000L // ;Internal
  7057. #define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  7058. #endif /* NOWINSTYLES */
  7059. /* Listbox messages */
  7060. #ifndef NOWINMESSAGES
  7061. #define LB_FIRST_16 (WM_USER+1) // ;Internal
  7062. #define LB_ADDSTRING (WM_USER+1)
  7063. #define LB_INSERTSTRING (WM_USER+2)
  7064. #define LB_DELETESTRING (WM_USER+3)
  7065. #define LB_SELITEMRANGEEX (WM_USER+4) // ;Internal 4.0 NT
  7066. #define LB_RESETCONTENT (WM_USER+5)
  7067. #define LB_SETSEL (WM_USER+6)
  7068. #define LB_SETCURSEL (WM_USER+7)
  7069. #define LB_GETSEL (WM_USER+8)
  7070. #define LB_GETCURSEL (WM_USER+9)
  7071. #define LB_GETTEXT (WM_USER+10)
  7072. #define LB_GETTEXTLEN (WM_USER+11)
  7073. #define LB_GETCOUNT (WM_USER+12)
  7074. #define LB_SELECTSTRING (WM_USER+13)
  7075. #define LB_DIR (WM_USER+14)
  7076. #define LB_GETTOPINDEX (WM_USER+15)
  7077. #define LB_FINDSTRING (WM_USER+16)
  7078. #define LB_GETSELCOUNT (WM_USER+17)
  7079. #define LB_GETSELITEMS (WM_USER+18)
  7080. #define LB_SETTABSTOPS (WM_USER+19)
  7081. #define LB_GETHORIZONTALEXTENT (WM_USER+20)
  7082. #define LB_SETHORIZONTALEXTENT (WM_USER+21)
  7083. #define LB_SETCOLUMNWIDTH (WM_USER+22)
  7084. #define LB_ADDFILE (WM_USER+23) // ;Internal
  7085. #define LB_SETTOPINDEX (WM_USER+24)
  7086. #define LB_GETITEMRECT (WM_USER+25)
  7087. #define LB_GETITEMDATA (WM_USER+26)
  7088. #define LB_SETITEMDATA (WM_USER+27)
  7089. #define LB_SELITEMRANGE (WM_USER+28)
  7090. #define LB_SETANCHORINDEX (WM_USER+29)
  7091. #define LB_GETANCHORINDEX (WM_USER+30)
  7092. #define LB_SETCARETINDEX (WM_USER+31)
  7093. #define LB_GETCARETINDEX (WM_USER+32)
  7094. #if (WINVER >= 0x030a)
  7095. #define LB_SETITEMHEIGHT (WM_USER+33)
  7096. #define LB_GETITEMHEIGHT (WM_USER+34)
  7097. #define LB_FINDSTRINGEXACT (WM_USER+35)
  7098. #define LBCB_CARETON (WM_USER+36) // ;Internal
  7099. #define LBCB_CARETOFF (WM_USER+37) // ;Internal
  7100. // ;Internal NT
  7101. #define LB_SETLOCALE (WM_USER+38) // ;Internal NT
  7102. #define LB_GETLOCALE (WM_USER+39) // ;Internal NT
  7103. #define LB_SETCOUNT (WM_USER+40) // ;Internal NT
  7104. // ;Internal
  7105. #if (WINVER >= 0x0400) // ;Internal 4.0
  7106. #define LB_FIRST_40 (WM_USER+41) // ;Internal 4.0
  7107. #define LB_INITSTORAGE (WM_USER+41) // ;Internal 4.0
  7108. #define LB_ITEMFROMPOINT (WM_USER+42) // ;Internal 4.0
  7109. #define LB_INSERTSTRINGUPPER (WM_USER+43) // ;Internal 4.0
  7110. #define LB_INSERTSTRINGLOWER (WM_USER+44) // ;Internal 4.0
  7111. #define LB_ADDSTRINGUPPER (WM_USER+45) // ;Internal 4.0
  7112. #define LB_ADDSTRINGLOWER (WM_USER+46) // ;Internal 4.0
  7113. #endif /* WINVER >= 0x0400 */ // ;Internal 4.0
  7114. #endif /* WINVER >= 0x030a */
  7115. // ;Internal
  7116. #define LB_MSGMAX (WM_USER+47) // ;Internal
  7117. #endif /* NOWINMESSAGES */
  7118. /* Listbox notification codes */
  7119. #define LBN_ERRSPACE (-2)
  7120. #define LBN_SELCHANGE 1
  7121. #define LBN_DBLCLK 2
  7122. #define LBN_SELCANCEL 3
  7123. #define LBN_SETFOCUS 4
  7124. #define LBN_KILLFOCUS 5
  7125. /* Listbox message return values */
  7126. #define LB_OKAY 0
  7127. #define LB_ERR (-1)
  7128. #define LB_ERRSPACE (-2)
  7129. #define LB_CTLCODE 0L
  7130. /****** Dialog directory support ********************************************/
  7131. int WINAPI DlgDirList(HWND, LPSTR, int, int, UINT);
  7132. BOOL WINAPI DlgDirSelect(HWND, LPSTR, int);
  7133. int WINAPI DlgDirListComboBox(HWND, LPSTR, int, int, UINT);
  7134. BOOL WINAPI DlgDirSelectComboBox(HWND, LPSTR, int);
  7135. #if (WINVER >= 0x030a)
  7136. BOOL WINAPI DlgDirSelectEx(HWND, LPSTR, int, int);
  7137. BOOL WINAPI DlgDirSelectComboBoxEx(HWND, LPSTR, int, int);
  7138. #endif /* WINVER >= 0x030a */
  7139. /* DlgDirList, DlgDirListComboBox flags values */
  7140. #define DDL_READWRITE 0x0000
  7141. #define DDL_READONLY 0x0001
  7142. #define DDL_HIDDEN 0x0002
  7143. #define DDL_SYSTEM 0x0004
  7144. #define DDL_DIRECTORY 0x0010
  7145. #define DDL_ARCHIVE 0x0020
  7146. #define DDL_NOFILES 0x1000 /* ;Internal */
  7147. #define DDL_POSTMSGS 0x2000
  7148. #define DDL_DRIVES 0x4000
  7149. #define DDL_EXCLUSIVE 0x8000
  7150. #define DDL_VALID 0xf03f /* ;Internal */
  7151. #endif /* NOCTLMGR */
  7152. /****** Combo box control **************************************************/
  7153. #ifndef NOCTLMGR
  7154. /* Combo box styles */
  7155. #ifndef NOWINSTYLES
  7156. #define CBS_SIMPLE 0x0001L
  7157. #define CBS_DROPDOWN 0x0002L
  7158. #define CBS_DROPDOWNLIST 0x0003L
  7159. #define CBS_OWNERDRAWFIXED 0x0010L
  7160. #define CBS_OWNERDRAWVARIABLE 0x0020L
  7161. #define CBS_AUTOHSCROLL 0x0040L
  7162. #define CBS_OEMCONVERT 0x0080L
  7163. #define CBS_SORT 0x0100L
  7164. #define CBS_HASSTRINGS 0x0200L
  7165. #define CBS_NOINTEGRALHEIGHT 0x0400L
  7166. #if (WINVER >= 0x030a)
  7167. #define CBS_DISABLENOSCROLL 0x0800L
  7168. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  7169. #define CBS_UPPERCASE 0x2000L /* ;Internal 4.0 */
  7170. #define CBS_LOWERCASE 0x4000L /* ;Internal 4.0 */
  7171. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  7172. #endif /* WINVER >= 0x030a */
  7173. #endif /* NOWINSTYLES */
  7174. /* Combo box messages */
  7175. #ifndef NOWINMESSAGES
  7176. #define CB_FIRST_16 (WM_USER+0) // ;Internal
  7177. #define CB_GETEDITSEL (WM_USER+0)
  7178. #define CB_LIMITTEXT (WM_USER+1)
  7179. #define CB_SETEDITSEL (WM_USER+2)
  7180. #define CB_ADDSTRING (WM_USER+3)
  7181. #define CB_DELETESTRING (WM_USER+4)
  7182. #define CB_DIR (WM_USER+5)
  7183. #define CB_GETCOUNT (WM_USER+6)
  7184. #define CB_GETCURSEL (WM_USER+7)
  7185. #define CB_GETLBTEXT (WM_USER+8)
  7186. #define CB_GETLBTEXTLEN (WM_USER+9)
  7187. #define CB_INSERTSTRING (WM_USER+10)
  7188. #define CB_RESETCONTENT (WM_USER+11)
  7189. #define CB_FINDSTRING (WM_USER+12)
  7190. #define CB_SELECTSTRING (WM_USER+13)
  7191. #define CB_SETCURSEL (WM_USER+14)
  7192. #define CB_SHOWDROPDOWN (WM_USER+15)
  7193. #define CB_GETITEMDATA (WM_USER+16)
  7194. #define CB_SETITEMDATA (WM_USER+17)
  7195. #if (WINVER >= 0x030a)
  7196. #define CB_GETDROPPEDCONTROLRECT (WM_USER+18)
  7197. #define CB_SETITEMHEIGHT (WM_USER+19)
  7198. #define CB_GETITEMHEIGHT (WM_USER+20)
  7199. #define CB_SETEXTENDEDUI (WM_USER+21)
  7200. #define CB_GETEXTENDEDUI (WM_USER+22)
  7201. #define CB_GETDROPPEDSTATE (WM_USER+23)
  7202. #define CB_FINDSTRINGEXACT (WM_USER+24)
  7203. /* ;Internal NT */
  7204. #define CB_SETLOCALE (WM_USER+25) /* ;Internal NT */
  7205. #define CB_GETLOCALE (WM_USER+26) /* ;Internal NT */
  7206. #if (WINVER >= 0x0400) /* ;Internal 4.0 */
  7207. #define CB_FIRST_40 (WM_USER+27) // ;Internal 4.0
  7208. #define CB_GETTOPINDEX (WM_USER+27) /* ;Internal 4.0 */
  7209. #define CB_SETTOPINDEX (WM_USER+28) /* ;Internal 4.0 */
  7210. #define CB_GETHORIZONTALEXTENT (WM_USER+29) /* ;Internal 4.0 */
  7211. #define CB_SETHORIZONTALEXTENT (WM_USER+30) /* ;Internal 4.0 */
  7212. #define CB_GETDROPPEDWIDTH (WM_USER+31) /* ;Internal 4.0 */
  7213. #define CB_SETDROPPEDWIDTH (WM_USER+32) /* ;Internal 4.0 */
  7214. #define CB_INITSTORAGE (WM_USER+33) /* ;Internal 4.0 */
  7215. #endif /* WINVER >= 0x0400 */ /* ;Internal 4.0 */
  7216. #endif /* WINVER >= 0x030a */
  7217. #define CB_MSGMAX (WM_USER+34) // ;Internal 4.0
  7218. #endif /* NOWINMESSAGES */
  7219. /* Combo box notification codes */
  7220. #define CBN_ERRSPACE (-1)
  7221. #define CBN_SELCHANGE 1
  7222. #define CBN_DBLCLK 2
  7223. #define CBN_SETFOCUS 3
  7224. #define CBN_KILLFOCUS 4
  7225. #define CBN_EDITCHANGE 5
  7226. #define CBN_EDITUPDATE 6
  7227. #define CBN_DROPDOWN 7
  7228. #if (WINVER >= 0x030a)
  7229. #define CBN_CLOSEUP 8
  7230. #define CBN_SELENDOK 9
  7231. #define CBN_SELENDCANCEL 10
  7232. #endif /* WINVER >= 0x030a */
  7233. /* Combo box message return values */
  7234. #define CB_OKAY 0
  7235. #define CB_ERR (-1)
  7236. #define CB_ERRSPACE (-2)
  7237. #endif /* NOCTLMGR */
  7238. /******* Windows hook support **********************************************/
  7239. #ifndef NOWH
  7240. DECLARE_HANDLE32(HHOOK);
  7241. #ifdef STRICT
  7242. typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  7243. #else
  7244. typedef FARPROC HOOKPROC;
  7245. #endif
  7246. #ifdef STRICT
  7247. HHOOK WINAPI SetWindowsHook(int, HOOKPROC);
  7248. LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HHOOK FAR*);
  7249. #else
  7250. HOOKPROC WINAPI SetWindowsHook(int, HOOKPROC);
  7251. LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HOOKPROC FAR*);
  7252. #endif
  7253. BOOL WINAPI UnhookWindowsHook(int, HOOKPROC);
  7254. #if (WINVER >= 0x030a)
  7255. HHOOK WINAPI SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hInstance, HTASK hTask);
  7256. BOOL WINAPI UnhookWindowsHookEx(HHOOK hHook);
  7257. LRESULT WINAPI CallNextHookEx(HHOOK hHook, int code, WPARAM wParam, LPARAM lParam);
  7258. #endif /* WINVER >= 0x030a */
  7259. // ;Internal
  7260. #define WH_MIN (-1) // ;Internal
  7261. #define WH_MAX 12 // ;Internal
  7262. #define WH_MINHOOK WH_MIN // ;Internal
  7263. #define WH_MAXHOOK WH_MAX // ;Internal
  7264. #define WH_CHOOKS (WH_MAXHOOK - WH_MINHOOK+1) // ;Internal
  7265. /* Standard hook code */
  7266. #define HC_ACTION 0
  7267. /* Obsolete hook codes (NO LONGER SUPPORTED) */
  7268. #define HC_GETLPLPFN (-3)
  7269. #define HC_LPLPFNNEXT (-2)
  7270. #define HC_LPFNNEXT (-1)
  7271. #endif /* NOWH */
  7272. /****** Computer-based-training (CBT) support *******************************/
  7273. #ifndef NOWH
  7274. /* SetWindowsHook() code */
  7275. #define WH_CBT 5
  7276. #define HCBT_MOVESIZE 0
  7277. #define HCBT_MINMAX 1
  7278. #define HCBT_QS 2
  7279. #define HCBT_CREATEWND 3
  7280. #define HCBT_DESTROYWND 4
  7281. #define HCBT_ACTIVATE 5
  7282. #define HCBT_CLICKSKIPPED 6
  7283. #define HCBT_KEYSKIPPED 7
  7284. #define HCBT_SYSCOMMAND 8
  7285. #define HCBT_SETFOCUS 9
  7286. #define HCBT_SETWINDOWTEXT 10
  7287. #if (WINVER >= 0x030a)
  7288. /* HCBT_CREATEWND parameters pointed to by lParam */
  7289. typedef struct tagCBT_CREATEWND
  7290. {
  7291. LPCREATESTRUCT lpcs;
  7292. #ifdef tagWND /* ;Internal */
  7293. HWND_16 hwndInsertAfter; /* ;Internal */
  7294. #else /* ;Internal */
  7295. HWND hwndInsertAfter;
  7296. #endif /* ;Internal */
  7297. } CBT_CREATEWND;
  7298. typedef CBT_CREATEWND FAR* LPCBT_CREATEWND;
  7299. /* HCBT_ACTIVATE structure pointed to by lParam */
  7300. typedef struct tagCBTACTIVATESTRUCT
  7301. {
  7302. BOOL fMouse;
  7303. #ifdef tagWND /* ;Internal */
  7304. HWND_16 hWndActive; /* ;Internal */
  7305. #else /* ;Internal */
  7306. HWND hWndActive;
  7307. #endif /* ;Internal */
  7308. } CBTACTIVATESTRUCT;
  7309. #endif /* WINVER >= 0x030a */
  7310. #endif /* NOWH */
  7311. /****** Hardware hook support ***********************************************/
  7312. #ifndef NOWH
  7313. #if (WINVER >= 0x030a)
  7314. #define WH_HARDWARE 8
  7315. typedef struct tagHARDWAREHOOKSTRUCT
  7316. {
  7317. #ifdef tagWND /* ;Internal */
  7318. HWND_16 hWnd; /* ;Internal */
  7319. #else /* ;Internal */
  7320. HWND hWnd;
  7321. #endif /* ;Internal */
  7322. UINT wMessage;
  7323. WPARAM wParam;
  7324. LPARAM lParam;
  7325. } HARDWAREHOOKSTRUCT;
  7326. #endif /* WINVER >= 0x030a */
  7327. #endif /* NOWH */
  7328. /****** Shell support *******************************************************/
  7329. #ifndef NOWH
  7330. #if (WINVER >= 0x030a)
  7331. /* SetWindowsHook() Shell hook code */
  7332. #define WH_SHELL 10
  7333. #define HSHELL_WINDOWCREATED 1
  7334. #define HSHELL_WINDOWDESTROYED 2
  7335. #define HSHELL_ACTIVATESHELLWINDOW 3
  7336. #if (WINVER >= 0x0400)
  7337. #define HSHELL_WINDOWACTIVATED 4
  7338. #define HSHELL_GETMINRECT 5
  7339. #define HSHELL_REDRAW 6
  7340. #define HSHELL_TASKMAN 7
  7341. #define HSHELL_LANGUAGE 8
  7342. #endif /* WINVER >= 0x0400 */
  7343. #endif /* WINVER >= 0x030a */
  7344. #endif /* NOWH */
  7345. /****** Journalling support *************************************************/
  7346. #ifndef NOWH
  7347. #define WH_JOURNALRECORD 0
  7348. #define WH_JOURNALPLAYBACK 1
  7349. /* Journalling hook codes */
  7350. #define HC_GETNEXT 1
  7351. #define HC_SKIP 2
  7352. #define HC_NOREMOVE 3
  7353. #define HC_NOREM HC_NOREMOVE
  7354. #define HC_SYSMODALON 4
  7355. #define HC_SYSMODALOFF 5
  7356. /* Journalling message structure */
  7357. typedef struct tagEVENTMSG
  7358. {
  7359. UINT message;
  7360. UINT paramL;
  7361. UINT paramH;
  7362. DWORD time;
  7363. } EVENTMSG;
  7364. typedef EVENTMSG *PEVENTMSG;
  7365. typedef EVENTMSG *PEVENTMSGMSG; /* ;Internal */
  7366. typedef EVENTMSG NEAR* NPEVENTMSG;
  7367. typedef EVENTMSG FAR* LPEVENTMSG;
  7368. typedef EVENTMSG FAR* LPEVENTMSGMSG; /* ;Internal */
  7369. BOOL WINAPI EnableHardwareInput(BOOL);
  7370. #endif /* NOWH */
  7371. /****** Debugger support ****************************************************/
  7372. #if (WINVER >= 0x030a)
  7373. /* SetWindowsHook debug hook support */
  7374. #define WH_DEBUG 9
  7375. typedef struct tagDEBUGHOOKINFO
  7376. {
  7377. HMODULE hModuleHook;
  7378. LPARAM reserved;
  7379. LPARAM lParam;
  7380. WPARAM wParam;
  7381. int code;
  7382. } DEBUGHOOKINFO;
  7383. typedef DEBUGHOOKINFO FAR* LPDEBUGHOOKINFO;
  7384. #ifndef NOMSG
  7385. BOOL WINAPI QuerySendMessage(HANDLE h1, HANDLE h2, HANDLE h3, LPMSG lpmsg);
  7386. #endif /* NOMSG */
  7387. BOOL WINAPI LockInput(HANDLE h1, HWND hwndInput, BOOL fLock);
  7388. LONG WINAPI GetSystemDebugState(void);
  7389. /* Flags returned by GetSystemDebugState.
  7390. */
  7391. #define SDS_MENU 0x0001
  7392. #define SDS_SYSMODAL 0x0002
  7393. #define SDS_NOTASKQUEUE 0x0004
  7394. #define SDS_DIALOG 0x0008
  7395. #define SDS_TASKLOCKED 0x0010
  7396. #endif /* WINVER >= 0x030a */
  7397. /****** Help support ********************************************************/
  7398. #ifndef NOHELP
  7399. BOOL WINAPI WinHelp(HWND hwndMain, LPCSTR lpszHelp, UINT usCommand, DWORD ulData);
  7400. /* WinHelp() commands */
  7401. #define HELP_CONTEXT 0x0001
  7402. #define HELP_QUIT 0x0002
  7403. #define HELP_INDEX 0x0003
  7404. #define HELP_CONTENTS 0x0003
  7405. #define HELP_HELPONHELP 0x0004
  7406. #define HELP_SETINDEX 0x0005
  7407. #define HELP_SETCONTENTS 0x0005
  7408. #define HELP_CONTEXTPOPUP 0x0008
  7409. #define HELP_FORCEFILE 0x0009
  7410. #define HELP_KEY 0x0101
  7411. #define HELP_COMMAND 0x0102
  7412. #define HELP_PARTIALKEY 0x0105
  7413. #define HELP_MULTIKEY 0x0201
  7414. #define HELP_SETWINPOS 0x0203
  7415. #if (WINVER >= 0x0400)
  7416. #define HELP_CONTEXTMENU 0x000a
  7417. #define HELP_FINDER 0x000b
  7418. #define HELP_WM_HELP 0x000c
  7419. #define HELP_SETPOPUP_POS 0x000d
  7420. #define HELP_TCARD 0x8000
  7421. #define HELP_TCARD_DATA 0x0010
  7422. #define HELP_TCARD_NEXT 0x0011
  7423. #define HELP_TCARD_OTHER_CALLER 0x0011
  7424. #endif /* WINVER >= 0x0400 */
  7425. typedef struct tagMULTIKEYHELP
  7426. {
  7427. UINT mkSize;
  7428. BYTE mkKeylist;
  7429. BYTE szKeyphrase[1];
  7430. } MULTIKEYHELP;
  7431. typedef struct
  7432. {
  7433. int wStructSize;
  7434. int x;
  7435. int y;
  7436. int dx;
  7437. int dy;
  7438. int wMax;
  7439. char rgchMember[2];
  7440. } HELPWININFO;
  7441. typedef HELPWININFO NEAR* PHELPWININFO;
  7442. typedef HELPWININFO FAR* LPHELPWININFO;
  7443. #endif /* NOHELP */
  7444. #if (WINVER >= 0x0400)
  7445. #define HELPINFO_WINDOW 0x0001
  7446. #define HELPINFO_MENUITEM 0x0002
  7447. typedef struct tagHELPINFO
  7448. {
  7449. DWORD cbSize;
  7450. int iContextType;
  7451. int iCtrlId;
  7452. HANDLE hItemHandle;
  7453. DWORD dwContextId;
  7454. POINT MousePos;
  7455. }
  7456. HELPINFO, FAR* LPHELPINFO;
  7457. /* ;Internal 4.0 */
  7458. BOOL WINAPI SetWindowContextHelpId(HWND, DWORD); /* ;Internal 4.0 */
  7459. DWORD WINAPI GetWindowContextHelpId(HWND); /* ;Internal 4.0 */
  7460. BOOL WINAPI SetMenuContextHelpId(HMENU, DWORD); /* ;Internal 4.0 */
  7461. DWORD WINAPI GetMenuContextHelpId(HMENU); /* ;Internal 4.0 */
  7462. #endif /* WINVER >= 0x0400 */
  7463. /****** Message Box support *************************************************/
  7464. #ifndef NOMB
  7465. int WINAPI MessageBox(HWND, LPCSTR, LPCSTR, UINT);
  7466. #ifdef tagWND // ;Internal
  7467. BOOL WINAPI MessageBeep(UINT); // ;Internal
  7468. #else // ;Internal
  7469. void WINAPI MessageBeep(UINT);
  7470. #endif // ;Internal
  7471. #define MB_OK 0x0000
  7472. #define MB_OKCANCEL 0x0001
  7473. #define MB_ABORTRETRYIGNORE 0x0002
  7474. #define MB_YESNOCANCEL 0x0003
  7475. #define MB_YESNO 0x0004
  7476. #define MB_RETRYCANCEL 0x0005
  7477. #define MB_TYPEMASK 0x000F
  7478. #define MB_ICONERROR 0x0010 /* ;win40: Name changed from MB_ICONHAND */
  7479. #define MB_ICONQUESTION 0x0020
  7480. #define MB_ICONWARNING 0x0030 /* ;win40: Name changed from MB_ICONEXCLAMATION */
  7481. #define MB_ICONINFORMATION 0x0040 /* ;win40: Name changed from MB_ICONASTERISK */
  7482. #if (WINVER >= 0x400) /* ;Internal 4.0 */
  7483. #define MB_USERICON 0x0080 /* ;Internal 4.0 */
  7484. #endif /* ;Internal 4.0 */
  7485. #define MB_ICONMASK 0x00F0
  7486. #define MB_ICONHAND MB_ICONERROR
  7487. #define MB_ICONSTOP MB_ICONERROR
  7488. #define MB_ICONEXCLAMATION MB_ICONWARNING
  7489. #define MB_ICONASTERISK MB_ICONINFORMATION
  7490. #define MB_DEFBUTTON1 0x0000
  7491. #define MB_DEFBUTTON2 0x0100
  7492. #define MB_DEFBUTTON3 0x0200
  7493. #if (WINVER >= 0x0400)
  7494. #define MB_DEFBUTTON4 0x0300
  7495. #endif
  7496. #define MB_DEFMASK 0x0F00
  7497. #define MB_APPLMODAL 0x0000
  7498. #define MB_SYSTEMMODAL 0x1000
  7499. #define MB_TASKMODAL 0x2000
  7500. // ;Internal 4.0
  7501. #if (WINVER >= 0x0400) // ;Internal 4.0
  7502. #define MB_HELP 0x4000 // ;Internal 4.0
  7503. #define MB_RIGHT 0x00080000
  7504. #define MB_RTLREADING 0x00100000
  7505. #endif // ;Internal 4.0
  7506. #define MB_NOFOCUS 0x8000
  7507. // ;Internal 4.0
  7508. #define MB_TYPEMASK 0x000F // ;Internal 4.0
  7509. #define MB_ICONMASK 0x00F0 // ;Internal 4.0
  7510. #define MB_DEFMASK 0x0F00 // ;Internal 4.0
  7511. #define MB_MODEMASK 0x3000 // ;Internal 4.0
  7512. #define MB_MISCMASK 0xC000 // ;Internal 4.0
  7513. #define MB_VALID 0xb377 // ;Internal 4.0
  7514. // ;Internal 4.0
  7515. #define MB_SETFOREGROUND 0x00010000 // ;Internal NT
  7516. // #define MB_DEFAULT_DESKTOP_ONLY 0x00020000 // ;Internal NT
  7517. #if (WINVER >= 0x0400) // ;Internal NT
  7518. int WINAPI MessageBoxEx(HWND, LPCSTR, LPCSTR, DWORD, WORD); // ;Internal NT
  7519. #endif // WINVER >= 0x0400 // ;Internal NT
  7520. // ;Internal 4.0
  7521. #if (WINVER >= 0x400) // ;Internal 4.0
  7522. #define MB_TOPMOST 0x00040000 // ;Internal 4.0
  7523. #define MBEX_VALIDL 0xf3f7 // ;Internal 4.0
  7524. #define MBEX_VALIDH 1 // ;Internal 4.0
  7525. // ;Internal 4.0
  7526. typedef void (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo); // ;Internal 4.0
  7527. // ;Internal 4.0
  7528. typedef struct tagMSGBOXPARAMS // ;Internal 4.0
  7529. { // ;Internal 4.0
  7530. DWORD cbSize; // ;Internal 4.0
  7531. #ifdef tagWND // ;Internal 4.0
  7532. HWND_16 hwndOwner; // ;Internal 4.0
  7533. #else // ;Internal 4.0
  7534. HWND hwndOwner; // ;Internal 4.0
  7535. #endif // ;Internal 4.0
  7536. HINSTANCE hInstance; // ;Internal 4.0
  7537. LPCSTR lpszText; // ;Internal 4.0
  7538. LPCSTR lpszCaption; // ;Internal 4.0
  7539. DWORD dwStyle; // ;Internal 4.0
  7540. LPCSTR lpszIcon; // ;Internal 4.0
  7541. DWORD dwContextHelpId; // ;Internal 4.0
  7542. MSGBOXCALLBACK lpfnMsgBoxCallback; // ;Internal 4.0
  7543. DWORD dwLanguageId; // ;Internal 4.0
  7544. } MSGBOXPARAMS, FAR *LPMSGBOXPARAMS; // ;Internal 4.0
  7545. // ;Internal 4.0
  7546. int WINAPI MessageBoxIndirect(LPMSGBOXPARAMS); // ;Internal 4.0
  7547. #endif /* WINVER >=0x0400 */ // ;Internal 4.0
  7548. #endif /* NOMB */
  7549. /****** Sound support ******************************************************/
  7550. #ifndef NOSOUND
  7551. int WINAPI OpenSound(void);
  7552. void WINAPI CloseSound(void);
  7553. int WINAPI StartSound(void);
  7554. int WINAPI StopSound(void);
  7555. int WINAPI SetVoiceQueueSize(int, int);
  7556. int WINAPI SetVoiceNote(int, int, int, int);
  7557. int WINAPI SetVoiceAccent(int, int, int, int, int);
  7558. int WINAPI SetVoiceEnvelope(int, int, int);
  7559. int WINAPI SetVoiceSound(int, DWORD, int);
  7560. int WINAPI SetVoiceThreshold(int, int);
  7561. LPINT WINAPI GetThresholdEvent(void);
  7562. int WINAPI GetThresholdStatus(void);
  7563. int WINAPI SetSoundNoise(int, int);
  7564. /* SetSoundNoise() Sources */
  7565. #define S_PERIOD512 0
  7566. #define S_PERIOD1024 1
  7567. #define S_PERIOD2048 2
  7568. #define S_PERIODVOICE 3
  7569. #define S_WHITE512 4
  7570. #define S_WHITE1024 5
  7571. #define S_WHITE2048 6
  7572. #define S_WHITEVOICE 7
  7573. int WINAPI WaitSoundState(int);
  7574. /* WaitSoundState() constants */
  7575. #define S_QUEUEEMPTY 0
  7576. #define S_THRESHOLD 1
  7577. #define S_ALLTHRESHOLD 2
  7578. int WINAPI SyncAllVoices(void);
  7579. int WINAPI CountVoiceNotes(int);
  7580. /* Accent Modes */
  7581. #define S_NORMAL 0
  7582. #define S_LEGATO 1
  7583. #define S_STACCATO 2
  7584. /* Error return values */
  7585. #define S_SERDVNA (-1)
  7586. #define S_SEROFM (-2)
  7587. #define S_SERMACT (-3)
  7588. #define S_SERQFUL (-4)
  7589. #define S_SERBDNT (-5)
  7590. #define S_SERDLN (-6)
  7591. #define S_SERDCC (-7)
  7592. #define S_SERDTP (-8)
  7593. #define S_SERDVL (-9)
  7594. #define S_SERDMD (-10)
  7595. #define S_SERDSH (-11)
  7596. #define S_SERDPT (-12)
  7597. #define S_SERDFQ (-13)
  7598. #define S_SERDDR (-14)
  7599. #define S_SERDSR (-15)
  7600. #define S_SERDST (-16)
  7601. #endif /* NOSOUND */
  7602. /****** Comm support ******************************************************/
  7603. #ifndef NOCOMM
  7604. #define NOPARITY 0
  7605. #define ODDPARITY 1
  7606. #define EVENPARITY 2
  7607. #define MARKPARITY 3
  7608. #define SPACEPARITY 4
  7609. #define ONESTOPBIT 0
  7610. #define ONE5STOPBITS 1
  7611. #define TWOSTOPBITS 2
  7612. #define IGNORE 0
  7613. #define INFINITE 0xFFFF
  7614. /* Error Flags */
  7615. #define CE_RXOVER 0x0001
  7616. #define CE_OVERRUN 0x0002
  7617. #define CE_RXPARITY 0x0004
  7618. #define CE_FRAME 0x0008
  7619. #define CE_BREAK 0x0010
  7620. #define CE_CTSTO 0x0020
  7621. #define CE_DSRTO 0x0040
  7622. #define CE_RLSDTO 0x0080
  7623. #define CE_TXFULL 0x0100
  7624. #define CE_PTO 0x0200
  7625. #define CE_IOE 0x0400
  7626. #define CE_DNS 0x0800
  7627. #define CE_OOP 0x1000
  7628. #define CE_MODE 0x8000
  7629. #define IE_BADID (-1)
  7630. #define IE_OPEN (-2)
  7631. #define IE_NOPEN (-3)
  7632. #define IE_MEMORY (-4)
  7633. #define IE_DEFAULT (-5)
  7634. #define IE_HARDWARE (-10)
  7635. #define IE_BYTESIZE (-11)
  7636. #define IE_BAUDRATE (-12)
  7637. /* Events */
  7638. #define EV_RXCHAR 0x0001
  7639. #define EV_RXFLAG 0x0002
  7640. #define EV_TXEMPTY 0x0004
  7641. #define EV_CTS 0x0008
  7642. #define EV_DSR 0x0010
  7643. #define EV_RLSD 0x0020
  7644. #define EV_BREAK 0x0040
  7645. #define EV_ERR 0x0080
  7646. #define EV_RING 0x0100
  7647. #define EV_PERR 0x0200
  7648. #define EV_CTSS 0x0400
  7649. #define EV_DSRS 0x0800
  7650. #define EV_RLSDS 0x1000
  7651. #define EV_RingTe 0x2000
  7652. #define EV_RINGTE EV_RingTe
  7653. #define EV_VALID 0x3fff /* ;Internal */
  7654. /* Escape Functions */
  7655. #define SETXOFF 1
  7656. #define SETXON 2
  7657. #define SETRTS 3
  7658. #define CLRRTS 4
  7659. #define SETDTR 5
  7660. #define CLRDTR 6
  7661. #define RESETDEV 7
  7662. #define LPTx 0x80
  7663. #if (WINVER >= 0x030a)
  7664. /* new escape functions */
  7665. #define GETMAXLPT 8
  7666. #define GETMAXCOM 9
  7667. #define GETBASEIRQ 10
  7668. /* Comm Baud Rate indices */
  7669. #define CBR_110 0xFF10
  7670. #define CBR_300 0xFF11
  7671. #define CBR_600 0xFF12
  7672. #define CBR_1200 0xFF13
  7673. #define CBR_2400 0xFF14
  7674. #define CBR_4800 0xFF15
  7675. #define CBR_9600 0xFF16
  7676. #define CBR_14400 0xFF17
  7677. #define CBR_19200 0xFF18
  7678. #define CBR_38400 0xFF1B
  7679. #define CBR_56000 0xFF1F
  7680. #define CBR_128000 0xFF23
  7681. #define CBR_256000 0xFF27
  7682. /* notifications passed in low word of lParam on WM_COMMNOTIFY messages */
  7683. #define CN_RECEIVE 0x0001
  7684. #define CN_TRANSMIT 0x0002
  7685. #define CN_EVENT 0x0004
  7686. #endif /* WINVER >= 0x030a */
  7687. typedef struct tagDCB
  7688. {
  7689. BYTE Id;
  7690. UINT BaudRate;
  7691. BYTE ByteSize;
  7692. BYTE Parity;
  7693. BYTE StopBits;
  7694. UINT RlsTimeout;
  7695. UINT CtsTimeout;
  7696. UINT DsrTimeout;
  7697. UINT fBinary :1;
  7698. UINT fRtsDisable :1;
  7699. UINT fParity :1;
  7700. UINT fOutxCtsFlow :1;
  7701. UINT fOutxDsrFlow :1;
  7702. UINT fDummy :2;
  7703. UINT fDtrDisable :1;
  7704. UINT fOutX :1;
  7705. UINT fInX :1;
  7706. UINT fPeChar :1;
  7707. UINT fNull :1;
  7708. UINT fChEvt :1;
  7709. UINT fDtrflow :1;
  7710. UINT fRtsflow :1;
  7711. UINT fDummy2 :1;
  7712. char XonChar;
  7713. char XoffChar;
  7714. UINT XonLim;
  7715. UINT XoffLim;
  7716. char PeChar;
  7717. char EofChar;
  7718. char EvtChar;
  7719. UINT TxDelay;
  7720. } DCB;
  7721. typedef DCB FAR* LPDCB;
  7722. #if (defined(STRICT) | (WINVER >= 0x030a))
  7723. typedef struct tagCOMSTAT
  7724. {
  7725. BYTE status;
  7726. UINT cbInQue;
  7727. UINT cbOutQue;
  7728. } COMSTAT;
  7729. #define CSTF_CTSHOLD 0x01
  7730. #define CSTF_DSRHOLD 0x02
  7731. #define CSTF_RLSDHOLD 0x04
  7732. #define CSTF_XOFFHOLD 0x08
  7733. #define CSTF_XOFFSENT 0x10
  7734. #define CSTF_EOF 0x20
  7735. #define CSTF_TXIM 0x40
  7736. #else /* (STRICT | WINVER >= 0x030a) */
  7737. /* NOTE: This structure declaration is not ANSI compatible! */
  7738. typedef struct tagCOMSTAT
  7739. {
  7740. BYTE fCtsHold :1;
  7741. BYTE fDsrHold :1;
  7742. BYTE fRlsdHold :1;
  7743. BYTE fXoffHold :1;
  7744. BYTE fXoffSent :1;
  7745. BYTE fEof :1;
  7746. BYTE fTxim :1;
  7747. UINT cbInQue;
  7748. UINT cbOutQue;
  7749. } COMSTAT;
  7750. #endif /* !(STRICT | WINVER >= 0x030a */
  7751. int WINAPI BuildCommDCB(LPCSTR, DCB FAR*);
  7752. int WINAPI OpenComm(LPCSTR, UINT, UINT);
  7753. int WINAPI CloseComm(int);
  7754. int WINAPI ReadComm(int, void FAR*, int);
  7755. int WINAPI WriteComm(int, const void FAR*, int);
  7756. int WINAPI UngetCommChar(int, char);
  7757. int WINAPI FlushComm(int, int);
  7758. int WINAPI TransmitCommChar(int, char);
  7759. int WINAPI SetCommState(const DCB FAR*);
  7760. int WINAPI GetCommState(int, DCB FAR*);
  7761. int WINAPI GetCommError(int, COMSTAT FAR* );
  7762. int WINAPI SetCommBreak(int);
  7763. int WINAPI ClearCommBreak(int);
  7764. UINT FAR* WINAPI SetCommEventMask(int, UINT);
  7765. UINT WINAPI GetCommEventMask(int, int);
  7766. LONG WINAPI EscapeCommFunction(int, int);
  7767. #if (WINVER >= 0x030a)
  7768. BOOL WINAPI EnableCommNotification(int, HWND, int, int);
  7769. #endif /* WINVER >= 0x030a */
  7770. #endif /* NOCOMM */
  7771. /****** String formatting support *******************************************/
  7772. int WINAPI wvsprintf(LPSTR lpszOut, LPCSTR lpszFmt, const void FAR* lpParams);
  7773. int FAR CDECL wsprintf(LPSTR lpszOut, LPCSTR lpszFmt, ...);
  7774. /****** Driver support ******************************************************/
  7775. #if (WINVER >= 0x030a)
  7776. #ifndef NODRIVERS
  7777. DECLARE_HANDLE(HDRVR);
  7778. typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM);
  7779. /* Driver messages */
  7780. #define DRV_LOAD 0x0001
  7781. #define DRV_ENABLE 0x0002
  7782. #define DRV_OPEN 0x0003
  7783. #define DRV_CLOSE 0x0004
  7784. #define DRV_DISABLE 0x0005
  7785. #define DRV_FREE 0x0006
  7786. #define DRV_CONFIGURE 0x0007
  7787. #define DRV_QUERYCONFIGURE 0x0008
  7788. #define DRV_INSTALL 0x0009
  7789. #define DRV_REMOVE 0x000A
  7790. #define DRV_EXITSESSION 0x000B
  7791. #define DRV_EXITAPPLICATION 0x000C
  7792. #define DRV_POWER 0x000F
  7793. #define DRV_NOTIFYMSG 0x0010
  7794. /*#define DRV_QUERYENDSESSION 0x0010 */
  7795. /*#define DRV_EXITSESSIONCANCELLED 0x0011 */
  7796. #define DRV_RESERVED 0x0800
  7797. #define DRV_USER 0x4000
  7798. /* LPARAM of DRV_CONFIGURE message */
  7799. typedef struct tagDRVCONFIGINFO
  7800. {
  7801. DWORD dwDCISize;
  7802. LPCSTR lpszDCISectionName;
  7803. LPCSTR lpszDCIAliasName;
  7804. } DRVCONFIGINFO;
  7805. typedef DRVCONFIGINFO NEAR* PDRVCONFIGINFO;
  7806. typedef DRVCONFIGINFO FAR* LPDRVCONFIGINFO;
  7807. /* Supported return values for DRV_CONFIGURE message */
  7808. #define DRVCNF_CANCEL 0x0000
  7809. #define DRVCNF_OK 0x0001
  7810. #define DRVCNF_RESTART 0x0002
  7811. /* Supported lParam1 of DRV_EXITAPPLICATION notification */
  7812. #define DRVEA_NORMALEXIT 0x0001
  7813. #define DRVEA_ABNORMALEXIT 0x0002
  7814. LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, UINT message, LPARAM lParam1, LPARAM lParam2);
  7815. HDRVR WINAPI OpenDriver(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2);
  7816. LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
  7817. LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2);
  7818. HINSTANCE WINAPI GetDriverModuleHandle(HDRVR hDriver);
  7819. HDRVR WINAPI GetNextDriver(HDRVR, DWORD);
  7820. /* GetNextDriver flags */
  7821. #define GND_FIRSTINSTANCEONLY 0x00000001
  7822. #define GND_FORWARD 0x00000000
  7823. #define GND_REVERSE 0x00000002
  7824. #define GND_VALID 0x00000003 /* ;Internal */
  7825. typedef struct tagDRIVERINFOSTRUCT
  7826. {
  7827. UINT length;
  7828. HDRVR hDriver;
  7829. HINSTANCE hModule;
  7830. char szAliasName[128];
  7831. } DRIVERINFOSTRUCT;
  7832. typedef DRIVERINFOSTRUCT FAR* LPDRIVERINFOSTRUCT;
  7833. BOOL WINAPI GetDriverInfo(HDRVR, DRIVERINFOSTRUCT FAR*);
  7834. #endif /* !NODRIVERS */
  7835. #endif /* WINVER >= 0x030a */
  7836. /****** Installable Message Thunk support ***********************************/
  7837. #if (WINVER > 0x030a)
  7838. #ifndef NOIMT
  7839. /* wReason codes */
  7840. #define IMT_REASON_ASYNC 0x00001
  7841. #define IMT_REASON_LS 0x00002
  7842. #define IMT_REASON_AFTER 0x00004
  7843. typedef struct tagIMTMSG
  7844. {
  7845. HWND hwnd;
  7846. UINT message;
  7847. DWORD wParam;
  7848. LPARAM lParam;
  7849. } IMTMSG, FAR* LPIMTMSG;
  7850. typedef struct tagIMTBUFFER
  7851. {
  7852. DWORD dwT1;
  7853. DWORD dwT2;
  7854. } IMTBUFFER, FAR* LPIMTBUFFER;
  7855. typedef BOOL (CALLBACK *IMTDISP)(WORD wReason, LPDWORD lpRetVal,
  7856. LPIMTMSG lpMsg, LPIMTBUFFER lpBuffer);
  7857. BOOL WINAPI InstallIMT(LPSTR lpszClassName, IMTDISP pfnDispatcher,
  7858. WORD msgLo, WORD msgHi);
  7859. BOOL WINAPI UnInstallIMT(LPSTR lpszClassName, IMTDISP pfnDispatcher,
  7860. WORD msgLo, WORD msgHi);
  7861. #endif /* !NOIMT */
  7862. #endif /* WINVER > 0x030a */
  7863. #endif /* NOUSER */
  7864. #if (WINVER >= 0x040A) // ;Internal 4.1
  7865. #define MWMO_WAITALL 0x0001 // ;Internal 4.1
  7866. #define MWMO_ALERTABLE 0x0002 // ;Internal 4.1
  7867. #define MWMO_INPUTAVAILABLE 0x0004 // ;Internal 4.1
  7868. #endif /* WINVER >= 0x040A */ // ;Internal 4.1
  7869. DWORD WINAPI RegisterServiceProcess(DWORD dwProcessId, DWORD dwServiceType);
  7870. #define RSP_UNREGISTER_SERVICE 0x00000000
  7871. #define RSP_SIMPLE_SERVICE 0x00000001
  7872. VOID WINAPI RegisterNetworkCapabilities(DWORD dwBitsToSet, DWORD dwValues);
  7873. #define RNC_NETWORKS 0x00000001
  7874. // ;Internal
  7875. VOID API RegisterSystemThread(DWORD flags, DWORD reserved); // ;Internal
  7876. #define RST_DONTATTACHQUEUE 0x00000001 // ;Internal
  7877. #define RST_DONTJOURNALATTACH 0x00000002 // ;Internal
  7878. #define RST_ALWAYSFOREGROUNDABLE 0x00000004 // ;Internal
  7879. #define RST_FAULTTHREAD 0x00000008 // ;Internal
  7880. // ;Internal
  7881. DWORD API EndTask(HWND hwnd, DWORD idProcess, LPSTR lpszCaption, DWORD dwFlags); // ;Internal
  7882. // ;Internal
  7883. #define ET_ALLOWFORWAIT 0x00000001 // ;Internal
  7884. #define ET_TRYTOKILLNICELY 0x00000002 // ;Internal
  7885. #define ET_NOUI 0x00000004 // ;Internal
  7886. #define ET_NOWAIT 0x00000008 // ;Internal
  7887. // ;Internal
  7888. #define ET_VALID 0x0000000F // ;Internal
  7889. BOOL API IsValidLocale(DWORD Lcid, DWORD dwFlags); /* ;Internal */
  7890. #define LCID_INSTALLED 0x00000001 /* ;Internal */
  7891. #if (WINVER >= 0x040A) // ;Internal 4.1
  7892. // // ;Internal 4.1
  7893. // EXECUTION_STATE for SetThreadExecutionState esFlags // ;Internal 4.1
  7894. // // ;Internal 4.1
  7895. // ;Internal 4.1
  7896. #define ES_SYSTEM_REQUIRED ((ULONG)0x00000001) // ;Internal 4.1
  7897. #define ES_DISPLAY_REQUIRED ((ULONG)0x00000002) // ;Internal 4.1
  7898. #define ES_CONTINUOUS ((ULONG)0x80000000) // ;Internal 4.1
  7899. // ;Internal 4.1
  7900. typedef ULONG EXECUTION_STATE; // ;Internal 4.1
  7901. // ;Internal 4.1
  7902. #endif /* WINVER >= 0x040A */ // ;Internal 4.1
  7903. /* ;Internal */
  7904. #ifndef NOWINDOWSX /* ;Internal */
  7905. #ifndef RC_INVOKED /* ;Internal */
  7906. #include <windowsx.h> /* ;Internal */
  7907. #ifndef STRICT /* ;Internal */
  7908. #undef SelectFont /* ;Internal */
  7909. #endif /* STRICT */ /* ;Internal */
  7910. #endif /* RC_INVOKED */ /* ;Internal */
  7911. #endif /* NOWINDOWSX */ /* ;Internal */
  7912. /* ;Internal */
  7913. #ifdef tagWND /* ;Internal */
  7914. #ifdef DEBUG /* ;Internal */
  7915. #undef HWND /* ;Internal */
  7916. #undef HWNDC /* ;Internal */
  7917. #undef HMENU /* ;Internal */
  7918. typedef struct tagWND BASED *HWND; /* ;Internal */
  7919. typedef HWND HWNDC; /* ;Internal */
  7920. typedef struct tagMENU FAR *HMENU; /* ;Internal */
  7921. #endif /* ;Internal */
  7922. #endif /* tagWND */ /* ;Internal */
  7923. #ifndef RC_INVOKED
  7924. #pragma pack() /* Revert to default packing */
  7925. #endif /* RC_INVOKED */
  7926. #ifdef __cplusplus
  7927. } /* End of extern "C" { */
  7928. #endif /* __cplusplus */
  7929. #endif /* _INC_WINDOWS */