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.

12996 lines
342 KiB

  1. /****************************************************************************
  2. * *
  3. * winuser.h -- USER procedure declarations, constant definitions and macros *
  4. * *
  5. * Copyright (c) Microsoft Corporation. All rights reserved. *
  6. * *
  7. ****************************************************************************/
  8. /*++ ;internal_NT
  9. Copyright (c) Microsoft Corporation. All rights reserved. ;internal_NT
  10. ;internal_NT
  11. Module Name: ;internal_NT
  12. ;internal_NT
  13. winuserp.h ;internal_NT
  14. ;internal_NT
  15. Abstract: ;internal_NT
  16. ;internal_NT
  17. Private ;internal_NT
  18. Procedure declarations, constant definitions and macros for the User ;internal_NT
  19. component. ;internal_NT
  20. ;internal_NT
  21. --*/ ;internal_NT
  22. /*#!perl
  23. MapHeaderToDll("winuser.h", "user32.dll");
  24. */
  25. #ifndef _WINUSER_
  26. #define _WINUSER_
  27. #ifndef _WINUSERP_ ;internal_NT
  28. #define _WINUSERP_ ;internal_NT
  29. ;internal_NT
  30. ;begin_rwinuser_only
  31. /*++ BUILD Version: 0000 Increment this if a change has global effects
  32. Copyright (c) Microsoft Corporation. All rights reserved.
  33. Module Name:
  34. winuser.rh
  35. Abstract:
  36. This module defines the 32-Bit Windows resource codes from winuser.h.
  37. Revision History:
  38. --*/
  39. ;end_rwinuser_only
  40. ;begin_pbt_only
  41. /*++ BUILD Version: 0000 Increment this if a change has global effects
  42. Copyright (c) Microsoft Corporation. All rights reserved.
  43. Module Name:
  44. pbt.h
  45. Abstract:
  46. Definitions for the Virtual Power Management Device.
  47. Revision History:
  48. DATE REV DESCRIPTION
  49. ----------- --- ----------------------------------------
  50. 15 Jan 1994 TCS Original implementation.
  51. --*/
  52. #ifndef _INC_PBT
  53. #define _INC_PBT
  54. ;end_pbt_only
  55. //
  56. // Define API decoration for direct importing of DLL references.
  57. //
  58. #if !defined(_USER32_)
  59. #define WINUSERAPI DECLSPEC_IMPORT
  60. #else
  61. #define WINUSERAPI
  62. #endif
  63. #ifdef _MAC
  64. #include <macwin32.h>
  65. #endif
  66. ;begin_both
  67. #ifdef __cplusplus
  68. extern "C" {
  69. #endif /* __cplusplus */
  70. ;end_both
  71. #ifndef WINVER
  72. #define WINVER 0x0500 /* version 5.0 */ ;public_win40
  73. #endif /* !WINVER */
  74. #include <stdarg.h>
  75. #ifndef NOUSER
  76. typedef HANDLE HDWP;
  77. typedef VOID MENUTEMPLATE%;
  78. typedef PVOID LPMENUTEMPLATE%;
  79. typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM);
  80. #ifdef STRICT ;both
  81. typedef INT_PTR (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM);
  82. typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT_PTR, DWORD);
  83. typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int);
  84. typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM);
  85. typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam);
  86. typedef VOID (CALLBACK* SENDASYNCPROC)(HWND, UINT, ULONG_PTR, LRESULT);
  87. typedef BOOL (CALLBACK* PROPENUMPROCA)(HWND, LPCSTR, HANDLE);
  88. typedef BOOL (CALLBACK* PROPENUMPROCW)(HWND, LPCWSTR, HANDLE);
  89. typedef BOOL (CALLBACK* PROPENUMPROCEXA)(HWND, LPSTR, HANDLE, ULONG_PTR);
  90. typedef BOOL (CALLBACK* PROPENUMPROCEXW)(HWND, LPWSTR, HANDLE, ULONG_PTR);
  91. typedef int (CALLBACK* EDITWORDBREAKPROCA)(LPSTR lpch, int ichCurrent, int cch, int code);
  92. typedef int (CALLBACK* EDITWORDBREAKPROCW)(LPWSTR lpch, int ichCurrent, int cch, int code);
  93. ;begin_winver_400
  94. typedef BOOL (CALLBACK* DRAWSTATEPROC)(HDC hdc, LPARAM lData, WPARAM wData, int cx, int cy);
  95. ;end_winver_400
  96. #else /* !STRICT */ ;both
  97. typedef FARPROC DLGPROC;
  98. typedef FARPROC TIMERPROC;
  99. typedef FARPROC GRAYSTRINGPROC;
  100. typedef FARPROC WNDENUMPROC;
  101. typedef FARPROC HOOKPROC;
  102. typedef FARPROC SENDASYNCPROC;
  103. typedef FARPROC EDITWORDBREAKPROCA;
  104. typedef FARPROC EDITWORDBREAKPROCW;
  105. typedef FARPROC PROPENUMPROCA;
  106. typedef FARPROC PROPENUMPROCW;
  107. typedef FARPROC PROPENUMPROCEXA;
  108. typedef FARPROC PROPENUMPROCEXW;
  109. ;begin_winver_400
  110. typedef FARPROC DRAWSTATEPROC;
  111. ;end_winver_400
  112. #endif /* !STRICT */ ;both
  113. #ifdef UNICODE
  114. typedef PROPENUMPROCW PROPENUMPROC;
  115. typedef PROPENUMPROCEXW PROPENUMPROCEX;
  116. typedef EDITWORDBREAKPROCW EDITWORDBREAKPROC;
  117. #else /* !UNICODE */
  118. typedef PROPENUMPROCA PROPENUMPROC;
  119. typedef PROPENUMPROCEXA PROPENUMPROCEX;
  120. typedef EDITWORDBREAKPROCA EDITWORDBREAKPROC;
  121. #endif /* UNICODE */
  122. #ifdef STRICT ;both
  123. typedef BOOL (CALLBACK* NAMEENUMPROCA)(LPSTR, LPARAM);
  124. typedef BOOL (CALLBACK* NAMEENUMPROCW)(LPWSTR, LPARAM);
  125. typedef NAMEENUMPROCA WINSTAENUMPROCA;
  126. typedef NAMEENUMPROCA DESKTOPENUMPROCA;
  127. typedef NAMEENUMPROCW WINSTAENUMPROCW;
  128. typedef NAMEENUMPROCW DESKTOPENUMPROCW;
  129. #else /* !STRICT */ ;both
  130. typedef FARPROC NAMEENUMPROCA;
  131. typedef FARPROC NAMEENUMPROCW;
  132. typedef FARPROC WINSTAENUMPROCA;
  133. typedef FARPROC DESKTOPENUMPROCA;
  134. typedef FARPROC WINSTAENUMPROCW;
  135. typedef FARPROC DESKTOPENUMPROCW;
  136. #endif /* !STRICT */ ;both
  137. #ifdef UNICODE ;both
  138. typedef WINSTAENUMPROCW WINSTAENUMPROC;
  139. typedef DESKTOPENUMPROCW DESKTOPENUMPROC;
  140. #else /* !UNICODE */ ;both
  141. typedef WINSTAENUMPROCA WINSTAENUMPROC;
  142. typedef DESKTOPENUMPROCA DESKTOPENUMPROC;
  143. #endif /* UNICODE */ ;both
  144. #define IS_INTRESOURCE(_r) (((ULONG_PTR)(_r) >> 16) == 0)
  145. #define MAKEINTRESOURCE%(i) (LPTSTR%)((ULONG_PTR)((WORD)(i)))
  146. #ifndef NORESOURCE
  147. /*
  148. * Predefined Resource Types
  149. */
  150. #define RT_CURSOR MAKEINTRESOURCE(1)
  151. #define RT_BITMAP MAKEINTRESOURCE(2)
  152. #define RT_ICON MAKEINTRESOURCE(3)
  153. #define RT_MENU MAKEINTRESOURCE(4)
  154. #define RT_DIALOG MAKEINTRESOURCE(5)
  155. #define RT_STRING MAKEINTRESOURCE(6)
  156. #define RT_FONTDIR MAKEINTRESOURCE(7)
  157. #define RT_FONT MAKEINTRESOURCE(8)
  158. #define RT_ACCELERATOR MAKEINTRESOURCE(9)
  159. #define RT_RCDATA MAKEINTRESOURCE(10)
  160. #define RT_MESSAGETABLE MAKEINTRESOURCE(11)
  161. #define DIFFERENCE 11
  162. #define RT_GROUP_CURSOR MAKEINTRESOURCE((ULONG_PTR)RT_CURSOR + DIFFERENCE)
  163. #define RT_MENUEX MAKEINTRESOURCE(13) // RT_MENU subtype ;internal
  164. #define RT_GROUP_ICON MAKEINTRESOURCE((ULONG_PTR)RT_ICON + DIFFERENCE)
  165. #define RT_NAMETABLE MAKEINTRESOURCE(15) // removed in 3.1 ;internal
  166. #define RT_VERSION MAKEINTRESOURCE(16)
  167. #define RT_DLGINCLUDE MAKEINTRESOURCE(17)
  168. #define RT_DIALOGEX MAKEINTRESOURCE(18) // RT_DIALOG subtype ;internal
  169. ;begin_winver_400
  170. #define RT_PLUGPLAY MAKEINTRESOURCE(19)
  171. #define RT_VXD MAKEINTRESOURCE(20)
  172. #define RT_ANICURSOR MAKEINTRESOURCE(21)
  173. #define RT_ANIICON MAKEINTRESOURCE(22)
  174. ;end_winver_400
  175. #define RT_HTML MAKEINTRESOURCE(23)
  176. #ifdef RC_INVOKED
  177. #define RT_MANIFEST 24 ;rwinuser
  178. #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 ;rwinuser
  179. #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 ;rwinuser
  180. #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3 ;rwinuser
  181. #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 /* inclusive */;rwinuser
  182. #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 /* inclusive */;rwinuser
  183. #else /* RC_INVOKED */
  184. #define RT_MANIFEST MAKEINTRESOURCE(24)
  185. #define CREATEPROCESS_MANIFEST_RESOURCE_ID MAKEINTRESOURCE( 1)
  186. #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(2)
  187. #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(3)
  188. #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE( 1 /*inclusive*/)
  189. #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID MAKEINTRESOURCE(16 /*inclusive*/)
  190. #endif /* RC_INVOKED */
  191. #define RT_LAST MAKEINTRESOURCE(24) ;internal
  192. #define RT_AFXFIRST MAKEINTRESOURCE(0xF0) // reserved: AFX ;internal
  193. #define RT_AFXLAST MAKEINTRESOURCE(0xFF) // reserved: AFX ;internal
  194. #endif /* !NORESOURCE */
  195. WINUSERAPI
  196. int
  197. WINAPI
  198. wvsprintf%(
  199. OUT LPTSTR%,
  200. IN LPCTSTR%,
  201. IN va_list arglist);
  202. WINUSERAPI
  203. int
  204. WINAPIV
  205. wsprintf%(
  206. OUT LPTSTR%,
  207. IN LPCTSTR%,
  208. ...);
  209. ;begin_internal
  210. /* Max number of characters. Doesn't include termination character */
  211. #define WSPRINTF_LIMIT 1024
  212. ;end_internal
  213. /*
  214. * SPI_SETDESKWALLPAPER defined constants
  215. */
  216. #define SETWALLPAPER_DEFAULT ((LPWSTR)-1)
  217. #define SETWALLPAPER_METRICS ((LPWSTR)-2) ;internal_500
  218. #ifndef NOSCROLL
  219. /*
  220. * Scroll Bar Constants
  221. */
  222. #define SB_HORZ 0
  223. #define SB_VERT 1
  224. #define SB_CTL 2
  225. #define SB_BOTH 3
  226. #define SB_MAX 3 ;internal_NT
  227. /*
  228. * Scroll Bar Commands
  229. */
  230. #define SB_LINEUP 0
  231. #define SB_LINELEFT 0
  232. #define SB_LINEDOWN 1
  233. #define SB_LINERIGHT 1
  234. #define SB_PAGEUP 2
  235. #define SB_PAGELEFT 2
  236. #define SB_PAGEDOWN 3
  237. #define SB_PAGERIGHT 3
  238. #define SB_THUMBPOSITION 4
  239. #define SB_THUMBTRACK 5
  240. #define SB_TOP 6
  241. #define SB_LEFT 6
  242. #define SB_BOTTOM 7
  243. #define SB_RIGHT 7
  244. #define SB_ENDSCROLL 8
  245. #define SB_CMD_MAX 8 ;internal_NT
  246. #endif /* !NOSCROLL */
  247. #ifndef NOSHOWWINDOW
  248. ;begin_rwinuser
  249. /*
  250. * ShowWindow() Commands
  251. */
  252. #define SW_HIDE 0
  253. #define SW_SHOWNORMAL 1
  254. #define SW_NORMAL 1
  255. #define SW_SHOWMINIMIZED 2
  256. #define SW_SHOWMAXIMIZED 3
  257. #define SW_MAXIMIZE 3
  258. #define SW_SHOWNOACTIVATE 4
  259. #define SW_SHOW 5
  260. #define SW_MINIMIZE 6
  261. #define SW_SHOWMINNOACTIVE 7
  262. #define SW_SHOWNA 8
  263. #define SW_RESTORE 9
  264. #define SW_SHOWDEFAULT 10
  265. #define SW_FORCEMINIMIZE 11
  266. #define SW_MAX 11
  267. /*
  268. * Old ShowWindow() Commands
  269. */
  270. #define HIDE_WINDOW 0
  271. #define SHOW_OPENWINDOW 1
  272. #define SHOW_ICONWINDOW 2
  273. #define SHOW_FULLSCREEN 3
  274. #define SHOW_OPENNOACTIVATE 4
  275. /*
  276. * Identifiers for the WM_SHOWWINDOW message
  277. */
  278. #define SW_PARENTCLOSING 1
  279. #define SW_OTHERZOOM 2
  280. #define SW_PARENTOPENING 3
  281. #define SW_OTHERUNZOOM 4
  282. ;end_rwinuser
  283. #endif /* !NOSHOWWINDOW */
  284. ;begin_winver_500
  285. /*
  286. * AnimateWindow() Commands
  287. */
  288. #define AW_HOR_POSITIVE 0x00000001
  289. #define AW_HOR_NEGATIVE 0x00000002
  290. #define AW_VER_POSITIVE 0x00000004
  291. #define AW_VER_NEGATIVE 0x00000008
  292. #define AW_CENTER 0x00000010
  293. #define AW_HIDE 0x00010000
  294. #define AW_ACTIVATE 0x00020000
  295. #define AW_SLIDE 0x00040000
  296. #define AW_BLEND 0x00080000
  297. ;begin_internal
  298. #define AW_VALID (AW_HOR_POSITIVE |\
  299. AW_HOR_NEGATIVE |\
  300. AW_VER_POSITIVE |\
  301. AW_VER_NEGATIVE |\
  302. AW_CENTER |\
  303. AW_HIDE |\
  304. AW_ACTIVATE |\
  305. AW_BLEND |\
  306. AW_SLIDE)
  307. ;end_internal
  308. ;end_winver_500
  309. ;begin_internal_500
  310. /*
  311. * GetAppCompatFlags2 flags
  312. */
  313. #define GACF2_ANIMATIONOFF 0x00000001 // do not animate menus and listboxes
  314. #define GACF2_KCOFF 0x00000002 // do not send Keyboard Cues messages
  315. #define GACF2_NO50EXSTYLEBITS 0x00000004 // mask out post-4.0 extended style bits for SetWindowLong
  316. #define GACF2_NODRAWPATRECT 0x00000008 // disable DRAWPATTERNRECT accel via ExtEscape()
  317. #define GACF2_MSSHELLDLG 0x00000010 // if there is a request for MS Shell Dlg (which
  318. // usually maps to MS Sans Serif (bitmap) on NT 4 and
  319. // Microsoft Sans Serif (TrueType) on NT 5), then
  320. // behave as though we are using the bitmap
  321. // font (MS Sans Serif).
  322. #define GACF2_NODDETRKDYING 0x00000020 // Be like Win9x: don't post WM_DDE_TERMINATE if
  323. // the window is destroyed while in a conversation
  324. #define GACF2_GIVEUPFOREGROUND 0x00000040 // In W2k, we have changed foreground semantics to stop
  325. // foreground focus stealing by one app if another app
  326. // is active. However, this has caused a few app compat
  327. // bugs. This appcompat flag is used to enable the old foreground
  328. // focus behaviour for these bugs.
  329. #define GACF2_ACTIVEMENUS 0x00000080 // In W2k, we set the inactive look on menus that belong
  330. // to non-rofeground windows. Some applications get in trouble
  331. // see #58227
  332. #define GACF2_EDITNOMOUSEHIDE 0x00000100 // Typing in edit controls hides the cursor.
  333. // Some apps are surprised by that: #307615
  334. #define GACF2_NOBATCHING 0X00000200 // Turn GDI batching off
  335. #define GACF2_FONTSUB 0X00000400 // Only for Notes R5
  336. #define GACF2_NO50EXSTYLEBITSCW 0x00000800 // mask out post-4.0 extended style bits for CreateWindow
  337. #define GACF2_NOCUSTOMPAPERSIZES 0x00001000 // PostScript driver bit for Harvard Graphics
  338. #define GACF2_DDE 0x00002000 // all the DDE hacks
  339. #define GACF2_DEFAULTCHARSET 0x00004000 // LOGFONT bit for QuickBook OCR-A font
  340. #define GACF2_NOCHAR_DEADKEY 0x00008000 // No character composition on dead key on dead key (NT4 behavior)
  341. #define GACF2_NO_TRYEXCEPT_CALLWNDPROC \
  342. 0x00010000 // No try ~ except clause around WndProc call, let the app's handler
  343. // handle it even though it skips some API stacks.
  344. // See #359866
  345. #define GACF2_NO_INIT_ECFLAGS_ON_SETFOCUS \
  346. 0x00020000 // Do not initialize insert & replace flags (Korean specific)
  347. // in PED on WM_SETFOCUS, if this appcompat flag is set.
  348. // To workaround a bogus app bug who send input messages before setting
  349. // the focus to the edit control. See NtRaid #411686.
  350. #define GACF2_DDENOSYNC 0x00040000 // Do not reject sent dde messages even if there is
  351. // an unprocessed message in the queue.
  352. // see WhistlerRaid #95367 (Check COMPATFLAGS2_FORWOW
  353. // below also)
  354. #define GACF2_FORCEFUSION 0x00800000 // Set this flag to enable fusion in 16bit apps
  355. /*
  356. * zzzInitTask masks out pti->dwCompatFlags2
  357. * If you need to add bits for 16bit apps include
  358. * that bit in this mask
  359. *
  360. */
  361. #define COMPATFLAGS2_FORWOW GACF2_DDENOSYNC | GACF2_GIVEUPFOREGROUND | GACF2_FORCEFUSION
  362. ;end_internal_500
  363. ;begin_internal_501
  364. #define GACF2_NOGHOST 0x00080000 // No window ghosting for this application. See bug #268100.
  365. #define GACF2_DDENOASYNCREG 0x00100000 // Use Sendmessage instead of PostMessage in DDE RegisterService(). See bug# 156088.
  366. #define GACF2_STRICTLLHOOK 0x00200000 // Apply strict timeout rule for LL hook. See WindowsBug 307738.
  367. #define GACF2_NOSHADOW 0x00400000 // don't apply window shadow. see bug# 364717
  368. #define GACF2_NOTIMERCBPROTECTION 0x01000000 // don't protect from unregistered WM_TIMER with lParam (callback pfn).
  369. ;end_internal_501
  370. ;begin_internal_500
  371. /*
  372. * Version macros
  373. */
  374. #define VERMAX 0x9900 // ignore the version
  375. #define VER51 0x0501
  376. #define VER50 0x0500
  377. #define VER40 0x0400
  378. #define VER31 0x030A
  379. #define VER30 0x0300
  380. #define Is510Compat(dwExpWinVer) (LOWORD(dwExpWinVer) >= VER51)
  381. #define Is500Compat(dwExpWinVer) (LOWORD(dwExpWinVer) >= VER50)
  382. #define Is400Compat(dwExpWinVer) (LOWORD(dwExpWinVer) >= VER40)
  383. #define Is310Compat(dwExpWinVer) (LOWORD(dwExpWinVer) >= VER31)
  384. #define Is300Compat(dwExpWinVer) (LOWORD(dwExpWinVer) >= VER30)
  385. ;end_internal_500
  386. /*
  387. * WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
  388. */
  389. #define KF_EXTENDED 0x0100
  390. #define KF_DLGMODE 0x0800
  391. #define KF_MENUMODE 0x1000
  392. #define KF_ALTDOWN 0x2000
  393. #define KF_REPEAT 0x4000
  394. #define KF_UP 0x8000
  395. #ifndef NOVIRTUALKEYCODES
  396. ;begin_rwinuser
  397. /*
  398. * Virtual Keys, Standard Set
  399. */
  400. #define VK_NONE 0x00 ;internal_NT
  401. #define VK_LBUTTON 0x01
  402. #define VK_RBUTTON 0x02
  403. #define VK_CANCEL 0x03
  404. #define VK_MBUTTON 0x04 /* NOT contiguous with L & RBUTTON */
  405. ;begin_if_(_WIN32_WINNT)_500
  406. #define VK_XBUTTON1 0x05 /* NOT contiguous with L & RBUTTON */
  407. #define VK_XBUTTON2 0x06 /* NOT contiguous with L & RBUTTON */
  408. ;end_if_(_WIN32_WINNT)_500
  409. /*
  410. * 0x07 : unassigned
  411. */
  412. #define VK_BACK 0x08
  413. #define VK_TAB 0x09
  414. /*
  415. * 0x0A - 0x0B : reserved
  416. */
  417. #define VK_CLEAR 0x0C
  418. #define VK_RETURN 0x0D
  419. #define VK_SHIFT 0x10
  420. #define VK_CONTROL 0x11
  421. #define VK_MENU 0x12
  422. #define VK_PAUSE 0x13
  423. #define VK_CAPITAL 0x14
  424. #define VK_KANA 0x15
  425. #define VK_HANGEUL 0x15 /* old name - should be here for compatibility */
  426. #define VK_HANGUL 0x15
  427. #define VK_JUNJA 0x17
  428. #define VK_FINAL 0x18
  429. #define VK_HANJA 0x19
  430. #define VK_KANJI 0x19
  431. #define VK_ESCAPE 0x1B
  432. #define VK_CONVERT 0x1C
  433. #define VK_NONCONVERT 0x1D
  434. #define VK_ACCEPT 0x1E
  435. #define VK_MODECHANGE 0x1F
  436. #define VK_SPACE 0x20
  437. #define VK_PRIOR 0x21
  438. #define VK_NEXT 0x22
  439. #define VK_END 0x23
  440. #define VK_HOME 0x24
  441. #define VK_LEFT 0x25
  442. #define VK_UP 0x26
  443. #define VK_RIGHT 0x27
  444. #define VK_DOWN 0x28
  445. #define VK_SELECT 0x29
  446. #define VK_PRINT 0x2A
  447. #define VK_EXECUTE 0x2B
  448. #define VK_SNAPSHOT 0x2C
  449. #define VK_INSERT 0x2D
  450. #define VK_DELETE 0x2E
  451. #define VK_HELP 0x2F
  452. /*
  453. * VK_0 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39)
  454. * 0x40 : unassigned
  455. * VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A)
  456. */
  457. #define VK_LWIN 0x5B
  458. #define VK_RWIN 0x5C
  459. #define VK_APPS 0x5D
  460. /*
  461. * 0x5E : reserved
  462. */
  463. #define VK_SLEEP 0x5F
  464. #define VK_NUMPAD0 0x60
  465. #define VK_NUMPAD1 0x61
  466. #define VK_NUMPAD2 0x62
  467. #define VK_NUMPAD3 0x63
  468. #define VK_NUMPAD4 0x64
  469. #define VK_NUMPAD5 0x65
  470. #define VK_NUMPAD6 0x66
  471. #define VK_NUMPAD7 0x67
  472. #define VK_NUMPAD8 0x68
  473. #define VK_NUMPAD9 0x69
  474. #define VK_MULTIPLY 0x6A
  475. #define VK_ADD 0x6B
  476. #define VK_SEPARATOR 0x6C
  477. /* ;internal_NT
  478. * NEC PC-9800 Series definitions ;internal_NT
  479. */ ;internal_NT
  480. #define VK_OEM_NEC_SEPARATE 0x6C ;internal_NT
  481. #define VK_SUBTRACT 0x6D
  482. #define VK_DECIMAL 0x6E
  483. #define VK_DIVIDE 0x6F
  484. #define VK_F1 0x70
  485. #define VK_F2 0x71
  486. #define VK_F3 0x72
  487. #define VK_F4 0x73
  488. #define VK_F5 0x74
  489. #define VK_F6 0x75
  490. #define VK_F7 0x76
  491. #define VK_F8 0x77
  492. #define VK_F9 0x78
  493. #define VK_F10 0x79
  494. #define VK_F11 0x7A
  495. #define VK_F12 0x7B
  496. #define VK_F13 0x7C
  497. #define VK_F14 0x7D
  498. #define VK_F15 0x7E
  499. #define VK_F16 0x7F
  500. #define VK_F17 0x80
  501. #define VK_F18 0x81
  502. #define VK_F19 0x82
  503. #define VK_F20 0x83
  504. #define VK_F21 0x84
  505. #define VK_F22 0x85
  506. #define VK_F23 0x86
  507. #define VK_F24 0x87
  508. /*
  509. * 0x88 - 0x8F : unassigned
  510. */
  511. #define VK_NUMLOCK 0x90
  512. #define VK_SCROLL 0x91
  513. /*
  514. * NEC PC-9800 kbd definitions
  515. */
  516. #define VK_OEM_NEC_EQUAL 0x92 // '=' key on numpad
  517. /*
  518. * Fujitsu/OASYS kbd definitions
  519. */
  520. #define VK_OEM_FJ_JISHO 0x92 // 'Dictionary' key
  521. #define VK_OEM_FJ_MASSHOU 0x93 // 'Unregister word' key
  522. #define VK_OEM_FJ_TOUROKU 0x94 // 'Register word' key
  523. #define VK_OEM_FJ_LOYA 0x95 // 'Left OYAYUBI' key
  524. #define VK_OEM_FJ_ROYA 0x96 // 'Right OYAYUBI' key
  525. /*
  526. * 0x97 - 0x9F : unassigned
  527. */
  528. /*
  529. * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys.
  530. * Used only as parameters to GetAsyncKeyState() and GetKeyState().
  531. * No other API or message will distinguish left and right keys in this way.
  532. */
  533. #define VK_LSHIFT 0xA0
  534. #define VK_RSHIFT 0xA1
  535. #define VK_LCONTROL 0xA2
  536. #define VK_RCONTROL 0xA3
  537. #define VK_LMENU 0xA4
  538. #define VK_RMENU 0xA5
  539. ;begin_if_(_WIN32_WINNT)_500
  540. #define VK_APPCOMMAND_FIRST 0xA6 ;internal_500
  541. #define VK_BROWSER_BACK 0xA6
  542. #define VK_BROWSER_FORWARD 0xA7
  543. #define VK_BROWSER_REFRESH 0xA8
  544. #define VK_BROWSER_STOP 0xA9
  545. #define VK_BROWSER_SEARCH 0xAA
  546. #define VK_BROWSER_FAVORITES 0xAB
  547. #define VK_BROWSER_HOME 0xAC
  548. #define VK_VOLUME_MUTE 0xAD
  549. #define VK_VOLUME_DOWN 0xAE
  550. #define VK_VOLUME_UP 0xAF
  551. #define VK_MEDIA_NEXT_TRACK 0xB0
  552. #define VK_MEDIA_PREV_TRACK 0xB1
  553. #define VK_MEDIA_STOP 0xB2
  554. #define VK_MEDIA_PLAY_PAUSE 0xB3
  555. #define VK_LAUNCH_MAIL 0xB4
  556. #define VK_LAUNCH_MEDIA_SELECT 0xB5
  557. #define VK_LAUNCH_APP1 0xB6
  558. #define VK_LAUNCH_APP2 0xB7
  559. #define VK_APPCOMMAND_LAST 0xB7 ;internal_500
  560. ;end_if_(_WIN32_WINNT)_500
  561. /*
  562. * 0xB8 - 0xB9 : reserved
  563. */
  564. #define VK_OEM_1 0xBA // ';:' for US
  565. #define VK_OEM_PLUS 0xBB // '+' any country
  566. #define VK_OEM_COMMA 0xBC // ',' any country
  567. #define VK_OEM_MINUS 0xBD // '-' any country
  568. #define VK_OEM_PERIOD 0xBE // '.' any country
  569. #define VK_OEM_2 0xBF // '/?' for US
  570. #define VK_OEM_3 0xC0 // '`~' for US
  571. /*
  572. * 0xC1 - 0xD7 : reserved
  573. */
  574. ;begin_internal_NT
  575. /*
  576. * Fujitsu/OASYS definitions - clash with SpeedRacer etc.
  577. */
  578. #define VK_OEM_OAS_1 0xB4
  579. #define VK_OEM_OAS_2 0xB5
  580. #define VK_OEM_OAS_3 0xB6
  581. #define VK_OEM_OAS_4 0xB7
  582. #define VK_OEM_OAS_5 0xB8
  583. #define VK_OEM_OAS_6 0xB9
  584. #define VK_OEM_OAS_7 0xC1
  585. #define VK_OEM_OAS_8 0xC2
  586. #define VK_OEM_OAS_9 0xC3
  587. #define VK_OEM_OAS_10 0xC4
  588. #define VK_OEM_OAS_11 0xC5
  589. #define VK_OEM_OAS_12 0xC6
  590. #define VK_OEM_OAS_13 0xC7
  591. #define VK_OEM_OAS_14 0xC8
  592. #define VK_OEM_OAS_15 0xC9
  593. #define VK_OEM_OAS_16 0xCA
  594. #define VK_OEM_OAS_17 0xCB
  595. #define VK_OEM_OAS_18 0xCC
  596. #define VK_OEM_OAS_19 0xCD
  597. #define VK_OEM_OAS_20 0xCE
  598. #define VK_OEM_OAS_21 0xCF
  599. #define VK_OEM_OAS_22 0xD0
  600. #define VK_OEM_OAS_23 0xD1
  601. #define VK_OEM_OAS_24 0xD2
  602. #define VK_OEM_OAS_25 0xD3
  603. #define VK_OEM_OAS_26 0xD4
  604. #define VK_OEM_OAS_27 0xD5
  605. #define VK_OEM_OAS_28 0xD6
  606. #define VK_OEM_OAS_29 0xD7
  607. #define VK_OEM_FJ_DUMMY 0xEF
  608. ;end_internal_NT
  609. ;begin_internal
  610. #define VK_UNKNOWN 0xFF
  611. ;end_internal
  612. /*
  613. * 0xD8 - 0xDA : unassigned
  614. */
  615. #define VK_OEM_4 0xDB // '[{' for US
  616. #define VK_OEM_5 0xDC // '\|' for US
  617. #define VK_OEM_6 0xDD // ']}' for US
  618. #define VK_OEM_7 0xDE // ''"' for US
  619. #define VK_OEM_8 0xDF
  620. /*
  621. * 0xE0 : reserved
  622. */
  623. /*
  624. * Various extended or enhanced keyboards
  625. */
  626. #define VK_OEM_AX 0xE1 // 'AX' key on Japanese AX kbd
  627. #define VK_OEM_102 0xE2 // "<>" or "\|" on RT 102-key kbd.
  628. #define VK_ICO_HELP 0xE3 // Help key on ICO
  629. #define VK_ICO_00 0xE4 // 00 key on ICO
  630. ;begin_winver_400
  631. #define VK_PROCESSKEY 0xE5
  632. ;end_winver_400
  633. #define VK_ICO_CLEAR 0xE6
  634. ;begin_internal_NT
  635. /*
  636. * Additional modifier keys.
  637. * Used for ISO9995 "Information technology - Keyboard layouts for text and
  638. * office systems" (French Canadian keyboard,
  639. */
  640. #define VK_GROUPSHIFT 0xE5
  641. #define VK_RGROUPSHIFT 0xE6
  642. ;end_internal_NT
  643. ;begin_if_(_WIN32_WINNT)_500
  644. #define VK_PACKET 0xE7
  645. ;end_if_(_WIN32_WINNT)_500
  646. /*
  647. * 0xE8 : unassigned
  648. */
  649. /*
  650. * Nokia/Ericsson definitions
  651. */
  652. #define VK_OEM_RESET 0xE9
  653. #define VK_OEM_JUMP 0xEA
  654. #define VK_OEM_PA1 0xEB
  655. #define VK_OEM_PA2 0xEC
  656. #define VK_OEM_PA3 0xED
  657. #define VK_OEM_WSCTRL 0xEE
  658. #define VK_OEM_CUSEL 0xEF
  659. #define VK_OEM_ATTN 0xF0
  660. #define VK_OEM_FINISH 0xF1
  661. #define VK_OEM_COPY 0xF2
  662. #define VK_OEM_AUTO 0xF3
  663. #define VK_OEM_ENLW 0xF4
  664. #define VK_OEM_BACKTAB 0xF5
  665. #define VK_ATTN 0xF6
  666. #define VK_CRSEL 0xF7
  667. #define VK_EXSEL 0xF8
  668. #define VK_EREOF 0xF9
  669. #define VK_PLAY 0xFA
  670. #define VK_ZOOM 0xFB
  671. #define VK_NONAME 0xFC
  672. #define VK_PA1 0xFD
  673. #define VK_OEM_CLEAR 0xFE
  674. /*
  675. * 0xFF : reserved
  676. */
  677. ;end_rwinuser
  678. #endif /* !NOVIRTUALKEYCODES */
  679. #ifndef NOWH
  680. /*
  681. * SetWindowsHook() codes
  682. */
  683. #define WH_MIN (-1)
  684. #define WH_MSGFILTER (-1)
  685. #define WH_JOURNALRECORD 0
  686. #define WH_JOURNALPLAYBACK 1
  687. #define WH_KEYBOARD 2
  688. #define WH_GETMESSAGE 3
  689. #define WH_CALLWNDPROC 4
  690. #define WH_CBT 5
  691. #define WH_SYSMSGFILTER 6
  692. #define WH_MOUSE 7
  693. #if defined(_WIN32_WINDOWS)
  694. #define WH_HARDWARE 8
  695. #endif
  696. ;begin_internal
  697. #if !defined(_WIN32_WINDOWS)
  698. #define WH_HARDWARE 8
  699. #endif
  700. ;end_internal
  701. #define WH_DEBUG 9
  702. #define WH_SHELL 10
  703. #define WH_FOREGROUNDIDLE 11
  704. ;begin_winver_400
  705. #define WH_CALLWNDPROCRET 12
  706. ;end_winver_400
  707. #if (_WIN32_WINNT >= 0x0400)
  708. #define WH_KEYBOARD_LL 13
  709. #define WH_MOUSE_LL 14
  710. ;begin_internal_501
  711. #ifdef REDIRECTION
  712. #define WH_HITTEST 15
  713. #endif // REDIRECTION
  714. ;end_internal_501
  715. #endif // (_WIN32_WINNT >= 0x0400)
  716. #if(WINVER >= 0x0400)
  717. #if (_WIN32_WINNT >= 0x0400)
  718. #define WH_MAX 14
  719. #else
  720. #define WH_MAX 12
  721. #endif // (_WIN32_WINNT >= 0x0400)
  722. #else
  723. #define WH_MAX 11
  724. #endif
  725. #define WH_MINHOOK WH_MIN
  726. #define WH_MAXHOOK WH_MAX
  727. #define WH_CHOOKS (WH_MAXHOOK - WH_MINHOOK + 1) ;internal
  728. /*
  729. * Hook Codes
  730. */
  731. #define HC_ACTION 0
  732. #define HC_GETNEXT 1
  733. #define HC_SKIP 2
  734. #define HC_NOREMOVE 3
  735. #define HC_NOREM HC_NOREMOVE
  736. #define HC_SYSMODALON 4
  737. #define HC_SYSMODALOFF 5
  738. /*
  739. * CBT Hook Codes
  740. */
  741. #define HCBT_MOVESIZE 0
  742. #define HCBT_MINMAX 1
  743. #define HCBT_QS 2
  744. #define HCBT_CREATEWND 3
  745. #define HCBT_DESTROYWND 4
  746. #define HCBT_ACTIVATE 5
  747. #define HCBT_CLICKSKIPPED 6
  748. #define HCBT_KEYSKIPPED 7
  749. #define HCBT_SYSCOMMAND 8
  750. #define HCBT_SETFOCUS 9
  751. ;begin_internal_501
  752. #ifdef REDIRECTION
  753. #define HCBT_GETCURSORPOS 10
  754. #endif // REDIRECTION
  755. ;end_internal_501
  756. /*
  757. * HCBT_CREATEWND parameters pointed to by lParam
  758. */
  759. typedef struct tagCBT_CREATEWND%
  760. {
  761. struct tagCREATESTRUCT% *lpcs;
  762. HWND hwndInsertAfter;
  763. } CBT_CREATEWND%, *LPCBT_CREATEWND%;
  764. /*
  765. * HCBT_ACTIVATE structure pointed to by lParam
  766. */
  767. typedef struct tagCBTACTIVATESTRUCT
  768. {
  769. BOOL fMouse;
  770. HWND hWndActive;
  771. } CBTACTIVATESTRUCT, *LPCBTACTIVATESTRUCT;
  772. ;begin_if_(_WIN32_WINNT)_501
  773. /*
  774. * WTSSESSION_NOTIFICATION struct pointed by lParam, for WM_WTSSESSION_CHANGE
  775. */
  776. typedef struct tagWTSSESSION_NOTIFICATION
  777. {
  778. DWORD cbSize;
  779. DWORD dwSessionId;
  780. } WTSSESSION_NOTIFICATION, *PWTSSESSION_NOTIFICATION;
  781. /*
  782. * codes passed in WPARAM for WM_WTSSESSION_CHANGE
  783. */
  784. #define WTS_CONSOLE_CONNECT 0x1
  785. #define WTS_CONSOLE_DISCONNECT 0x2
  786. #define WTS_REMOTE_CONNECT 0x3
  787. #define WTS_REMOTE_DISCONNECT 0x4
  788. #define WTS_SESSION_LOGON 0x5
  789. #define WTS_SESSION_LOGOFF 0x6
  790. #define WTS_SESSION_LOCK 0x7
  791. #define WTS_SESSION_UNLOCK 0x8
  792. #define WTS_SESSION_REMOTE_CONTROL 0x9
  793. ;end_if_(_WIN32_WINNT)_501
  794. /*
  795. * WH_MSGFILTER Filter Proc Codes
  796. */
  797. #define MSGF_DIALOGBOX 0
  798. #define MSGF_MESSAGEBOX 1
  799. #define MSGF_MENU 2
  800. #define MSGF_MOVE 3 ;internal // unused
  801. #define MSGF_SIZE 4 ;internal // unused
  802. #define MSGF_SCROLLBAR 5
  803. #define MSGF_NEXTWINDOW 6
  804. #define MSGF_CBTHOSEBAGSUSEDTHIS 7 ;internal
  805. #define MSGF_MAINLOOP 8 ;internal // unused
  806. #define MSGF_MAX 8 // unused
  807. #define MSGF_USER 4096
  808. /*
  809. * Shell support
  810. */
  811. #define HSHELL_WINDOWCREATED 1
  812. #define HSHELL_WINDOWDESTROYED 2
  813. #define HSHELL_ACTIVATESHELLWINDOW 3
  814. ;begin_winver_400
  815. #define HSHELL_WINDOWACTIVATED 4
  816. #define HSHELL_GETMINRECT 5
  817. #define HSHELL_REDRAW 6
  818. #define HSHELL_TASKMAN 7
  819. #define HSHELL_LANGUAGE 8
  820. #define HSHELL_SYSMENU 9
  821. #define HSHELL_ENDTASK 10
  822. ;end_winver_400
  823. ;begin_if_(_WIN32_WINNT)_500
  824. #define HSHELL_ACCESSIBILITYSTATE 11
  825. #define HSHELL_APPCOMMAND 12
  826. ;end_if_(_WIN32_WINNT)_500
  827. ;begin_if_(_WIN32_WINNT)_501
  828. #define HSHELL_WINDOWREPLACED 13
  829. #define HSHELL_WINDOWREPLACING 14
  830. ;end_if_(_WIN32_WINNT)_501
  831. #define HSHELL_HIGHBIT 0x8000
  832. #define HSHELL_FLASH (HSHELL_REDRAW|HSHELL_HIGHBIT)
  833. #define HSHELL_RUDEAPPACTIVATED (HSHELL_WINDOWACTIVATED|HSHELL_HIGHBIT)
  834. ;begin_if_(_WIN32_WINNT)_500
  835. /* wparam for HSHELL_ACCESSIBILITYSTATE */
  836. #define ACCESS_STICKYKEYS 0x0001
  837. #define ACCESS_FILTERKEYS 0x0002
  838. #define ACCESS_MOUSEKEYS 0x0003
  839. /* cmd for HSHELL_APPCOMMAND and WM_APPCOMMAND */
  840. #define APPCOMMAND_FIRST 1 ;internal
  841. #define APPCOMMAND_BROWSER_BACKWARD 1
  842. #define APPCOMMAND_BROWSER_FORWARD 2
  843. #define APPCOMMAND_BROWSER_REFRESH 3
  844. #define APPCOMMAND_BROWSER_STOP 4
  845. #define APPCOMMAND_BROWSER_SEARCH 5
  846. #define APPCOMMAND_BROWSER_FAVORITES 6
  847. #define APPCOMMAND_BROWSER_HOME 7
  848. #define APPCOMMAND_VOLUME_MUTE 8
  849. #define APPCOMMAND_VOLUME_DOWN 9
  850. #define APPCOMMAND_VOLUME_UP 10
  851. #define APPCOMMAND_MEDIA_NEXTTRACK 11
  852. #define APPCOMMAND_MEDIA_PREVIOUSTRACK 12
  853. #define APPCOMMAND_MEDIA_STOP 13
  854. #define APPCOMMAND_MEDIA_PLAY_PAUSE 14
  855. #define APPCOMMAND_LAUNCH_MAIL 15
  856. #define APPCOMMAND_LAUNCH_MEDIA_SELECT 16
  857. #define APPCOMMAND_LAUNCH_APP1 17
  858. #define APPCOMMAND_LAUNCH_APP2 18
  859. #define APPCOMMAND_BASS_DOWN 19
  860. #define APPCOMMAND_BASS_BOOST 20
  861. #define APPCOMMAND_BASS_UP 21
  862. #define APPCOMMAND_TREBLE_DOWN 22
  863. #define APPCOMMAND_TREBLE_UP 23
  864. ;begin_if_(_WIN32_WINNT)_501
  865. #define APPCOMMAND_MICROPHONE_VOLUME_MUTE 24
  866. #define APPCOMMAND_MICROPHONE_VOLUME_DOWN 25
  867. #define APPCOMMAND_MICROPHONE_VOLUME_UP 26
  868. #define APPCOMMAND_HELP 27
  869. #define APPCOMMAND_FIND 28
  870. #define APPCOMMAND_NEW 29
  871. #define APPCOMMAND_OPEN 30
  872. #define APPCOMMAND_CLOSE 31
  873. #define APPCOMMAND_SAVE 32
  874. #define APPCOMMAND_PRINT 33
  875. #define APPCOMMAND_UNDO 34
  876. #define APPCOMMAND_REDO 35
  877. #define APPCOMMAND_COPY 36
  878. #define APPCOMMAND_CUT 37
  879. #define APPCOMMAND_PASTE 38
  880. #define APPCOMMAND_REPLY_TO_MAIL 39
  881. #define APPCOMMAND_FORWARD_MAIL 40
  882. #define APPCOMMAND_SEND_MAIL 41
  883. #define APPCOMMAND_SPELL_CHECK 42
  884. #define APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE 43
  885. #define APPCOMMAND_MIC_ON_OFF_TOGGLE 44
  886. #define APPCOMMAND_CORRECTION_LIST 45
  887. #define APPCOMMAND_MEDIA_PLAY 46
  888. #define APPCOMMAND_MEDIA_PAUSE 47
  889. #define APPCOMMAND_MEDIA_RECORD 48
  890. #define APPCOMMAND_MEDIA_FAST_FORWARD 49
  891. #define APPCOMMAND_MEDIA_REWIND 50
  892. #define APPCOMMAND_MEDIA_CHANNEL_UP 51
  893. #define APPCOMMAND_MEDIA_CHANNEL_DOWN 52
  894. ;end_if_(_WIN32_WINNT)_501
  895. #define APPCOMMAND_LAST 52 ;internal
  896. #define FAPPCOMMAND_MOUSE 0x8000
  897. #define FAPPCOMMAND_KEY 0
  898. #define FAPPCOMMAND_OEM 0x1000
  899. #define FAPPCOMMAND_MASK 0xF000
  900. #define GET_APPCOMMAND_LPARAM(lParam) ((short)(HIWORD(lParam) & ~FAPPCOMMAND_MASK))
  901. #define GET_DEVICE_LPARAM(lParam) ((WORD)(HIWORD(lParam) & FAPPCOMMAND_MASK))
  902. #define GET_MOUSEORKEY_LPARAM GET_DEVICE_LPARAM
  903. #define GET_FLAGS_LPARAM(lParam) (LOWORD(lParam))
  904. #define GET_KEYSTATE_LPARAM(lParam) GET_FLAGS_LPARAM(lParam)
  905. ;end_if_(_WIN32_WINNT)_500
  906. typedef struct
  907. {
  908. HWND hwnd;
  909. RECT rc;
  910. } SHELLHOOKINFO, *LPSHELLHOOKINFO;
  911. /*
  912. * Message Structure used in Journaling
  913. */
  914. typedef struct tagEVENTMSG {
  915. UINT message;
  916. UINT paramL;
  917. UINT paramH;
  918. DWORD time;
  919. HWND hwnd;
  920. } EVENTMSG, *PEVENTMSGMSG, NEAR *NPEVENTMSGMSG, FAR *LPEVENTMSGMSG;
  921. typedef struct tagEVENTMSG *PEVENTMSG, NEAR *NPEVENTMSG, FAR *LPEVENTMSG;
  922. /*
  923. * Message structure used by WH_CALLWNDPROC
  924. */
  925. typedef struct tagCWPSTRUCT {
  926. LPARAM lParam;
  927. WPARAM wParam;
  928. UINT message;
  929. HWND hwnd;
  930. } CWPSTRUCT, *PCWPSTRUCT, NEAR *NPCWPSTRUCT, FAR *LPCWPSTRUCT;
  931. ;begin_winver_400
  932. /*
  933. * Message structure used by WH_CALLWNDPROCRET
  934. */
  935. typedef struct tagCWPRETSTRUCT {
  936. LRESULT lResult;
  937. LPARAM lParam;
  938. WPARAM wParam;
  939. UINT message;
  940. HWND hwnd;
  941. } CWPRETSTRUCT, *PCWPRETSTRUCT, NEAR *NPCWPRETSTRUCT, FAR *LPCWPRETSTRUCT;
  942. ;end_winver_400
  943. #if (_WIN32_WINNT >= 0x0400)
  944. /*
  945. * Low level hook flags
  946. */
  947. #define LLKHF_EXTENDED (KF_EXTENDED >> 8)
  948. #define LLKHF_INJECTED 0x00000010
  949. #define LLKHF_ALTDOWN (KF_ALTDOWN >> 8)
  950. #define LLKHF_UP (KF_UP >> 8)
  951. #define LLMHF_INJECTED 0x00000001
  952. /*
  953. * Structure used by WH_KEYBOARD_LL
  954. */
  955. typedef struct tagKBDLLHOOKSTRUCT {
  956. DWORD vkCode;
  957. DWORD scanCode;
  958. DWORD flags;
  959. DWORD time;
  960. ULONG_PTR dwExtraInfo;
  961. } KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;
  962. /*
  963. * Structure used by WH_MOUSE_LL
  964. */
  965. typedef struct tagMSLLHOOKSTRUCT {
  966. POINT pt;
  967. DWORD mouseData;
  968. DWORD flags;
  969. DWORD time;
  970. ULONG_PTR dwExtraInfo;
  971. } MSLLHOOKSTRUCT, FAR *LPMSLLHOOKSTRUCT, *PMSLLHOOKSTRUCT;
  972. #endif // (_WIN32_WINNT >= 0x0400)
  973. /*
  974. * Structure used by WH_DEBUG
  975. */
  976. typedef struct tagDEBUGHOOKINFO
  977. {
  978. DWORD idThread;
  979. DWORD idThreadInstaller;
  980. LPARAM lParam;
  981. WPARAM wParam;
  982. int code;
  983. } DEBUGHOOKINFO, *PDEBUGHOOKINFO, NEAR *NPDEBUGHOOKINFO, FAR* LPDEBUGHOOKINFO;
  984. /*
  985. * Structure used by WH_MOUSE
  986. */
  987. typedef struct tagMOUSEHOOKSTRUCT {
  988. POINT pt;
  989. HWND hwnd;
  990. UINT wHitTestCode;
  991. ULONG_PTR dwExtraInfo;
  992. } MOUSEHOOKSTRUCT, FAR *LPMOUSEHOOKSTRUCT, *PMOUSEHOOKSTRUCT;
  993. ;begin_if_(_WIN32_WINNT)_500
  994. #ifdef __cplusplus
  995. typedef struct tagMOUSEHOOKSTRUCTEX : public tagMOUSEHOOKSTRUCT
  996. {
  997. DWORD mouseData;
  998. } MOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX;
  999. #else // ndef __cplusplus
  1000. typedef struct tagMOUSEHOOKSTRUCTEX
  1001. {
  1002. MOUSEHOOKSTRUCT;
  1003. DWORD mouseData;
  1004. } MOUSEHOOKSTRUCTEX, *LPMOUSEHOOKSTRUCTEX, *PMOUSEHOOKSTRUCTEX;
  1005. #endif
  1006. ;end_if_(_WIN32_WINNT)_500
  1007. ;begin_internal_501
  1008. #ifdef REDIRECTION
  1009. typedef struct tagHTHOOKSTRUCT {
  1010. POINT pt;
  1011. HWND hwndHit;
  1012. } HTHOOKSTRUCT, FAR *LPHTHOOKSTRUCT, *PHTHOOKSTRUCT;
  1013. #endif // REDIRECTION
  1014. ;end_internal_501
  1015. ;begin_winver_400
  1016. /*
  1017. * Structure used by WH_HARDWARE
  1018. */
  1019. typedef struct tagHARDWAREHOOKSTRUCT {
  1020. HWND hwnd;
  1021. UINT message;
  1022. WPARAM wParam;
  1023. LPARAM lParam;
  1024. } HARDWAREHOOKSTRUCT, FAR *LPHARDWAREHOOKSTRUCT, *PHARDWAREHOOKSTRUCT;
  1025. ;end_winver_400
  1026. #endif /* !NOWH */
  1027. /*
  1028. * Keyboard Layout API
  1029. */
  1030. #define HKL_PREV 0
  1031. #define HKL_NEXT 1
  1032. #define KLF_ACTIVATE 0x00000001
  1033. #define KLF_SUBSTITUTE_OK 0x00000002
  1034. #define KLF_UNLOADPREVIOUS 0x00000004 ;internal_NT
  1035. #define KLF_REORDER 0x00000008
  1036. ;begin_winver_400
  1037. #define KLF_REPLACELANG 0x00000010
  1038. #define KLF_NOTELLSHELL 0x00000080
  1039. ;end_winver_400
  1040. #define KLF_SETFORPROCESS 0x00000100
  1041. #define KLF_FAILSAFE 0x00000200 ;internal_NT
  1042. ;begin_internal_NT
  1043. /*
  1044. * Keyboard Layout Attributes
  1045. * These are specified in the layout DLL itself, or in the registry under
  1046. * MACHINE\System\CurrentControlSet\Control\Keyboard Layouts\*\Attributes
  1047. * as KLF_ values between 0x00010000 and 0x00800000. Any attributes specified
  1048. * by the layout DLL are ORed with the attributes obtained from the registry.
  1049. */
  1050. ;end_internal_NT
  1051. ;begin_if_(_WIN32_WINNT)_500
  1052. #define KLF_SHIFTLOCK 0x00010000
  1053. #define KLF_LRM_RLM 0x00020000 ;internal_NT
  1054. #define KLF_ATTRIBUTE2 0x00040000 ;internal_NT
  1055. #define KLF_ATTRIBUTE3 0x00080000 ;internal_NT
  1056. #define KLF_ATTRIBUTE4 0x00100000 ;internal_NT
  1057. #define KLF_ATTRIBUTE5 0x00200000 ;internal_NT
  1058. #define KLF_ATTRIBUTE6 0x00400000 ;internal_NT
  1059. #define KLF_ATTRIBUTE7 0x00800000 ;internal_NT
  1060. #define KLF_ATTRMASK 0x00FF0000 ;internal_NT
  1061. #define KLF_RESET 0x40000000
  1062. ;end_if_(_WIN32_WINNT)_500
  1063. #define KLF_INITTIME 0x80000000 ;internal_NT
  1064. #define KLF_VALID 0xC000039F | KLF_ATTRMASK ;internal_NT
  1065. ;begin_winver_500
  1066. /*
  1067. * Bits in wParam of WM_INPUTLANGCHANGEREQUEST message
  1068. */
  1069. #define INPUTLANGCHANGE_SYSCHARSET 0x0001
  1070. #define INPUTLANGCHANGE_FORWARD 0x0002
  1071. #define INPUTLANGCHANGE_BACKWARD 0x0004
  1072. ;end_winver_500
  1073. /*
  1074. * Size of KeyboardLayoutName (number of characters), including nul terminator
  1075. */
  1076. #define KL_NAMELENGTH 9
  1077. WINUSERAPI
  1078. HKL
  1079. WINAPI
  1080. LoadKeyboardLayout%(
  1081. IN LPCTSTR% pwszKLID,
  1082. IN UINT Flags);
  1083. ;begin_internal_NT
  1084. WINUSERAPI
  1085. HKL
  1086. WINAPI
  1087. LoadKeyboardLayoutEx(
  1088. IN HKL hkl,
  1089. IN LPCWSTR pwszKLID,
  1090. IN UINT Flags);
  1091. ;end_internal_NT
  1092. #if(WINVER >= 0x0400)
  1093. WINUSERAPI
  1094. HKL
  1095. WINAPI
  1096. ActivateKeyboardLayout(
  1097. IN HKL hkl,
  1098. IN UINT Flags);
  1099. #else
  1100. WINUSERAPI
  1101. BOOL
  1102. WINAPI
  1103. ActivateKeyboardLayout(
  1104. IN HKL hkl,
  1105. IN UINT Flags);
  1106. #endif /* WINVER >= 0x0400 */
  1107. ;begin_winver_400
  1108. WINUSERAPI
  1109. int
  1110. WINAPI
  1111. ToUnicodeEx(
  1112. IN UINT wVirtKey,
  1113. IN UINT wScanCode,
  1114. IN CONST BYTE *lpKeyState,
  1115. OUT LPWSTR pwszBuff,
  1116. IN int cchBuff,
  1117. IN UINT wFlags,
  1118. IN HKL dwhkl);
  1119. ;end_winver_400
  1120. WINUSERAPI
  1121. BOOL
  1122. WINAPI
  1123. UnloadKeyboardLayout(
  1124. IN HKL hkl);
  1125. WINUSERAPI
  1126. BOOL
  1127. WINAPI
  1128. GetKeyboardLayoutName%(
  1129. OUT LPTSTR% pwszKLID);
  1130. ;begin_winver_400
  1131. WINUSERAPI
  1132. int
  1133. WINAPI
  1134. GetKeyboardLayoutList(
  1135. IN int nBuff,
  1136. OUT HKL FAR *lpList);
  1137. WINUSERAPI
  1138. HKL
  1139. WINAPI
  1140. GetKeyboardLayout(
  1141. IN DWORD idThread
  1142. );
  1143. ;end_winver_400
  1144. ;begin_winver_500
  1145. typedef struct tagMOUSEMOVEPOINT {
  1146. int x;
  1147. int y;
  1148. DWORD time;
  1149. ULONG_PTR dwExtraInfo;
  1150. } MOUSEMOVEPOINT, *PMOUSEMOVEPOINT, FAR* LPMOUSEMOVEPOINT;
  1151. /*
  1152. * Values for resolution parameter of GetMouseMovePointsEx
  1153. */
  1154. #define GMMP_USE_DISPLAY_POINTS 1
  1155. #define GMMP_USE_HIGH_RESOLUTION_POINTS 2
  1156. WINUSERAPI
  1157. int
  1158. WINAPI
  1159. GetMouseMovePointsEx(
  1160. IN UINT cbSize,
  1161. IN LPMOUSEMOVEPOINT lppt,
  1162. IN LPMOUSEMOVEPOINT lpptBuf,
  1163. IN int nBufPoints,
  1164. IN DWORD resolution
  1165. );
  1166. ;end_winver_500
  1167. #ifndef NODESKTOP
  1168. /*
  1169. * Desktop-specific access flags
  1170. */
  1171. #define DESKTOP_READOBJECTS 0x0001L
  1172. #define DESKTOP_CREATEWINDOW 0x0002L
  1173. #define DESKTOP_CREATEMENU 0x0004L
  1174. #define DESKTOP_HOOKCONTROL 0x0008L
  1175. #define DESKTOP_JOURNALRECORD 0x0010L
  1176. #define DESKTOP_JOURNALPLAYBACK 0x0020L
  1177. #define DESKTOP_ENUMERATE 0x0040L
  1178. #define DESKTOP_WRITEOBJECTS 0x0080L
  1179. #define DESKTOP_SWITCHDESKTOP 0x0100L
  1180. ;begin_internal_501
  1181. #ifdef REDIRECTION
  1182. #define DESKTOP_QUERY_INFORMATION 0x0101L
  1183. #define DESKTOP_REDIRECT 0x0102L
  1184. #endif // REDIRECTION
  1185. ;end_internal_501
  1186. /*
  1187. * Desktop-specific control flags
  1188. */
  1189. #define DF_ALLOWOTHERACCOUNTHOOK 0x0001L
  1190. #ifdef _WINGDI_
  1191. #ifndef NOGDI
  1192. WINUSERAPI
  1193. HDESK
  1194. WINAPI
  1195. CreateDesktop%(
  1196. IN LPCTSTR% lpszDesktop,
  1197. IN LPCTSTR% lpszDevice,
  1198. IN LPDEVMODE% pDevmode,
  1199. IN DWORD dwFlags,
  1200. IN ACCESS_MASK dwDesiredAccess,
  1201. IN LPSECURITY_ATTRIBUTES lpsa);
  1202. #endif /* NOGDI */
  1203. #endif /* _WINGDI_ */
  1204. WINUSERAPI
  1205. HDESK
  1206. WINAPI
  1207. OpenDesktop%(
  1208. IN LPCTSTR% lpszDesktop,
  1209. IN DWORD dwFlags,
  1210. IN BOOL fInherit,
  1211. IN ACCESS_MASK dwDesiredAccess);
  1212. WINUSERAPI
  1213. HDESK
  1214. WINAPI
  1215. OpenInputDesktop(
  1216. IN DWORD dwFlags,
  1217. IN BOOL fInherit,
  1218. IN ACCESS_MASK dwDesiredAccess);
  1219. WINUSERAPI
  1220. BOOL
  1221. WINAPI
  1222. EnumDesktops%(
  1223. IN HWINSTA hwinsta,
  1224. IN DESKTOPENUMPROC% lpEnumFunc,
  1225. IN LPARAM lParam);
  1226. WINUSERAPI
  1227. BOOL
  1228. WINAPI
  1229. EnumDesktopWindows(
  1230. IN HDESK hDesktop,
  1231. IN WNDENUMPROC lpfn,
  1232. IN LPARAM lParam);
  1233. WINUSERAPI
  1234. BOOL
  1235. WINAPI
  1236. SwitchDesktop(
  1237. IN HDESK hDesktop);
  1238. WINUSERAPI
  1239. BOOL
  1240. WINAPI
  1241. SetThreadDesktop(
  1242. IN HDESK hDesktop);
  1243. WINUSERAPI
  1244. BOOL
  1245. WINAPI
  1246. CloseDesktop(
  1247. IN HDESK hDesktop);
  1248. WINUSERAPI
  1249. HDESK
  1250. WINAPI
  1251. GetThreadDesktop(
  1252. IN DWORD dwThreadId);
  1253. #endif /* !NODESKTOP */
  1254. #ifndef NOWINDOWSTATION ;both
  1255. /*
  1256. * Windowstation-specific access flags
  1257. */
  1258. #define WINSTA_ENUMDESKTOPS 0x0001L
  1259. #define WINSTA_READATTRIBUTES 0x0002L
  1260. #define WINSTA_ACCESSCLIPBOARD 0x0004L
  1261. #define WINSTA_CREATEDESKTOP 0x0008L
  1262. #define WINSTA_WRITEATTRIBUTES 0x0010L
  1263. #define WINSTA_ACCESSGLOBALATOMS 0x0020L
  1264. #define WINSTA_EXITWINDOWS 0x0040L
  1265. #define WINSTA_ENUMERATE 0x0100L
  1266. #define WINSTA_READSCREEN 0x0200L
  1267. #define WINSTA_ALL_ACCESS (WINSTA_ENUMDESKTOPS | WINSTA_READATTRIBUTES | WINSTA_ACCESSCLIPBOARD | \
  1268. WINSTA_CREATEDESKTOP | WINSTA_WRITEATTRIBUTES | WINSTA_ACCESSGLOBALATOMS | \
  1269. WINSTA_EXITWINDOWS | WINSTA_ENUMERATE | WINSTA_READSCREEN)
  1270. /*
  1271. * Windowstation creation flags.
  1272. */
  1273. #define CWF_CREATE_ONLY 0x0001L
  1274. /*
  1275. * Windowstation-specific attribute flags
  1276. */
  1277. #define WSF_VISIBLE 0x0001L
  1278. WINUSERAPI
  1279. HWINSTA
  1280. WINAPI
  1281. CreateWindowStation%(
  1282. IN LPCTSTR% lpwinsta,
  1283. IN DWORD dwFlags,
  1284. IN ACCESS_MASK dwDesiredAccess,
  1285. IN LPSECURITY_ATTRIBUTES lpsa);
  1286. WINUSERAPI
  1287. HWINSTA
  1288. WINAPI
  1289. OpenWindowStation%(
  1290. IN LPCTSTR% lpszWinSta,
  1291. IN BOOL fInherit,
  1292. IN ACCESS_MASK dwDesiredAccess);
  1293. WINUSERAPI
  1294. BOOL
  1295. WINAPI
  1296. EnumWindowStations%(
  1297. IN WINSTAENUMPROC% lpEnumFunc,
  1298. IN LPARAM lParam);
  1299. WINUSERAPI
  1300. BOOL
  1301. WINAPI
  1302. CloseWindowStation(
  1303. IN HWINSTA hWinSta);
  1304. WINUSERAPI
  1305. BOOL
  1306. WINAPI
  1307. SetProcessWindowStation(
  1308. IN HWINSTA hWinSta);
  1309. WINUSERAPI
  1310. HWINSTA
  1311. WINAPI
  1312. GetProcessWindowStation(
  1313. VOID);
  1314. #endif /* !NOWINDOWSTATION */ ;both
  1315. #ifndef NOSECURITY
  1316. WINUSERAPI
  1317. BOOL
  1318. WINAPI
  1319. SetUserObjectSecurity(
  1320. IN HANDLE hObj,
  1321. IN PSECURITY_INFORMATION pSIRequested,
  1322. IN PSECURITY_DESCRIPTOR pSID);
  1323. WINUSERAPI
  1324. BOOL
  1325. WINAPI
  1326. GetUserObjectSecurity(
  1327. IN HANDLE hObj,
  1328. IN PSECURITY_INFORMATION pSIRequested,
  1329. IN OUT PSECURITY_DESCRIPTOR pSID,
  1330. IN DWORD nLength,
  1331. OUT LPDWORD lpnLengthNeeded);
  1332. #define UOI_FLAGS 1
  1333. #define UOI_NAME 2
  1334. #define UOI_TYPE 3
  1335. #define UOI_USER_SID 4
  1336. typedef struct tagUSEROBJECTFLAGS {
  1337. BOOL fInherit;
  1338. BOOL fReserved;
  1339. DWORD dwFlags;
  1340. } USEROBJECTFLAGS, *PUSEROBJECTFLAGS;
  1341. WINUSERAPI
  1342. BOOL
  1343. WINAPI
  1344. GetUserObjectInformation%(
  1345. IN HANDLE hObj,
  1346. IN int nIndex,
  1347. OUT PVOID pvInfo,
  1348. IN DWORD nLength,
  1349. OUT LPDWORD lpnLengthNeeded);
  1350. WINUSERAPI
  1351. BOOL
  1352. WINAPI
  1353. SetUserObjectInformation%(
  1354. IN HANDLE hObj,
  1355. IN int nIndex,
  1356. IN PVOID pvInfo,
  1357. IN DWORD nLength);
  1358. #endif /* !NOSECURITY */
  1359. ;begin_winver_400
  1360. typedef struct tagWNDCLASSEX% {
  1361. UINT cbSize;
  1362. /* Win 3.x */
  1363. UINT style;
  1364. WNDPROC lpfnWndProc;
  1365. int cbClsExtra;
  1366. int cbWndExtra;
  1367. HINSTANCE hInstance;
  1368. HICON hIcon;
  1369. HCURSOR hCursor;
  1370. HBRUSH hbrBackground;
  1371. LPCTSTR% lpszMenuName;
  1372. LPCTSTR% lpszClassName;
  1373. /* Win 4.0 */
  1374. HICON hIconSm;
  1375. } WNDCLASSEX%, *PWNDCLASSEX%, NEAR *NPWNDCLASSEX%, FAR *LPWNDCLASSEX%;
  1376. ;end_winver_400
  1377. typedef struct tagWNDCLASS% {
  1378. UINT style;
  1379. WNDPROC lpfnWndProc;
  1380. int cbClsExtra;
  1381. int cbWndExtra;
  1382. HINSTANCE hInstance;
  1383. HICON hIcon;
  1384. HCURSOR hCursor;
  1385. HBRUSH hbrBackground;
  1386. LPCTSTR% lpszMenuName;
  1387. LPCTSTR% lpszClassName;
  1388. } WNDCLASS%, *PWNDCLASS%, NEAR *NPWNDCLASS%, FAR *LPWNDCLASS%;
  1389. WINUSERAPI
  1390. BOOL
  1391. IsHungAppWindow(
  1392. IN HWND hwnd);
  1393. ;begin_internal_NT
  1394. WINUSERAPI
  1395. DWORD
  1396. WINAPI
  1397. CreateSystemThreads(
  1398. IN LPVOID pUnused);
  1399. BOOL WowWaitForMsgAndEvent(IN HANDLE hevent);
  1400. ;end_internal_NT
  1401. ;begin_winver_501
  1402. WINUSERAPI
  1403. VOID
  1404. DisableProcessWindowsGhosting(
  1405. VOID);
  1406. ;end_winver_501
  1407. ;begin_internal
  1408. WINUSERAPI VOID WINAPI RegisterSystemThread(IN DWORD flags, IN DWORD reserved);
  1409. #define RST_DONTATTACHQUEUE 0x00000001
  1410. #define RST_DONTJOURNALATTACH 0x00000002
  1411. #define RST_ALWAYSFOREGROUNDABLE 0x00000004
  1412. #define RST_FAULTTHREAD 0x00000008
  1413. ;end_internal
  1414. #ifndef NOMSG
  1415. /*
  1416. * Message structure
  1417. */
  1418. typedef struct tagMSG {
  1419. HWND hwnd;
  1420. UINT message;
  1421. WPARAM wParam;
  1422. LPARAM lParam;
  1423. DWORD time;
  1424. POINT pt;
  1425. #ifdef _MAC
  1426. DWORD lPrivate;
  1427. #endif
  1428. } MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
  1429. #define POINTSTOPOINT(pt, pts) \
  1430. { (pt).x = (LONG)(SHORT)LOWORD(*(LONG*)&pts); \
  1431. (pt).y = (LONG)(SHORT)HIWORD(*(LONG*)&pts); }
  1432. #define POINTTOPOINTS(pt) (MAKELONG((short)((pt).x), (short)((pt).y)))
  1433. #define MAKEWPARAM(l, h) ((WPARAM)(DWORD)MAKELONG(l, h))
  1434. #define MAKELPARAM(l, h) ((LPARAM)(DWORD)MAKELONG(l, h))
  1435. #define MAKELRESULT(l, h) ((LRESULT)(DWORD)MAKELONG(l, h))
  1436. #endif /* !NOMSG */
  1437. #ifndef NOWINOFFSETS
  1438. /*
  1439. * Window field offsets for GetWindowLong()
  1440. */
  1441. #define GWL_WNDPROC (-4)
  1442. #define GWL_HINSTANCE (-6)
  1443. #define GWL_HWNDPARENT (-8)
  1444. #define GWL_STYLE (-16)
  1445. #define GWL_EXSTYLE (-20)
  1446. #define GWL_USERDATA (-21)
  1447. #define GWL_ID (-12)
  1448. #define GWL_WOWWORDS (-1) ;internal_NT
  1449. ;begin_both
  1450. #ifdef _WIN64
  1451. ;end_both
  1452. #undef GWL_WNDPROC
  1453. #undef GWL_HINSTANCE
  1454. #undef GWL_HWNDPARENT
  1455. #undef GWL_USERDATA
  1456. #undef GWL_WOWWORDS ;internal_NT
  1457. ;begin_both
  1458. #endif /* _WIN64 */
  1459. ;end_both
  1460. #define GWLP_WNDPROC (-4)
  1461. #define GWLP_HINSTANCE (-6)
  1462. #define GWLP_HWNDPARENT (-8)
  1463. #define GWLP_USERDATA (-21)
  1464. #define GWLP_ID (-12)
  1465. #define GWLP_WOWWORDS (-1) ;internal_NT
  1466. /*
  1467. * Class field offsets for GetClassLong()
  1468. */
  1469. #define GCL_MENUNAME (-8)
  1470. #define GCL_HBRBACKGROUND (-10)
  1471. #define GCL_HCURSOR (-12)
  1472. #define GCL_HICON (-14)
  1473. #define GCL_HMODULE (-16)
  1474. #define GCL_CBWNDEXTRA (-18)
  1475. #define GCL_CBCLSEXTRA (-20)
  1476. #define GCL_WNDPROC (-24)
  1477. #define GCL_STYLE (-26)
  1478. #define GCL_WOWWORDS (-27) ;internal_NT
  1479. #define GCL_WOWMENUNAME (-29) ;internal_NT
  1480. #define GCW_ATOM (-32)
  1481. ;begin_winver_400
  1482. #define GCL_HICONSM (-34)
  1483. ;end_winver_400
  1484. ;begin_both
  1485. #ifdef _WIN64
  1486. ;end_both
  1487. #undef GCL_MENUNAME
  1488. #undef GCL_HBRBACKGROUND
  1489. #undef GCL_HCURSOR
  1490. #undef GCL_HICON
  1491. #undef GCL_HMODULE
  1492. #undef GCL_WNDPROC
  1493. #undef GCL_WOWWORDS ;internal_NT
  1494. #undef GCL_HICONSM
  1495. ;begin_both
  1496. #endif /* _WIN64 */
  1497. ;end_both
  1498. #define GCLP_MENUNAME (-8)
  1499. #define GCLP_HBRBACKGROUND (-10)
  1500. #define GCLP_HCURSOR (-12)
  1501. #define GCLP_HICON (-14)
  1502. #define GCLP_HMODULE (-16)
  1503. #define GCLP_WNDPROC (-24)
  1504. #define GCLP_WOWWORDS (-27) ;internal_NT
  1505. #define GCLP_HICONSM (-34)
  1506. #endif /* !NOWINOFFSETS */
  1507. #ifndef NOWINMESSAGES
  1508. ;begin_rwinuser
  1509. /*
  1510. * Window Messages
  1511. */
  1512. #define WM_NULL 0x0000
  1513. #define WM_CREATE 0x0001
  1514. #define WM_DESTROY 0x0002
  1515. #define WM_MOVE 0x0003
  1516. #define WM_SIZEWAIT 0x0004 ;internal
  1517. #define WM_SIZE 0x0005
  1518. #define WM_ACTIVATE 0x0006
  1519. /*
  1520. * WM_ACTIVATE state values
  1521. */
  1522. #define WA_INACTIVE 0
  1523. #define WA_ACTIVE 1
  1524. #define WA_CLICKACTIVE 2
  1525. #define WM_SETFOCUS 0x0007
  1526. #define WM_KILLFOCUS 0x0008
  1527. #define WM_SETVISIBLE 0x0009 ;internal
  1528. #define WM_ENABLE 0x000A
  1529. #define WM_SETREDRAW 0x000B
  1530. #define WM_SETTEXT 0x000C
  1531. #define WM_GETTEXT 0x000D
  1532. #define WM_GETTEXTLENGTH 0x000E
  1533. #define WM_PAINT 0x000F
  1534. #define WM_CLOSE 0x0010
  1535. #ifndef _WIN32_WCE
  1536. #define WM_QUERYENDSESSION 0x0011
  1537. #define WM_QUERYOPEN 0x0013
  1538. #define WM_ENDSESSION 0x0016
  1539. #endif
  1540. #define WM_QUIT 0x0012
  1541. #define WM_ERASEBKGND 0x0014
  1542. #define WM_SYSCOLORCHANGE 0x0015
  1543. #define WM_SYSTEMERROR 0x0017 ;internal
  1544. #define WM_SHOWWINDOW 0x0018
  1545. #define WM_WININICHANGE 0x001A
  1546. #define WM_SETTINGCHANGE WM_WININICHANGE ;public_winver_400
  1547. ;begin_internal_NT
  1548. /*
  1549. * This is used by DefWindowProc() and DefDlgProc(), it's the 16-bit version
  1550. * of the WM_CTLCOLORBTN, WM_CTLCOLORDLG, ... messages.
  1551. */
  1552. #define WM_CTLCOLOR 0x0019
  1553. ;end_internal_NT
  1554. #define WM_DEVMODECHANGE 0x001B
  1555. #define WM_ACTIVATEAPP 0x001C
  1556. #define WM_FONTCHANGE 0x001D
  1557. #define WM_TIMECHANGE 0x001E
  1558. #define WM_CANCELMODE 0x001F
  1559. #define WM_SETCURSOR 0x0020
  1560. #define WM_MOUSEACTIVATE 0x0021
  1561. #define WM_CHILDACTIVATE 0x0022
  1562. #define WM_QUEUESYNC 0x0023
  1563. #define WM_GETMINMAXINFO 0x0024
  1564. ;end_rwinuser
  1565. /*
  1566. * Struct pointed to by WM_GETMINMAXINFO lParam
  1567. */
  1568. typedef struct tagMINMAXINFO {
  1569. POINT ptReserved;
  1570. POINT ptMaxSize;
  1571. POINT ptMaxPosition;
  1572. POINT ptMinTrackSize;
  1573. POINT ptMaxTrackSize;
  1574. } MINMAXINFO, *PMINMAXINFO, *LPMINMAXINFO;
  1575. ;begin_rwinuser
  1576. #define WM_LOGOFF 0x0025 ;internal
  1577. #define WM_PAINTICON 0x0026
  1578. #define WM_ICONERASEBKGND 0x0027
  1579. #define WM_NEXTDLGCTL 0x0028
  1580. #define WM_ALTTABACTIVE 0x0029 ;internal
  1581. #define WM_SPOOLERSTATUS 0x002A
  1582. #define WM_DRAWITEM 0x002B
  1583. #define WM_MEASUREITEM 0x002C
  1584. #define WM_DELETEITEM 0x002D
  1585. #define WM_VKEYTOITEM 0x002E
  1586. #define WM_CHARTOITEM 0x002F
  1587. #define WM_SETFONT 0x0030
  1588. #define WM_GETFONT 0x0031
  1589. #define WM_SETHOTKEY 0x0032
  1590. #define WM_GETHOTKEY 0x0033
  1591. #define WM_FILESYSCHANGE 0x0034 ;internal
  1592. ;internal
  1593. #define WM_SHELLNOTIFY 0x0034 ;internal
  1594. #define SHELLNOTIFY_DISKFULL 0x0001 ;internal
  1595. #define SHELLNOTIFY_OLELOADED 0x0002 ;internal
  1596. #define SHELLNOTIFY_OLEUNLOADED 0x0003 ;internal
  1597. #define SHELLNOTIFY_WALLPAPERCHANGED 0x0004 ;internal
  1598. ;internal
  1599. #define WM_ISACTIVEICON 0x0035 ;internal
  1600. #define WM_QUERYPARKICON 0x0036 ;internal_NT
  1601. #define WM_QUERYDRAGICON 0x0037
  1602. #define WM_WINHELP 0x0038 ;internal
  1603. #define WM_COMPAREITEM 0x0039
  1604. #define WM_FULLSCREEN 0x003A ;internal
  1605. #define WM_CLIENTSHUTDOWN 0x003B ;internal
  1606. #define WM_DDEMLEVENT 0x003C ;internal
  1607. ;begin_winver_500
  1608. #ifndef _WIN32_WCE
  1609. #define WM_GETOBJECT 0x003D
  1610. #endif
  1611. ;end_winver_500
  1612. #define MM_CALCSCROLL 0x003F ;internal
  1613. #define WM_TESTING 0x0040 ;internal
  1614. #define WM_COMPACTING 0x0041
  1615. #define WM_OTHERWINDOWCREATED 0x0042 ;internal
  1616. #define WM_OTHERWINDOWDESTROYED 0x0043 ;internal
  1617. #define WM_COMMNOTIFY 0x0044 /* no longer suported */
  1618. #define WM_WINDOWPOSCHANGING 0x0046
  1619. #define WM_WINDOWPOSCHANGED 0x0047
  1620. #define WM_POWER 0x0048
  1621. /*
  1622. * wParam for WM_POWER window message and DRV_POWER driver notification
  1623. */
  1624. #define PWR_OK 1
  1625. #define PWR_FAIL (-1)
  1626. #define PWR_SUSPENDREQUEST 1
  1627. #define PWR_SUSPENDRESUME 2
  1628. #define PWR_CRITICALRESUME 3
  1629. #define WM_COPYGLOBALDATA 0x0049 ;internal
  1630. #define WM_COPYDATA 0x004A
  1631. #define WM_CANCELJOURNAL 0x004B
  1632. #define WM_LOGONNOTIFY 0x004C ;internal
  1633. ;end_rwinuser
  1634. /*
  1635. * lParam of WM_COPYDATA message points to...
  1636. */
  1637. typedef struct tagCOPYDATASTRUCT {
  1638. ULONG_PTR dwData;
  1639. DWORD cbData;
  1640. PVOID lpData;
  1641. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  1642. ;begin_winver_400
  1643. typedef struct tagMDINEXTMENU
  1644. {
  1645. HMENU hmenuIn;
  1646. HMENU hmenuNext;
  1647. HWND hwndNext;
  1648. } MDINEXTMENU, * PMDINEXTMENU, FAR * LPMDINEXTMENU;
  1649. ;end_winver_400
  1650. ;begin_rwinuser
  1651. ;begin_winver_400
  1652. #define WM_KEYF1 0x004D ;internal
  1653. #define WM_NOTIFY 0x004E
  1654. #define WM_ACCESS_WINDOW 0x004F ;internal
  1655. #define WM_INPUTLANGCHANGEREQUEST 0x0050
  1656. #define WM_INPUTLANGCHANGE 0x0051
  1657. #define WM_TCARD 0x0052
  1658. #define WM_HELP 0x0053
  1659. #define WM_USERCHANGED 0x0054
  1660. #define WM_NOTIFYFORMAT 0x0055
  1661. #define NFR_ANSI 1
  1662. #define NFR_UNICODE 2
  1663. #define NF_QUERY 3
  1664. #define NF_REQUERY 4
  1665. #define WM_CONTEXTMENU 0x007B
  1666. #define WM_STYLECHANGING 0x007C
  1667. #define WM_STYLECHANGED 0x007D
  1668. #define WM_DISPLAYCHANGE 0x007E
  1669. #define WM_GETICON 0x007F
  1670. #define WM_SETICON 0x0080
  1671. ;end_winver_400
  1672. #define WM_FINALDESTROY 0x0070 /* really destroy (window not locked) */ ;internal
  1673. #define WM_MEASUREITEM_CLIENTDATA 0x0071 /* WM_MEASUREITEM bug clientdata thunked already */ ;internal
  1674. #define WM_NCCREATE 0x0081
  1675. #define WM_NCDESTROY 0x0082
  1676. #define WM_NCCALCSIZE 0x0083
  1677. #define WM_NCHITTEST 0x0084
  1678. #define WM_NCPAINT 0x0085
  1679. #define WM_NCACTIVATE 0x0086
  1680. #define WM_GETDLGCODE 0x0087
  1681. #ifndef _WIN32_WCE
  1682. #define WM_SYNCPAINT 0x0088
  1683. #endif
  1684. #define WM_SYNCTASK 0x0089 ;internal
  1685. ;begin_internal_cairo
  1686. #define WM_KLUDGEMINRECT 0x008B
  1687. #define WM_LPKDRAWSWITCHWND 0x008C
  1688. ;end_internal_cairo
  1689. #define WM_NCMOUSEFIRST 0x00A0 ;internal_500
  1690. #define WM_NCMOUSEMOVE 0x00A0
  1691. #define WM_NCLBUTTONDOWN 0x00A1
  1692. #define WM_NCLBUTTONUP 0x00A2
  1693. #define WM_NCLBUTTONDBLCLK 0x00A3
  1694. #define WM_NCRBUTTONDOWN 0x00A4
  1695. #define WM_NCRBUTTONUP 0x00A5
  1696. #define WM_NCRBUTTONDBLCLK 0x00A6
  1697. #define WM_NCMBUTTONDOWN 0x00A7
  1698. #define WM_NCMBUTTONUP 0x00A8
  1699. #define WM_NCMBUTTONDBLCLK 0x00A9
  1700. ;begin_internal_500
  1701. /*
  1702. * Skip value 0x00AA, which would correspond to the non-client
  1703. * mouse wheel message if there were such a message.
  1704. * We do that in order to maintain a constant value for
  1705. * the difference between the client and nonclient version of
  1706. * a mouse message, e.g.
  1707. * WM_LBUTTONDOWN - WM_NCLBUTTONDOWN == WM_XBUTTONDOWN - WM_NCXBUTTONDOWN
  1708. */
  1709. ;end_internal_500
  1710. ;begin_if_(_WIN32_WINNT)_500
  1711. #define WM_NCXBUTTONDOWN 0x00AB
  1712. #define WM_NCXBUTTONUP 0x00AC
  1713. #define WM_NCXBUTTONDBLCLK 0x00AD
  1714. ;end_if_(_WIN32_WINNT)_500
  1715. ;begin_internal_500
  1716. #define WM_NCXBUTTONFIRST 0x00AB
  1717. #define WM_NCXBUTTONLAST 0X00AD
  1718. #define WM_NCMOUSELAST 0x00AD
  1719. ;end_internal_500
  1720. ;begin_internal_501
  1721. ;begin_if_(_WIN32_WINNT)_501
  1722. #define WM_NCUAHDRAWCAPTION 0x00AE
  1723. #define WM_NCUAHDRAWFRAME 0x00AF
  1724. ;end_if_(_WIN32_WINNT)_501
  1725. ;end_internal_501
  1726. ;begin_if_(_WIN32_WINNT)_501
  1727. #define WM_INPUT 0x00FF
  1728. ;end_if_(_WIN32_WINNT)_501
  1729. #define WM_KEYFIRST 0x0100
  1730. #define WM_KEYDOWN 0x0100
  1731. #define WM_KEYUP 0x0101
  1732. #define WM_CHAR 0x0102
  1733. #define WM_DEADCHAR 0x0103
  1734. #define WM_SYSKEYDOWN 0x0104
  1735. #define WM_SYSKEYUP 0x0105
  1736. #define WM_SYSCHAR 0x0106
  1737. #define WM_SYSDEADCHAR 0x0107
  1738. #define WM_CONVERTREQUESTEX 0x0108 ;internal
  1739. #define WM_YOMICHAR 0x0108 ;internal
  1740. ;begin_if_(_WIN32_WINNT)_501
  1741. #define WM_UNICHAR 0x0109
  1742. #define WM_KEYLAST 0x0109
  1743. #define UNICODE_NOCHAR 0xFFFF
  1744. #else
  1745. #define WM_KEYLAST 0x0108
  1746. ;end_if_(_WIN32_WINNT)_501
  1747. #define WM_CONVERTREQUEST 0x010A ;internal
  1748. #define WM_CONVERTRESULT 0x010B ;internal
  1749. #define WM_INTERIM 0x010C ;internal
  1750. ;begin_winver_400
  1751. #define WM_IME_STARTCOMPOSITION 0x010D
  1752. #define WM_IME_ENDCOMPOSITION 0x010E
  1753. #define WM_IME_COMPOSITION 0x010F
  1754. #define WM_IME_KEYLAST 0x010F
  1755. ;end_winver_400
  1756. #define WM_INITDIALOG 0x0110
  1757. #define WM_COMMAND 0x0111
  1758. #define WM_SYSCOMMAND 0x0112
  1759. #define WM_TIMER 0x0113
  1760. #define WM_HSCROLL 0x0114
  1761. #define WM_VSCROLL 0x0115
  1762. #define WM_INITMENU 0x0116
  1763. #define WM_INITMENUPOPUP 0x0117
  1764. #define WM_SYSTIMER 0x0118 ;internal
  1765. #define WM_MENUSELECT 0x011F
  1766. #define WM_MENUCHAR 0x0120
  1767. #define WM_ENTERIDLE 0x0121
  1768. ;begin_winver_500
  1769. #ifndef _WIN32_WCE
  1770. #define WM_MENURBUTTONUP 0x0122
  1771. #define WM_MENUDRAG 0x0123
  1772. #define WM_MENUGETOBJECT 0x0124
  1773. #define WM_UNINITMENUPOPUP 0x0125
  1774. #define WM_MENUCOMMAND 0x0126
  1775. #ifndef _WIN32_WCE
  1776. ;begin_if_(_WIN32_WINNT)_500
  1777. #define WM_CHANGEUISTATE 0x0127
  1778. #define WM_UPDATEUISTATE 0x0128
  1779. #define WM_QUERYUISTATE 0x0129
  1780. /*
  1781. * LOWORD(wParam) values in WM_*UISTATE*
  1782. */
  1783. #define UIS_SET 1
  1784. #define UIS_CLEAR 2
  1785. #define UIS_INITIALIZE 3
  1786. #define UIS_LASTVALID UIS_INITIALIZE ;internal
  1787. /*
  1788. * HIWORD(wParam) values in WM_*UISTATE*
  1789. */
  1790. #define UISF_HIDEFOCUS 0x1
  1791. #define UISF_HIDEACCEL 0x2
  1792. ;begin_if_(_WIN32_WINNT)_501
  1793. #define UISF_ACTIVE 0x4
  1794. ;end_if_(_WIN32_WINNT)_501
  1795. ;begin_internal
  1796. #define UISF_VALID (UISF_HIDEFOCUS | \
  1797. UISF_HIDEACCEL | \
  1798. UISF_ACTIVE)
  1799. ;end_internal
  1800. ;end_if_(_WIN32_WINNT)_500
  1801. #endif
  1802. #endif
  1803. ;end_winver_500
  1804. #define WM_LBTRACKPOINT 0x0131 ;internal
  1805. #define WM_CTLCOLORFIRST 0x0132 ;internal
  1806. #define WM_CTLCOLORMSGBOX 0x0132
  1807. #define WM_CTLCOLOREDIT 0x0133
  1808. #define WM_CTLCOLORLISTBOX 0x0134
  1809. #define WM_CTLCOLORBTN 0x0135
  1810. #define WM_CTLCOLORDLG 0x0136
  1811. #define WM_CTLCOLORSCROLLBAR 0x0137
  1812. #define WM_CTLCOLORSTATIC 0x0138
  1813. #define WM_CTLCOLORLAST 0x0138 ;internal
  1814. #define MN_FIRST 0x01E0 ;internal
  1815. #define MN_SETHMENU (MN_FIRST + 0) ;internal
  1816. ;begin_internal
  1817. // We need to expose this message for compliance.
  1818. // Make sure this remains equal to (MN_FIRST + 1)
  1819. ;end_internal
  1820. #define MN_GETHMENU 0x01E1
  1821. #define MN_SIZEWINDOW (MN_FIRST + 2) ;internal
  1822. #define MN_OPENHIERARCHY (MN_FIRST + 3) ;internal
  1823. #define MN_CLOSEHIERARCHY (MN_FIRST + 4) ;internal
  1824. #define MN_SELECTITEM (MN_FIRST + 5) ;internal
  1825. #define MN_CANCELMENUS (MN_FIRST + 6) ;internal
  1826. #define MN_SELECTFIRSTVALIDITEM (MN_FIRST + 7) ;internal
  1827. #define MN_GETPPOPUPMENU (MN_FIRST + 10) ;internal_NT
  1828. #define MN_FINDMENUWINDOWFROMPOINT (MN_FIRST + 11) ;internal_NT
  1829. #define MN_SHOWPOPUPWINDOW (MN_FIRST + 12) ;internal_NT
  1830. #define MN_BUTTONDOWN (MN_FIRST + 13) ;internal_NT
  1831. #define MN_MOUSEMOVE (MN_FIRST + 14) ;internal_NT
  1832. #define MN_BUTTONUP (MN_FIRST + 15) ;internal_NT
  1833. #define MN_SETTIMERTOOPENHIERARCHY (MN_FIRST + 16) ;internal_NT
  1834. #define MN_DBLCLK (MN_FIRST + 17) ;internal_cairo
  1835. #define MN_ACTIVATEPOPUP (MN_FIRST + 18) ;internal_500
  1836. #define MN_ENDMENU (MN_FIRST + 19) ;internal_500
  1837. #define MN_DODRAGDROP (MN_FIRST + 20) ;internal_500
  1838. #define MN_LASTPOSSIBLE (MN_FIRST + 31) ;internal_500
  1839. #define WM_MOUSEFIRST 0x0200
  1840. #define WM_MOUSEMOVE 0x0200
  1841. #define WM_LBUTTONDOWN 0x0201
  1842. #define WM_LBUTTONUP 0x0202
  1843. #define WM_LBUTTONDBLCLK 0x0203
  1844. #define WM_RBUTTONDOWN 0x0204
  1845. #define WM_RBUTTONUP 0x0205
  1846. #define WM_RBUTTONDBLCLK 0x0206
  1847. #define WM_MBUTTONDOWN 0x0207
  1848. #define WM_MBUTTONUP 0x0208
  1849. #define WM_MBUTTONDBLCLK 0x0209
  1850. #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
  1851. #define WM_MOUSEWHEEL 0x020A
  1852. #endif
  1853. #if (_WIN32_WINNT >= 0x0500)
  1854. #define WM_XBUTTONDOWN 0x020B
  1855. #define WM_XBUTTONUP 0x020C
  1856. #define WM_XBUTTONDBLCLK 0x020D
  1857. #endif
  1858. #if (_WIN32_WINNT >= 0x0500)
  1859. #define WM_MOUSELAST 0x020D
  1860. #elif (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
  1861. #define WM_MOUSELAST 0x020A
  1862. #else
  1863. #define WM_MOUSELAST 0x0209
  1864. #endif /* (_WIN32_WINNT >= 0x0500) */
  1865. ;begin_internal_500
  1866. #define WM_XBUTTONFIRST 0x020B
  1867. #define WM_XBUTTONLAST 0X020D
  1868. ;end_internal_500
  1869. ;begin_public_sur
  1870. /* Value for rolling one detent */
  1871. #define WHEEL_DELTA 120
  1872. #define GET_WHEEL_DELTA_WPARAM(wParam) ((short)HIWORD(wParam))
  1873. /* Setting to scroll one page for SPI_GET/SETWHEELSCROLLLINES */
  1874. #define WHEEL_PAGESCROLL (UINT_MAX)
  1875. ;end_public_sur
  1876. ;begin_if_(_WIN32_WINNT)_500
  1877. #define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))
  1878. #define GET_NCHITTEST_WPARAM(wParam) ((short)LOWORD(wParam))
  1879. #define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
  1880. /* XButton values are WORD flags */
  1881. #define XBUTTON1 0x0001
  1882. #define XBUTTON2 0x0002
  1883. #define XBUTTON_MASK (XBUTTON1 | XBUTTON2) ;internal_500
  1884. /* Were there to be an XBUTTON3, its value would be 0x0004 */
  1885. ;end_if_(_WIN32_WINNT)_500
  1886. #define WM_PARENTNOTIFY 0x0210
  1887. #define WM_ENTERMENULOOP 0x0211
  1888. #define WM_EXITMENULOOP 0x0212
  1889. ;begin_winver_400
  1890. #define WM_NEXTMENU 0x0213
  1891. #define WM_SIZING 0x0214
  1892. #define WM_CAPTURECHANGED 0x0215
  1893. #define WM_MOVING 0x0216
  1894. #define WM_POWERBROADCAST 0x0218 ;only
  1895. ;end_winver_400
  1896. ;end_rwinuser
  1897. ;begin_winver_400
  1898. ;begin_pbt
  1899. #define WM_POWERBROADCAST 0x0218
  1900. #ifndef _WIN32_WCE
  1901. #define PBT_APMQUERYSUSPEND 0x0000
  1902. #define PBT_APMQUERYSTANDBY 0x0001
  1903. #define PBT_APMQUERYSUSPENDFAILED 0x0002
  1904. #define PBT_APMQUERYSTANDBYFAILED 0x0003
  1905. #define PBT_APMSUSPEND 0x0004
  1906. #define PBT_APMSTANDBY 0x0005
  1907. #define PBT_APMRESUMECRITICAL 0x0006
  1908. #define PBT_APMRESUMESUSPEND 0x0007
  1909. #define PBT_APMRESUMESTANDBY 0x0008
  1910. #define PBTF_APMRESUMEFROMFAILURE 0x00000001
  1911. #define PBT_APMBATTERYLOW 0x0009
  1912. #define PBT_APMPOWERSTATUSCHANGE 0x000A
  1913. #define PBT_APMOEMEVENT 0x000B
  1914. #define PBT_APMRESUMEAUTOMATIC 0x0012
  1915. #endif
  1916. ;end_pbt
  1917. ;end_winver_400
  1918. ;begin_rwinuser
  1919. ;begin_winver_400
  1920. #define WM_DEVICECHANGE 0x0219
  1921. ;end_winver_400
  1922. #define WM_MDICREATE 0x0220
  1923. #define WM_MDIDESTROY 0x0221
  1924. #define WM_MDIACTIVATE 0x0222
  1925. #define WM_MDIRESTORE 0x0223
  1926. #define WM_MDINEXT 0x0224
  1927. #define WM_MDIMAXIMIZE 0x0225
  1928. #define WM_MDITILE 0x0226
  1929. #define WM_MDICASCADE 0x0227
  1930. #define WM_MDIICONARRANGE 0x0228
  1931. #define WM_MDIGETACTIVE 0x0229
  1932. #define WM_DROPOBJECT 0x022A ;internal
  1933. #define WM_QUERYDROPOBJECT 0x022B ;internal
  1934. #define WM_BEGINDRAG 0x022C ;internal
  1935. #define WM_DRAGLOOP 0x022D ;internal
  1936. #define WM_DRAGSELECT 0x022E ;internal
  1937. #define WM_DRAGMOVE 0x022F ;internal
  1938. #define WM_MDISETMENU 0x0230
  1939. #define WM_ENTERSIZEMOVE 0x0231
  1940. #define WM_EXITSIZEMOVE 0x0232
  1941. #define WM_DROPFILES 0x0233
  1942. #define WM_MDIREFRESHMENU 0x0234
  1943. #define WM_KANJIFIRST 0x0280 ;internal
  1944. ;begin_winver_400
  1945. #define WM_IME_SETCONTEXT 0x0281
  1946. #define WM_IME_NOTIFY 0x0282
  1947. #define WM_IME_CONTROL 0x0283
  1948. #define WM_IME_COMPOSITIONFULL 0x0284
  1949. #define WM_IME_SELECT 0x0285
  1950. #define WM_IME_CHAR 0x0286
  1951. #define WM_IME_SYSTEM 0x0287 ;internal
  1952. ;end_winver_400
  1953. ;begin_winver_500
  1954. #define WM_IME_REQUEST 0x0288
  1955. ;end_winver_500
  1956. ;begin_winver_400
  1957. #define WM_IME_KEYDOWN 0x0290
  1958. #define WM_IME_KEYUP 0x0291
  1959. ;end_winver_400
  1960. #define WM_KANJILAST 0x029F ;internal
  1961. #define WM_TRACKMOUSEEVENT_FIRST 0x02A0 ;internal
  1962. #if((_WIN32_WINNT >= 0x0400) || (WINVER >= 0x0500))
  1963. #define WM_MOUSEHOVER 0x02A1
  1964. #define WM_MOUSELEAVE 0x02A3
  1965. #endif
  1966. ;begin_winver_500
  1967. #define WM_NCMOUSEHOVER 0x02A0
  1968. #define WM_NCMOUSELEAVE 0x02A2
  1969. ;end_winver_500
  1970. #define WM_TRACKMOUSEEVENT_LAST 0x02AF ;internal
  1971. ;begin_if_(_WIN32_WINNT)_501
  1972. #define WM_WTSSESSION_CHANGE 0x02B1
  1973. #define WM_TABLET_FIRST 0x02c0
  1974. #define WM_TABLET_LAST 0x02df
  1975. ;end_if_(_WIN32_WINNT)_501
  1976. #define WM_CUT 0x0300
  1977. #define WM_COPY 0x0301
  1978. #define WM_PASTE 0x0302
  1979. #define WM_CLEAR 0x0303
  1980. #define WM_UNDO 0x0304
  1981. #define WM_RENDERFORMAT 0x0305
  1982. #define WM_RENDERALLFORMATS 0x0306
  1983. #define WM_DESTROYCLIPBOARD 0x0307
  1984. #define WM_DRAWCLIPBOARD 0x0308
  1985. #define WM_PAINTCLIPBOARD 0x0309
  1986. #define WM_VSCROLLCLIPBOARD 0x030A
  1987. #define WM_SIZECLIPBOARD 0x030B
  1988. #define WM_ASKCBFORMATNAME 0x030C
  1989. #define WM_CHANGECBCHAIN 0x030D
  1990. #define WM_HSCROLLCLIPBOARD 0x030E
  1991. #define WM_QUERYNEWPALETTE 0x030F
  1992. #define WM_PALETTEISCHANGING 0x0310
  1993. #define WM_PALETTEGONNACHANGE 0x0310 ;internal_NT
  1994. #define WM_PALETTECHANGED 0x0311
  1995. #define WM_CHANGEPALETTE 0x0311 ;internal_NT
  1996. #define WM_HOTKEY 0x0312
  1997. #define WM_SYSMENU 0x0313 ;internal
  1998. #define WM_HOOKMSG 0x0314 ;internal
  1999. #define WM_EXITPROCESS 0x0315 ;internal
  2000. ;begin_winver_400
  2001. #define WM_WAKETHREAD 0x0316 ;internal
  2002. #define WM_PRINT 0x0317
  2003. #define WM_PRINTCLIENT 0x0318
  2004. ;end_winver_400
  2005. ;begin_if_(_WIN32_WINNT)_500
  2006. #define WM_APPCOMMAND 0x0319
  2007. ;end_if_(_WIN32_WINNT)_500
  2008. ;begin_if_(_WIN32_WINNT)_501
  2009. #define WM_THEMECHANGED 0x031A
  2010. ;begin_internal_501
  2011. #define WM_UAHINIT 0x031B
  2012. ;end_internal_501
  2013. ;end_if_(_WIN32_WINNT)_501
  2014. ;begin_internal_501
  2015. #define WM_DESKTOPNOTIFY 0x031C ; internal
  2016. ;end_internal_501
  2017. ;begin_winver_400
  2018. #define WM_NOTIFYWOW 0x0340 ;internal_NT
  2019. #define WM_HANDHELDFIRST 0x0358
  2020. #define WM_HANDHELDLAST 0x035F
  2021. #define WM_AFXFIRST 0x0360
  2022. #define WM_AFXLAST 0x037F
  2023. ;end_winver_400
  2024. #define WM_PENWINFIRST 0x0380
  2025. #define WM_PENWINLAST 0x038F
  2026. #define WM_COALESCE_FIRST 0x0390 ;internal
  2027. #define WM_COALESCE_LAST 0x039F ;internal
  2028. #define WM_INTERNAL_DDE_FIRST 0x03E0 ;internal
  2029. #define WM_INTERNAL_DDE_LAST 0x03EF ;internal
  2030. ;begin_winver_400
  2031. #define WM_APP 0x8000
  2032. ;end_winver_400
  2033. #define WM_COALESCE_FIRST 0x0390 ;internal_NT
  2034. #define WM_COALESCE_LAST 0x039F ;internal_NT
  2035. #define WM_MM_RESERVED_FIRST 0x03A0 ;internal_NT
  2036. #define WM_MM_RESERVED_LAST 0x03DF ;internal_NT
  2037. #define WM_CBT_RESERVED_FIRST 0x03F0 ;internal
  2038. #define WM_CBT_RESERVED_LAST 0x03FF ;internal
  2039. /*
  2040. * NOTE: All Message Numbers below 0x0400 are RESERVED.
  2041. *
  2042. * Private Window Messages Start Here:
  2043. */
  2044. #define WM_USER 0x0400
  2045. ;begin_winver_400
  2046. /* wParam for WM_NOTIFYWOW message */ ;internal_NT
  2047. #define WMNW_UPDATEFINDREPLACE 0 ;internal_NT
  2048. /* wParam for WM_SIZING message */
  2049. #define WMSZ_KEYSIZE 0 ;internal
  2050. #define WMSZ_LEFT 1
  2051. #define WMSZ_RIGHT 2
  2052. #define WMSZ_TOP 3
  2053. #define WMSZ_TOPLEFT 4
  2054. #define WMSZ_TOPRIGHT 5
  2055. #define WMSZ_BOTTOM 6
  2056. #define WMSZ_BOTTOMLEFT 7
  2057. #define WMSZ_BOTTOMRIGHT 8
  2058. #define WMSZ_MOVE 9 ;internal
  2059. #define WMSZ_KEYMOVE 10 ;internal
  2060. #define WMSZ_SIZEFIRST WMSZ_LEFT ;internal
  2061. ;end_winver_400
  2062. #ifndef NONCMESSAGES
  2063. /*
  2064. * WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes
  2065. */
  2066. #define HTERROR (-2)
  2067. #define HTTRANSPARENT (-1)
  2068. #define HTNOWHERE 0
  2069. #define HTCLIENT 1
  2070. #define HTCAPTION 2
  2071. #define HTSYSMENU 3
  2072. #define HTGROWBOX 4
  2073. #define HTSIZE HTGROWBOX
  2074. #define HTMENU 5
  2075. #define HTHSCROLL 6
  2076. #define HTVSCROLL 7
  2077. #define HTMINBUTTON 8
  2078. #define HTMAXBUTTON 9
  2079. #define HTLEFT 10
  2080. #define HTRIGHT 11
  2081. #define HTTOP 12
  2082. #define HTTOPLEFT 13
  2083. #define HTTOPRIGHT 14
  2084. #define HTBOTTOM 15
  2085. #define HTBOTTOMLEFT 16
  2086. #define HTBOTTOMRIGHT 17
  2087. #define HTBORDER 18
  2088. #define HTREDUCE HTMINBUTTON
  2089. #define HTZOOM HTMAXBUTTON
  2090. #define HTSIZEFIRST HTLEFT
  2091. #define HTSIZELAST HTBOTTOMRIGHT
  2092. ;begin_winver_400
  2093. #define HTOBJECT 19
  2094. #define HTCLOSE 20
  2095. #define HTHELP 21
  2096. ;end_winver_400
  2097. ;begin_internal
  2098. #define HTLAMEBUTTON 22
  2099. /*
  2100. * The prototype of the function to call when the user clicks
  2101. * on the Lame button in the caption
  2102. */
  2103. typedef VOID (*PLAMEBTNPROC)(HWND, PVOID);
  2104. ;end_internal
  2105. /*
  2106. * SendMessageTimeout values
  2107. */
  2108. #define SMTO_NORMAL 0x0000
  2109. #define SMTO_BLOCK 0x0001
  2110. #define SMTO_ABORTIFHUNG 0x0002
  2111. #define SMTO_BROADCAST 0x0004 ;internal
  2112. ;begin_winver_500
  2113. #define SMTO_NOTIMEOUTIFNOTHUNG 0x0008
  2114. ;end_winver_500
  2115. #define SMTO_VALID 0x000F ;internal
  2116. #endif /* !NONCMESSAGES */
  2117. /*
  2118. * WM_MOUSEACTIVATE Return Codes
  2119. */
  2120. #define MA_ACTIVATE 1
  2121. #define MA_ACTIVATEANDEAT 2
  2122. #define MA_NOACTIVATE 3
  2123. #define MA_NOACTIVATEANDEAT 4
  2124. /*
  2125. * WM_SETICON / WM_GETICON Type Codes
  2126. */
  2127. #define ICON_SMALL 0
  2128. #define ICON_BIG 1
  2129. ;begin_if_(_WIN32_WINNT)_501
  2130. #define ICON_SMALL2 2
  2131. ;end_if_(_WIN32_WINNT)_501
  2132. #define ICON_RECREATE 3 ;internal
  2133. ;end_rwinuser
  2134. WINUSERAPI
  2135. UINT
  2136. WINAPI
  2137. RegisterWindowMessage%(
  2138. IN LPCTSTR% lpString);
  2139. ;begin_rwinuser
  2140. /*
  2141. * WM_SIZE message wParam values
  2142. */
  2143. #define SIZE_RESTORED 0
  2144. #define SIZE_MINIMIZED 1
  2145. #define SIZE_MAXIMIZED 2
  2146. #define SIZE_MAXSHOW 3
  2147. #define SIZE_MAXHIDE 4
  2148. /*
  2149. * Obsolete constant names
  2150. */
  2151. #define SIZENORMAL SIZE_RESTORED
  2152. #define SIZEICONIC SIZE_MINIMIZED
  2153. #define SIZEFULLSCREEN SIZE_MAXIMIZED
  2154. #define SIZEZOOMSHOW SIZE_MAXSHOW
  2155. #define SIZEZOOMHIDE SIZE_MAXHIDE
  2156. ;end_rwinuser
  2157. /*
  2158. * WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
  2159. */
  2160. typedef struct tagWINDOWPOS {
  2161. HWND hwnd;
  2162. HWND hwndInsertAfter;
  2163. int x;
  2164. int y;
  2165. int cx;
  2166. int cy;
  2167. UINT flags;
  2168. } WINDOWPOS, *LPWINDOWPOS, *PWINDOWPOS;
  2169. /*
  2170. * WM_NCCALCSIZE parameter structure
  2171. */
  2172. typedef struct tagNCCALCSIZE_PARAMS {
  2173. RECT rgrc[3];
  2174. PWINDOWPOS lppos;
  2175. } NCCALCSIZE_PARAMS, *LPNCCALCSIZE_PARAMS;
  2176. ;begin_rwinuser
  2177. /*
  2178. * WM_NCCALCSIZE "window valid rect" return values
  2179. */
  2180. #define WVR_ALIGNTOP 0x0010
  2181. #define WVR_ALIGNLEFT 0x0020
  2182. #define WVR_ALIGNBOTTOM 0x0040
  2183. #define WVR_ALIGNRIGHT 0x0080
  2184. #define WVR_HREDRAW 0x0100
  2185. #define WVR_VREDRAW 0x0200
  2186. #define WVR_REDRAW (WVR_HREDRAW | \
  2187. WVR_VREDRAW)
  2188. #define WVR_VALIDRECTS 0x0400
  2189. #define WVR_MINVALID WVR_ALIGNTOP ;internal
  2190. #define WVR_MAXVALID WVR_VALIDRECTS ;internal
  2191. #ifndef NOKEYSTATES
  2192. /*
  2193. * Key State Masks for Mouse Messages
  2194. */
  2195. #define MK_LBUTTON 0x0001
  2196. #define MK_RBUTTON 0x0002
  2197. #define MK_SHIFT 0x0004
  2198. #define MK_CONTROL 0x0008
  2199. #define MK_MBUTTON 0x0010
  2200. ;begin_if_(_WIN32_WINNT)_500
  2201. #define MK_XBUTTON1 0x0020
  2202. #define MK_XBUTTON2 0x0040
  2203. ;end_if_(_WIN32_WINNT)_500
  2204. #endif /* !NOKEYSTATES */
  2205. ;begin_sur
  2206. #ifndef NOTRACKMOUSEEVENT
  2207. #define TME_HOVER 0x00000001
  2208. #define TME_LEAVE 0x00000002
  2209. ;begin_winver_500
  2210. #define TME_NONCLIENT 0x00000010
  2211. ;end_winver_500
  2212. #define TME_QUERY 0x40000000
  2213. #define TME_CANCEL 0x80000000
  2214. ;begin_internal
  2215. #if(WINVER >= 0x0500)
  2216. #define TME_VALID (TME_HOVER | TME_LEAVE | TME_NONCLIENT | TME_QUERY | TME_CANCEL)
  2217. #else
  2218. #define TME_VALID (TME_HOVER | TME_LEAVE | TME_QUERY | TME_CANCEL)
  2219. #endif
  2220. ;end_internal
  2221. #define HOVER_DEFAULT 0xFFFFFFFF
  2222. ;end_sur
  2223. ;end_rwinuser
  2224. ;begin_sur
  2225. typedef struct tagTRACKMOUSEEVENT {
  2226. DWORD cbSize;
  2227. DWORD dwFlags;
  2228. HWND hwndTrack;
  2229. DWORD dwHoverTime;
  2230. } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
  2231. WINUSERAPI
  2232. BOOL
  2233. WINAPI
  2234. TrackMouseEvent(
  2235. IN OUT LPTRACKMOUSEEVENT lpEventTrack);
  2236. ;end_sur
  2237. ;begin_rwinuser
  2238. ;begin_sur
  2239. #endif /* !NOTRACKMOUSEEVENT */
  2240. ;end_sur
  2241. ;end_rwinuser
  2242. #endif /* !NOWINMESSAGES */
  2243. #ifndef NOWINSTYLES
  2244. ;begin_rwinuser
  2245. /*
  2246. * Window Styles
  2247. */
  2248. #define WS_OVERLAPPED 0x00000000L
  2249. #define WS_POPUP 0x80000000L
  2250. #define WS_CHILD 0x40000000L
  2251. #define WS_MINIMIZE 0x20000000L
  2252. #define WS_VISIBLE 0x10000000L
  2253. #define WS_DISABLED 0x08000000L
  2254. #define WS_CLIPSIBLINGS 0x04000000L
  2255. #define WS_CLIPCHILDREN 0x02000000L
  2256. #define WS_MAXIMIZE 0x01000000L
  2257. #define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */
  2258. #define WS_BORDER 0x00800000L
  2259. #define WS_DLGFRAME 0x00400000L
  2260. #define WS_VSCROLL 0x00200000L
  2261. #define WS_HSCROLL 0x00100000L
  2262. #define WS_SYSMENU 0x00080000L
  2263. #define WS_THICKFRAME 0x00040000L
  2264. #define WS_GROUP 0x00020000L
  2265. #define WS_TABSTOP 0x00010000L
  2266. #define WS_MINIMIZEBOX 0x00020000L
  2267. #define WS_MAXIMIZEBOX 0x00010000L
  2268. #define WS_TILED WS_OVERLAPPED
  2269. #define WS_ICONIC WS_MINIMIZE
  2270. #define WS_SIZEBOX WS_THICKFRAME
  2271. #define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW
  2272. /*
  2273. * Common Window Styles
  2274. */
  2275. #define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | \
  2276. WS_CAPTION | \
  2277. WS_SYSMENU | \
  2278. WS_THICKFRAME | \
  2279. WS_MINIMIZEBOX | \
  2280. WS_MAXIMIZEBOX)
  2281. #define WS_POPUPWINDOW (WS_POPUP | \
  2282. WS_BORDER | \
  2283. WS_SYSMENU)
  2284. #define WS_CHILDWINDOW (WS_CHILD)
  2285. ;begin_internal_NT
  2286. #define WS_VALID (WS_OVERLAPPED | \
  2287. WS_POPUP | \
  2288. WS_CHILD | \
  2289. WS_MINIMIZE | \
  2290. WS_VISIBLE | \
  2291. WS_DISABLED | \
  2292. WS_CLIPSIBLINGS | \
  2293. WS_CLIPCHILDREN | \
  2294. WS_MAXIMIZE | \
  2295. WS_CAPTION | \
  2296. WS_BORDER | \
  2297. WS_DLGFRAME | \
  2298. WS_VSCROLL | \
  2299. WS_HSCROLL | \
  2300. WS_SYSMENU | \
  2301. WS_THICKFRAME | \
  2302. WS_GROUP | \
  2303. WS_TABSTOP | \
  2304. WS_MINIMIZEBOX | \
  2305. WS_MAXIMIZEBOX)
  2306. ;end_internal_NT
  2307. /*
  2308. * Extended Window Styles
  2309. */
  2310. #define WS_EX_DLGMODALFRAME 0x00000001L
  2311. #define WS_EX_DRAGOBJECT 0x00000002L ;internal
  2312. #define WS_EX_NOPARENTNOTIFY 0x00000004L
  2313. #define WS_EX_TOPMOST 0x00000008L
  2314. #define WS_EX_ACCEPTFILES 0x00000010L
  2315. #define WS_EX_TRANSPARENT 0x00000020L
  2316. ;begin_winver_400
  2317. #define WS_EX_MDICHILD 0x00000040L
  2318. #define WS_EX_TOOLWINDOW 0x00000080L
  2319. #define WS_EX_WINDOWEDGE 0x00000100L
  2320. #define WS_EX_CLIENTEDGE 0x00000200L
  2321. #define WS_EX_CONTEXTHELP 0x00000400L
  2322. ;end_winver_400
  2323. ;begin_internal
  2324. ;begin_winver_501
  2325. #define WS_EXP_GHOSTMAKEVISIBLE 0x00000800L
  2326. ;end_winver_501
  2327. ;end_internal
  2328. ;begin_winver_400
  2329. #define WS_EX_RIGHT 0x00001000L
  2330. #define WS_EX_LEFT 0x00000000L
  2331. #define WS_EX_RTLREADING 0x00002000L
  2332. #define WS_EX_LTRREADING 0x00000000L
  2333. #define WS_EX_LEFTSCROLLBAR 0x00004000L
  2334. #define WS_EX_RIGHTSCROLLBAR 0x00000000L
  2335. #define WS_EX_CONTROLPARENT 0x00010000L
  2336. #define WS_EX_STATICEDGE 0x00020000L
  2337. #define WS_EX_APPWINDOW 0x00040000L
  2338. #define WS_EX_ANSICREATOR 0x80000000L ;internal
  2339. #define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
  2340. #define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
  2341. ;end_winver_400
  2342. ;begin_if_(_WIN32_WINNT)_500
  2343. #define WS_EX_LAYERED 0x00080000
  2344. ;begin_internal_501
  2345. #ifdef REDIRECTION
  2346. #define WS_EX_EXTREDIRECTED 0x01000000L
  2347. #endif // REDIRECTION
  2348. ;end_internal_501
  2349. ;begin_internal
  2350. /*
  2351. * These are not extended styles but rather state bits.
  2352. * We use these bit positions to delay the addition of a new
  2353. * state DWORD in the window structure.
  2354. */
  2355. #define WS_EXP_UIFOCUSHIDDEN 0x80000000
  2356. #define WS_EXP_UIACCELHIDDEN 0x40000000
  2357. #define WS_EXP_REDIRECTED 0x20000000
  2358. #define WS_EXP_COMPOSITING 0x10000000
  2359. ;end_internal
  2360. ;end_if_(_WIN32_WINNT)_500
  2361. #define WS_EXP_UIACTIVE 0x04000000L ;internal // UISF_ACTIVE bit
  2362. ;begin_internal
  2363. #define WS_EXP_UIVALID (WS_EXP_UIFOCUSHIDDEN | \
  2364. WS_EXP_UIACCELHIDDEN | \
  2365. WS_EXP_UIACTIVE)
  2366. #define WS_EXP_PRIVATE (WS_EXP_UIFOCUSHIDDEN | \
  2367. WS_EXP_UIACCELHIDDEN | \
  2368. WS_EXP_REDIRECTED | \
  2369. WS_EXP_COMPOSITING | \
  2370. WS_EXP_UIACTIVE | \
  2371. WS_EXP_GHOSTMAKEVISIBLE)
  2372. ;end_internal
  2373. ;begin_internal
  2374. /*
  2375. * RTL Mirroring Extended Styles (RTL_MIRRORING)
  2376. */
  2377. ;end_internal
  2378. ;begin_winver_500
  2379. #define WS_EX_NOINHERITLAYOUT 0x00100000L // Disable inheritence of mirroring by children
  2380. #define WS_EX_LAYOUTVBHRESERVED 0x00200000L ;internal // Reserved for vertical before horizontal lettering
  2381. #define WS_EX_LAYOUTRTL 0x00400000L // Right to left mirroring
  2382. #define WS_EX_LAYOUTBTTRESERVED 0x00800000L ;internal // Reserved for bottom to top mirroring
  2383. ;end_winver_500
  2384. ;begin_if_(_WIN32_WINNT)_500
  2385. #define WS_EX_COMPOSITED 0x02000000L
  2386. #define WS_EX_NOACTIVATE 0x08000000L
  2387. ;end_if_(_WIN32_WINNT)_500
  2388. ;begin_internal_NT
  2389. #define WS_EX_ALLEXSTYLES (WS_EX_TRANSPARENT | WS_EX_DLGMODALFRAME | WS_EX_DRAGOBJECT | WS_EX_NOPARENTNOTIFY | WS_EX_TOPMOST | WS_EX_ACCEPTFILES | WS_EX_COMPOSITED)
  2390. #define WS_EX_VALID (WS_EX_DLGMODALFRAME | \
  2391. WS_EX_DRAGOBJECT | \
  2392. WS_EX_NOPARENTNOTIFY | \
  2393. WS_EX_TOPMOST | \
  2394. WS_EX_ACCEPTFILES | \
  2395. WS_EX_TRANSPARENT | \
  2396. WS_EX_ALLEXSTYLES)
  2397. #define WS_EX_VALID40 (WS_EX_VALID | \
  2398. WS_EX_MDICHILD | \
  2399. WS_EX_WINDOWEDGE | \
  2400. WS_EX_CLIENTEDGE | \
  2401. WS_EX_CONTEXTHELP | \
  2402. WS_EX_TOOLWINDOW | \
  2403. WS_EX_RIGHT | \
  2404. WS_EX_LEFT | \
  2405. WS_EX_RTLREADING | \
  2406. WS_EX_LEFTSCROLLBAR | \
  2407. WS_EX_CONTROLPARENT | \
  2408. WS_EX_STATICEDGE | \
  2409. WS_EX_APPWINDOW)
  2410. #ifdef REDIRECTION
  2411. #define WS_EX_VALID50 (WS_EX_VALID40 | \
  2412. WS_EX_LAYERED | \
  2413. WS_EX_NOINHERITLAYOUT| \
  2414. WS_EX_LAYOUTRTL | \
  2415. WS_EX_COMPOSITED | \
  2416. WS_EX_NOACTIVATE | \
  2417. WS_EX_EXTREDIRECTED)
  2418. #else
  2419. #define WS_EX_VALID50 (WS_EX_VALID40 | \
  2420. WS_EX_LAYERED | \
  2421. WS_EX_NOINHERITLAYOUT| \
  2422. WS_EX_LAYOUTRTL | \
  2423. WS_EX_COMPOSITED | \
  2424. WS_EX_NOACTIVATE)
  2425. #endif // REDIRECTION
  2426. #define WS_EX_INTERNAL (WS_EX_DRAGOBJECT | \
  2427. WS_EX_ANSICREATOR)
  2428. /*
  2429. * We currently return to applications only the valid Ex_Style bits.
  2430. * If declaring another macro i.e. WS_EX_VALID60, make sure to change WS_EX_ALLVALID
  2431. */
  2432. #define WS_EX_ALLVALID WS_EX_VALID50
  2433. ;end_internal_NT
  2434. ;begin_internal_NT
  2435. #define WF_DIALOG_WINDOW 0x00010000 // used in WOW32 -- this is a state flag, not a style flag
  2436. ;end_internal_NT
  2437. /*
  2438. * Class styles
  2439. */
  2440. #define CS_VREDRAW 0x0001
  2441. #define CS_HREDRAW 0x0002
  2442. #define CS_KEYCVTWINDOW 0x0004 ;internal // unused
  2443. #define CS_DBLCLKS 0x0008
  2444. #define CS_OEMCHARS 0x0010 /* reserved (see user\server\usersrv.h) */ ;internal
  2445. #define CS_OWNDC 0x0020
  2446. #define CS_CLASSDC 0x0040
  2447. #define CS_PARENTDC 0x0080
  2448. #define CS_NOKEYCVT 0x0100 ;internal // unused
  2449. #define CS_NOCLOSE 0x0200
  2450. #define CS_LVB 0x0400 ;internal
  2451. #define CS_SAVEBITS 0x0800
  2452. #define CS_BYTEALIGNCLIENT 0x1000
  2453. #define CS_BYTEALIGNWINDOW 0x2000
  2454. #define CS_GLOBALCLASS 0x4000
  2455. #define CS_SYSTEM 0x8000 ;internal
  2456. #define CS_IME 0x00010000
  2457. ;begin_if_(_WIN32_WINNT)_501
  2458. #define CS_DROPSHADOW 0x00020000
  2459. ;end_if_(_WIN32_WINNT)_501
  2460. ;begin_internal_NT
  2461. #define CS_VALID (CS_VREDRAW | \
  2462. CS_HREDRAW | \
  2463. CS_KEYCVTWINDOW | \
  2464. CS_DBLCLKS | \
  2465. CS_OEMCHARS | \
  2466. CS_OWNDC | \
  2467. CS_CLASSDC | \
  2468. CS_PARENTDC | \
  2469. CS_NOKEYCVT | \
  2470. CS_NOCLOSE | \
  2471. CS_SAVEBITS | \
  2472. CS_BYTEALIGNCLIENT | \
  2473. CS_BYTEALIGNWINDOW | \
  2474. CS_GLOBALCLASS | \
  2475. CS_DROPSHADOW | \
  2476. CS_IME)
  2477. ;end_internal_NT
  2478. ;begin_internal_cairo
  2479. #define CS_VALID31 0x0800ffef
  2480. #define CS_VALID40 0x0803feeb
  2481. ;end_internal_cairo
  2482. ;end_rwinuser
  2483. #endif /* !NOWINSTYLES */
  2484. ;begin_winver_400
  2485. /* WM_PRINT flags */
  2486. #define PRF_CHECKVISIBLE 0x00000001L
  2487. #define PRF_NONCLIENT 0x00000002L
  2488. #define PRF_CLIENT 0x00000004L
  2489. #define PRF_ERASEBKGND 0x00000008L
  2490. #define PRF_CHILDREN 0x00000010L
  2491. #define PRF_OWNED 0x00000020L
  2492. /* 3D border styles */
  2493. #define BDR_RAISEDOUTER 0x0001
  2494. #define BDR_SUNKENOUTER 0x0002
  2495. #define BDR_RAISEDINNER 0x0004
  2496. #define BDR_SUNKENINNER 0x0008
  2497. #define BDR_OUTER (BDR_RAISEDOUTER | BDR_SUNKENOUTER)
  2498. #define BDR_INNER (BDR_RAISEDINNER | BDR_SUNKENINNER)
  2499. #define BDR_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  2500. #define BDR_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  2501. #define BDR_VALID 0x000F ;internal
  2502. #define EDGE_RAISED (BDR_RAISEDOUTER | BDR_RAISEDINNER)
  2503. #define EDGE_SUNKEN (BDR_SUNKENOUTER | BDR_SUNKENINNER)
  2504. #define EDGE_ETCHED (BDR_SUNKENOUTER | BDR_RAISEDINNER)
  2505. #define EDGE_BUMP (BDR_RAISEDOUTER | BDR_SUNKENINNER)
  2506. /* Border flags */
  2507. #define BF_LEFT 0x0001
  2508. #define BF_TOP 0x0002
  2509. #define BF_RIGHT 0x0004
  2510. #define BF_BOTTOM 0x0008
  2511. #define BF_TOPLEFT (BF_TOP | BF_LEFT)
  2512. #define BF_TOPRIGHT (BF_TOP | BF_RIGHT)
  2513. #define BF_BOTTOMLEFT (BF_BOTTOM | BF_LEFT)
  2514. #define BF_BOTTOMRIGHT (BF_BOTTOM | BF_RIGHT)
  2515. #define BF_RECT (BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM)
  2516. #define BF_DIAGONAL 0x0010
  2517. // For diagonal lines, the BF_RECT flags specify the end point of the
  2518. // vector bounded by the rectangle parameter.
  2519. #define BF_DIAGONAL_ENDTOPRIGHT (BF_DIAGONAL | BF_TOP | BF_RIGHT)
  2520. #define BF_DIAGONAL_ENDTOPLEFT (BF_DIAGONAL | BF_TOP | BF_LEFT)
  2521. #define BF_DIAGONAL_ENDBOTTOMLEFT (BF_DIAGONAL | BF_BOTTOM | BF_LEFT)
  2522. #define BF_DIAGONAL_ENDBOTTOMRIGHT (BF_DIAGONAL | BF_BOTTOM | BF_RIGHT)
  2523. #define BF_MIDDLE 0x0800 /* Fill in the middle */
  2524. #define BF_SOFT 0x1000 /* For softer buttons */
  2525. #define BF_ADJUST 0x2000 /* Calculate the space left over */
  2526. #define BF_FLAT 0x4000 /* For flat rather than 3D borders */
  2527. #define BF_MONO 0x8000 /* For monochrome borders */
  2528. #define BF_VALID (BF_MIDDLE | \ ;internal_cairo
  2529. BF_SOFT | \ ;internal_cairo
  2530. BF_ADJUST | \ ;internal_cairo
  2531. BF_FLAT | \ ;internal_cairo
  2532. BF_MONO | \ ;internal_cairo
  2533. BF_LEFT | \ ;internal_cairo
  2534. BF_TOP | \ ;internal_cairo
  2535. BF_RIGHT | \ ;internal_cairo
  2536. BF_BOTTOM | \ ;internal_cairo
  2537. BF_DIAGONAL) ;internal_cairo
  2538. WINUSERAPI
  2539. BOOL
  2540. WINAPI
  2541. DrawEdge(
  2542. IN HDC hdc,
  2543. IN OUT LPRECT qrc,
  2544. IN UINT edge,
  2545. IN UINT grfFlags);
  2546. /* flags for DrawFrameControl */
  2547. #define DFC_CAPTION 1
  2548. #define DFC_MENU 2
  2549. #define DFC_SCROLL 3
  2550. #define DFC_BUTTON 4
  2551. ;begin_winver_500
  2552. #define DFC_POPUPMENU 5
  2553. ;end_winver_500
  2554. #define DFC_CACHE 0xFFFF ;internal
  2555. #define DFCS_CAPTIONCLOSE 0x0000
  2556. #define DFCS_CAPTIONMIN 0x0001
  2557. #define DFCS_CAPTIONMAX 0x0002
  2558. #define DFCS_CAPTIONRESTORE 0x0003
  2559. #define DFCS_CAPTIONHELP 0x0004
  2560. #define DFCS_CAPTIONALL 0x000F ;internal_500
  2561. #define DFCS_INMENU 0x0040 ;internal
  2562. #define DFCS_INSMALL 0x0080 ;internal
  2563. #define DFCS_MENUARROW 0x0000
  2564. #define DFCS_MENUCHECK 0x0001
  2565. #define DFCS_MENUBULLET 0x0002
  2566. #define DFCS_MENUARROWRIGHT 0x0004
  2567. #define DFCS_MENUARROWUP 0x0008 ;internal_500
  2568. #define DFCS_MENUARROWDOWN 0x0010 ;internal_500
  2569. #define DFCS_SCROLLMIN 0x0000 ;internal
  2570. #define DFCS_SCROLLVERT 0x0000 ;internal
  2571. #define DFCS_SCROLLMAX 0x0001 ;internal
  2572. #define DFCS_SCROLLHORZ 0x0002 ;internal
  2573. #define DFCS_SCROLLLINE 0x0004 ;internal
  2574. ;internal
  2575. #define DFCS_SCROLLUP 0x0000
  2576. #define DFCS_SCROLLDOWN 0x0001
  2577. #define DFCS_SCROLLLEFT 0x0002
  2578. #define DFCS_SCROLLRIGHT 0x0003
  2579. #define DFCS_SCROLLCOMBOBOX 0x0005
  2580. #define DFCS_SCROLLSIZEGRIP 0x0008
  2581. #define DFCS_SCROLLSIZEGRIPRIGHT 0x0010
  2582. #define DFCS_BUTTONCHECK 0x0000
  2583. #define DFCS_BUTTONRADIOIMAGE 0x0001
  2584. #define DFCS_BUTTONRADIOMASK 0x0002
  2585. #define DFCS_BUTTONRADIO 0x0004
  2586. #define DFCS_BUTTON3STATE 0x0008
  2587. #define DFCS_BUTTONPUSH 0x0010
  2588. #define DFCS_CACHEICON 0x0000 ;internal
  2589. #define DFCS_CACHEBUTTONS 0x0001 ;internal
  2590. ;internal
  2591. #define DFCS_INACTIVE 0x0100
  2592. #define DFCS_PUSHED 0x0200
  2593. #define DFCS_CHECKED 0x0400
  2594. ;begin_winver_500
  2595. #define DFCS_TRANSPARENT 0x0800
  2596. #define DFCS_HOT 0x1000
  2597. ;end_winver_500
  2598. #define DFCS_ADJUSTRECT 0x2000
  2599. #define DFCS_FLAT 0x4000
  2600. #define DFCS_MONO 0x8000
  2601. WINUSERAPI
  2602. BOOL
  2603. WINAPI
  2604. DrawFrameControl(
  2605. IN HDC,
  2606. IN OUT LPRECT,
  2607. IN UINT,
  2608. IN UINT);
  2609. ;begin_internal_501
  2610. ;begin_if_(_WIN32_WINNT)_501
  2611. typedef BOOL (CALLBACK* DRAWFRAMECONTROLPROC)(
  2612. IN HDC,
  2613. IN OUT LPRECT,
  2614. IN UINT,
  2615. IN UINT);
  2616. ;end_if_(_WIN32_WINNT)_501
  2617. ;end_internal_501
  2618. /* flags for DrawCaption */
  2619. #define DC_ACTIVE 0x0001
  2620. #define DC_SMALLCAP 0x0002
  2621. #define DC_ICON 0x0004
  2622. #define DC_TEXT 0x0008
  2623. #define DC_INBUTTON 0x0010
  2624. ;begin_winver_500
  2625. #define DC_GRADIENT 0x0020
  2626. ;end_winver_500
  2627. #define DC_LAMEBUTTON 0x0400 ;internal
  2628. #define DC_NOVISIBLE 0x0800 ;internal
  2629. ;begin_if_(_WIN32_WINNT)_501
  2630. #define DC_BUTTONS 0x1000
  2631. ;end_if_(_WIN32_WINNT)_501
  2632. #define DC_NOSENDMSG 0x2000 ;internal
  2633. #define DC_CENTER 0x4000 ;internal
  2634. #define DC_FRAME 0x8000 ;internal
  2635. #define DC_CAPTION (DC_ICON | DC_TEXT | DC_BUTTONS) ;internal
  2636. #define DC_NC (DC_CAPTION | DC_FRAME) ;internal
  2637. ;begin_internal_501
  2638. /* flags for WM_NCUAHDRAWFRAME */
  2639. ;begin_if_(_WIN32_WINNT)_501
  2640. #define DF_ACTIVE 0x0001
  2641. #define DF_HUNGREDRAW 0x2000
  2642. ;end_if_(_WIN32_WINNT)_501
  2643. ;end_internal_501
  2644. WINUSERAPI
  2645. BOOL
  2646. WINAPI
  2647. DrawCaption(IN HWND, IN HDC, IN CONST RECT *, IN UINT);
  2648. ;begin_internal_501
  2649. ;begin_if_(_WIN32_WINNT)_501
  2650. typedef BOOL (CALLBACK* DRAWCAPTIONPROC)(
  2651. IN HWND,
  2652. IN HDC,
  2653. IN CONST RECT *,
  2654. IN UINT);
  2655. ;end_if_(_WIN32_WINNT)_501
  2656. ;end_internal_501
  2657. ;begin_internal
  2658. WINUSERAPI
  2659. BOOL
  2660. WINAPI
  2661. DrawCaptionTemp%(
  2662. IN HWND,
  2663. IN HDC,
  2664. IN LPCRECT,
  2665. IN HFONT,
  2666. IN HICON,
  2667. IN LPCTSTR%,
  2668. IN UINT);
  2669. ;end_internal
  2670. #define IDANI_OPEN 1
  2671. #define IDANI_CLOSE 2 ;internal_500
  2672. #define IDANI_CAPTION 3
  2673. WINUSERAPI
  2674. BOOL
  2675. WINAPI
  2676. DrawAnimatedRects(
  2677. IN HWND hwnd,
  2678. IN int idAni,
  2679. IN CONST RECT * lprcFrom,
  2680. IN CONST RECT * lprcTo);
  2681. ;end_winver_400
  2682. #ifndef NOCLIPBOARD
  2683. ;begin_rwinuser
  2684. /*
  2685. * Predefined Clipboard Formats
  2686. */
  2687. #define CF_FIRST 0 ;internal
  2688. #define CF_TEXT 1
  2689. #define CF_BITMAP 2
  2690. #define CF_METAFILEPICT 3
  2691. #define CF_SYLK 4
  2692. #define CF_DIF 5
  2693. #define CF_TIFF 6
  2694. #define CF_OEMTEXT 7
  2695. #define CF_DIB 8
  2696. #define CF_PALETTE 9
  2697. #define CF_PENDATA 10
  2698. #define CF_RIFF 11
  2699. #define CF_WAVE 12
  2700. #define CF_UNICODETEXT 13
  2701. #define CF_ENHMETAFILE 14
  2702. ;begin_winver_400
  2703. #define CF_HDROP 15
  2704. #define CF_LOCALE 16
  2705. ;end_winver_400
  2706. ;begin_winver_500
  2707. #define CF_DIBV5 17
  2708. ;end_winver_500
  2709. #if(WINVER >= 0x0500)
  2710. #define CF_MAX 18
  2711. #elif(WINVER >= 0x0400)
  2712. #define CF_MAX 17
  2713. #else
  2714. #define CF_MAX 15
  2715. #endif
  2716. #define CF_OWNERDISPLAY 0x0080
  2717. #define CF_DSPTEXT 0x0081
  2718. #define CF_DSPBITMAP 0x0082
  2719. #define CF_DSPMETAFILEPICT 0x0083
  2720. #define CF_DSPENHMETAFILE 0x008E
  2721. /*
  2722. * "Private" formats don't get GlobalFree()'d
  2723. */
  2724. #define CF_PRIVATEFIRST 0x0200
  2725. #define CF_PRIVATELAST 0x02FF
  2726. /*
  2727. * "GDIOBJ" formats do get DeleteObject()'d
  2728. */
  2729. #define CF_GDIOBJFIRST 0x0300
  2730. #define CF_GDIOBJLAST 0x03FF
  2731. ;end_rwinuser
  2732. #endif /* !NOCLIPBOARD */
  2733. /*
  2734. * Defines for the fVirt field of the Accelerator table structure.
  2735. */
  2736. #define FVIRTKEY TRUE /* Assumed to be == TRUE */
  2737. #define FNOINVERT 0x02
  2738. #define FSHIFT 0x04
  2739. #define FCONTROL 0x08
  2740. #define FALT 0x10
  2741. typedef struct tagACCEL {
  2742. #ifndef _MAC
  2743. BYTE fVirt; /* Also called the flags field */
  2744. WORD key;
  2745. WORD cmd;
  2746. #else
  2747. WORD fVirt; /* Also called the flags field */
  2748. WORD key;
  2749. DWORD cmd;
  2750. #endif
  2751. } ACCEL, *LPACCEL;
  2752. typedef struct tagPAINTSTRUCT {
  2753. HDC hdc;
  2754. BOOL fErase;
  2755. RECT rcPaint;
  2756. BOOL fRestore;
  2757. BOOL fIncUpdate;
  2758. BYTE rgbReserved[32];
  2759. } PAINTSTRUCT, *PPAINTSTRUCT, *NPPAINTSTRUCT, *LPPAINTSTRUCT;
  2760. typedef struct tagCREATESTRUCT% {
  2761. LPVOID lpCreateParams;
  2762. HINSTANCE hInstance;
  2763. HMENU hMenu;
  2764. HWND hwndParent;
  2765. int cy;
  2766. int cx;
  2767. int y;
  2768. int x;
  2769. LONG style;
  2770. LPCTSTR% lpszName;
  2771. LPCTSTR% lpszClass;
  2772. DWORD dwExStyle;
  2773. } CREATESTRUCT%, *LPCREATESTRUCT%;
  2774. typedef struct tagWINDOWPLACEMENT {
  2775. UINT length;
  2776. UINT flags;
  2777. UINT showCmd;
  2778. POINT ptMinPosition;
  2779. POINT ptMaxPosition;
  2780. RECT rcNormalPosition;
  2781. #ifdef _MAC
  2782. RECT rcDevice;
  2783. #endif
  2784. } WINDOWPLACEMENT;
  2785. typedef WINDOWPLACEMENT *PWINDOWPLACEMENT, *LPWINDOWPLACEMENT;
  2786. #define WPF_SETMINPOSITION 0x0001
  2787. #define WPF_RESTORETOMAXIMIZED 0x0002
  2788. ;begin_if_(_WIN32_WINNT)_500
  2789. #define WPF_ASYNCWINDOWPLACEMENT 0x0004
  2790. ;end_if_(_WIN32_WINNT)_500
  2791. ;begin_winver_400
  2792. typedef struct tagNMHDR
  2793. {
  2794. HWND hwndFrom;
  2795. UINT_PTR idFrom;
  2796. UINT code; // NM_ code
  2797. } NMHDR;
  2798. typedef NMHDR FAR * LPNMHDR;
  2799. typedef struct tagSTYLESTRUCT
  2800. {
  2801. DWORD styleOld;
  2802. DWORD styleNew;
  2803. } STYLESTRUCT, * LPSTYLESTRUCT;
  2804. ;end_winver_400
  2805. ;begin_internal_NT
  2806. #define WPF_VALID (WPF_SETMINPOSITION | \
  2807. WPF_RESTORETOMAXIMIZED)
  2808. ;end_internal_NT
  2809. /*
  2810. * Owner draw control types
  2811. */
  2812. #define ODT_MENU 1
  2813. #define ODT_LISTBOX 2
  2814. #define ODT_COMBOBOX 3
  2815. #define ODT_BUTTON 4
  2816. ;begin_winver_400
  2817. #define ODT_STATIC 5
  2818. ;end_winver_400
  2819. /*
  2820. * Owner draw actions
  2821. */
  2822. #define ODA_DRAWENTIRE 0x0001
  2823. #define ODA_SELECT 0x0002
  2824. #define ODA_FOCUS 0x0004
  2825. /*
  2826. * Owner draw state
  2827. */
  2828. #define ODS_SELECTED 0x0001
  2829. #define ODS_GRAYED 0x0002
  2830. #define ODS_DISABLED 0x0004
  2831. #define ODS_CHECKED 0x0008
  2832. #define ODS_FOCUS 0x0010
  2833. ;begin_winver_400
  2834. #define ODS_DEFAULT 0x0020
  2835. #define ODS_COMBOBOXEDIT 0x1000
  2836. ;end_winver_400
  2837. ;begin_winver_500
  2838. #define ODS_HOTLIGHT 0x0040
  2839. #define ODS_INACTIVE 0x0080
  2840. ;begin_if_(_WIN32_WINNT)_500
  2841. #define ODS_NOACCEL 0x0100
  2842. #define ODS_NOFOCUSRECT 0x0200
  2843. ;end_if_(_WIN32_WINNT)_500
  2844. ;end_winver_500
  2845. /*
  2846. * MEASUREITEMSTRUCT for ownerdraw
  2847. */
  2848. typedef struct tagMEASUREITEMSTRUCT {
  2849. UINT CtlType;
  2850. UINT CtlID;
  2851. UINT itemID;
  2852. UINT itemWidth;
  2853. UINT itemHeight;
  2854. ULONG_PTR itemData;
  2855. } MEASUREITEMSTRUCT, NEAR *PMEASUREITEMSTRUCT, FAR *LPMEASUREITEMSTRUCT;
  2856. ;begin_internal_NT
  2857. /*
  2858. * MEASUREITEMSTRUCT_EX for ownerdraw
  2859. * used when server initiates a WM_MEASUREITEM and adds the additional info
  2860. * of whether the itemData needs to be thunked when the message is sent to
  2861. * the client (see also WM_MEASUREITEM_CLIENTDATA
  2862. */
  2863. typedef struct tagMEASUREITEMSTRUCT_EX {
  2864. UINT CtlType;
  2865. UINT CtlID;
  2866. UINT itemID;
  2867. UINT itemWidth;
  2868. UINT itemHeight;
  2869. ULONG_PTR itemData;
  2870. BOOL bThunkClientData;
  2871. } MEASUREITEMSTRUCT_EX, NEAR *PMEASUREITEMSTRUCT_EX, FAR *LPMEASUREITEMSTRUCT_EX;
  2872. ;end_internal_NT
  2873. /*
  2874. * DRAWITEMSTRUCT for ownerdraw
  2875. */
  2876. typedef struct tagDRAWITEMSTRUCT {
  2877. UINT CtlType;
  2878. UINT CtlID;
  2879. UINT itemID;
  2880. UINT itemAction;
  2881. UINT itemState;
  2882. HWND hwndItem;
  2883. HDC hDC;
  2884. RECT rcItem;
  2885. ULONG_PTR itemData;
  2886. } DRAWITEMSTRUCT, NEAR *PDRAWITEMSTRUCT, FAR *LPDRAWITEMSTRUCT;
  2887. /*
  2888. * DELETEITEMSTRUCT for ownerdraw
  2889. */
  2890. typedef struct tagDELETEITEMSTRUCT {
  2891. UINT CtlType;
  2892. UINT CtlID;
  2893. UINT itemID;
  2894. HWND hwndItem;
  2895. ULONG_PTR itemData;
  2896. } DELETEITEMSTRUCT, NEAR *PDELETEITEMSTRUCT, FAR *LPDELETEITEMSTRUCT;
  2897. /*
  2898. * COMPAREITEMSTUCT for ownerdraw sorting
  2899. */
  2900. typedef struct tagCOMPAREITEMSTRUCT {
  2901. UINT CtlType;
  2902. UINT CtlID;
  2903. HWND hwndItem;
  2904. UINT itemID1;
  2905. ULONG_PTR itemData1;
  2906. UINT itemID2;
  2907. ULONG_PTR itemData2;
  2908. DWORD dwLocaleId;
  2909. } COMPAREITEMSTRUCT, NEAR *PCOMPAREITEMSTRUCT, FAR *LPCOMPAREITEMSTRUCT;
  2910. #ifndef NOMSG
  2911. /*
  2912. * Message Function Templates
  2913. */
  2914. WINUSERAPI
  2915. BOOL
  2916. WINAPI
  2917. GetMessage%(
  2918. OUT LPMSG lpMsg,
  2919. IN HWND hWnd,
  2920. IN UINT wMsgFilterMin,
  2921. IN UINT wMsgFilterMax);
  2922. ;begin_internal_501
  2923. typedef BOOL (CALLBACK* INTERNALGETMESSAGEPROC)(OUT LPMSG lpMsg, IN HWND hwnd,
  2924. IN UINT wMsgFilterMin, IN UINT wMsgFilterMax, IN UINT flags, IN BOOL fGetMessage);
  2925. ;end_internal_501
  2926. WINUSERAPI
  2927. BOOL
  2928. WINAPI
  2929. TranslateMessage(
  2930. IN CONST MSG *lpMsg);
  2931. WINUSERAPI
  2932. LRESULT
  2933. WINAPI
  2934. DispatchMessage%(
  2935. IN CONST MSG *lpMsg);
  2936. WINUSERAPI
  2937. BOOL
  2938. WINAPI
  2939. SetMessageQueue(
  2940. IN int cMessagesMax);
  2941. WINUSERAPI
  2942. BOOL
  2943. WINAPI
  2944. PeekMessage%(
  2945. OUT LPMSG lpMsg,
  2946. IN HWND hWnd,
  2947. IN UINT wMsgFilterMin,
  2948. IN UINT wMsgFilterMax,
  2949. IN UINT wRemoveMsg);
  2950. /*
  2951. * PeekMessage() Options
  2952. */
  2953. #define PM_NOREMOVE 0x0000
  2954. #define PM_REMOVE 0x0001
  2955. #define PM_NOYIELD 0x0002
  2956. ;begin_winver_500
  2957. #define PM_QS_INPUT (QS_INPUT << 16)
  2958. #define PM_QS_POSTMESSAGE ((QS_POSTMESSAGE | QS_HOTKEY | QS_TIMER) << 16)
  2959. #define PM_QS_PAINT (QS_PAINT << 16)
  2960. #define PM_QS_SENDMESSAGE (QS_SENDMESSAGE << 16)
  2961. ;end_winver_500
  2962. ;begin_internal_NT
  2963. #define PM_VALID (PM_NOREMOVE | \
  2964. PM_REMOVE | \
  2965. PM_NOYIELD | \
  2966. PM_QS_INPUT | \
  2967. PM_QS_POSTMESSAGE | \
  2968. PM_QS_PAINT | \
  2969. PM_QS_SENDMESSAGE)
  2970. ;end_internal_NT
  2971. #endif /* !NOMSG */
  2972. WINUSERAPI
  2973. BOOL
  2974. WINAPI
  2975. RegisterHotKey(
  2976. IN HWND hWnd,
  2977. IN int id,
  2978. IN UINT fsModifiers,
  2979. IN UINT vk);
  2980. WINUSERAPI
  2981. BOOL
  2982. WINAPI
  2983. UnregisterHotKey(
  2984. IN HWND hWnd,
  2985. IN int id);
  2986. #define MOD_ALT 0x0001
  2987. #define MOD_CONTROL 0x0002
  2988. #define MOD_SHIFT 0x0004
  2989. #define MOD_WIN 0x0008
  2990. #define MOD_SAS 0x8000 ; internal
  2991. #define MOD_VALID (MOD_ALT|MOD_CONTROL|MOD_SHIFT|MOD_WIN|MOD_SAS) ; internal_NT
  2992. #define IDHOT_SNAPWINDOW (-1) /* SHIFT-PRINTSCRN */
  2993. #define IDHOT_SNAPDESKTOP (-2) /* PRINTSCRN */
  2994. #ifdef WIN_INTERNAL
  2995. #ifndef LSTRING
  2996. #define NOLSTRING
  2997. #endif /* LSTRING */
  2998. #ifndef LFILEIO
  2999. #define NOLFILEIO
  3000. #endif /* LFILEIO */
  3001. #endif /* WIN_INTERNAL */
  3002. ;begin_winver_400
  3003. #define EW_RESTARTWINDOWS 0x0042L ;internal // used by old shell apps
  3004. #define EW_REBOOTSYSTEM 0x0043L ;internal // used by old shell apps
  3005. #define ENDSESSION_LOGOFF 0x80000000
  3006. ;end_winver_400
  3007. #define EWX_LOGOFF 0
  3008. #define EWX_SHUTDOWN 0x00000001
  3009. #define EWX_REBOOT 0x00000002
  3010. #define EWX_FORCE 0x00000004
  3011. #define EWX_POWEROFF 0x00000008
  3012. #define EWX_FORCEIFHUNG 0x00000010 ;if_(_WIN32_WINNT)_500
  3013. #define EWX_REALLYLOGOFF ENDSESSION_LOGOFF ;internal
  3014. #define EWX_CANCELED 0x00000080 ; internal_NT
  3015. #define EWX_SYSTEM_CALLER 0x00000100 ; internal_NT
  3016. #define EWX_WINLOGON_CALLER 0x00000200 ; internal_NT
  3017. #define EWX_WINLOGON_OLD_SYSTEM 0x00000400 ; internal_NT
  3018. #define EWX_WINLOGON_OLD_SHUTDOWN 0x00000800 ; internal_NT
  3019. #define EWX_WINLOGON_OLD_REBOOT 0x00001000 ; internal_NT
  3020. #define EWX_WINLOGON_API_SHUTDOWN 0x00002000 ; internal_NT
  3021. #define EWX_WINLOGON_OLD_POWEROFF 0x00004000 ; internal_NT
  3022. #define EWX_NOTIFY 0x00008000 ; internal_NT
  3023. #define EWX_NONOTIFY 0x00010000 ; internal_NT
  3024. #define EWX_WINLOGON_INITIATED 0x00020000 ; internal_NT
  3025. #define EWX_TERMSRV_INITIATED 0x00040000 ; internal_NT
  3026. ;begin_internal_NT
  3027. #define EWX_VALID (EWX_LOGOFF | \
  3028. EWX_SHUTDOWN | \
  3029. EWX_REBOOT | \
  3030. EWX_FORCE | \
  3031. EWX_POWEROFF | \
  3032. EWX_FORCEIFHUNG | \
  3033. EWX_NOTIFY | \
  3034. EWX_TERMSRV_INITIATED)
  3035. ;end_internal_NT
  3036. ;begin_internal_NT
  3037. #define SHUTDOWN_FLAGS (EWX_SHUTDOWN | EWX_REBOOT | EWX_POWEROFF | \
  3038. EWX_WINLOGON_OLD_SHUTDOWN | EWX_WINLOGON_OLD_REBOOT | \
  3039. EWX_WINLOGON_OLD_POWEROFF) ; internal_NT
  3040. ;end_internal_NT
  3041. ;begin_internal_501
  3042. /*
  3043. * Shutdown logging stuff
  3044. */
  3045. #define SR_EVENT_INITIATE_CLEAN 1
  3046. #define SR_EVENT_INITIATE_CLEAN_ABORT 2
  3047. #define SR_EVENT_EXITWINDOWS 3
  3048. #define SR_EVENT_DIRTY 4
  3049. typedef struct _SHUTDOWN_REASON
  3050. {
  3051. UINT cbSize; /* Set to sizeof(SHUTDOWN_REASON) */
  3052. UINT uFlags; /* Shutdown flags; e.g., EWX_SHUTDOWN */
  3053. DWORD dwReasonCode; /* Optional field */
  3054. DWORD dwEventType; /* See #defines above */
  3055. BOOL fShutdownCancelled; /* Optional field */
  3056. LPWSTR lpszComment; /* Optional field */
  3057. } SHUTDOWN_REASON, *PSHUTDOWN_REASON;
  3058. WINUSERAPI
  3059. BOOL
  3060. WINAPI
  3061. RecordShutdownReason(
  3062. PSHUTDOWN_REASON psr);
  3063. WINUSERAPI
  3064. BOOL
  3065. WINAPI
  3066. DisplayExitWindowsWarnings(
  3067. UINT uExitWindowsFlags);
  3068. ;end_internal_501
  3069. #define ExitWindows(dwReserved, Code) ExitWindowsEx(EWX_LOGOFF, 0xFFFFFFFF)
  3070. WINUSERAPI
  3071. BOOL
  3072. WINAPI
  3073. ExitWindowsEx(
  3074. IN UINT uFlags,
  3075. IN DWORD dwReserved);
  3076. WINUSERAPI
  3077. BOOL
  3078. WINAPI
  3079. SwapMouseButton(
  3080. IN BOOL fSwap);
  3081. WINUSERAPI
  3082. DWORD
  3083. WINAPI
  3084. GetMessagePos(
  3085. VOID);
  3086. WINUSERAPI
  3087. LONG
  3088. WINAPI
  3089. GetMessageTime(
  3090. VOID);
  3091. WINUSERAPI
  3092. LPARAM
  3093. WINAPI
  3094. GetMessageExtraInfo(
  3095. VOID);
  3096. ;begin_winver_400
  3097. WINUSERAPI
  3098. LPARAM
  3099. WINAPI
  3100. SetMessageExtraInfo(
  3101. IN LPARAM lParam);
  3102. ;end_winver_400
  3103. WINUSERAPI
  3104. LRESULT
  3105. WINAPI
  3106. SendMessage%(
  3107. IN HWND hWnd,
  3108. IN UINT Msg,
  3109. IN WPARAM wParam,
  3110. IN LPARAM lParam);
  3111. WINUSERAPI
  3112. LRESULT
  3113. WINAPI
  3114. SendMessageTimeout%(
  3115. IN HWND hWnd,
  3116. IN UINT Msg,
  3117. IN WPARAM wParam,
  3118. IN LPARAM lParam,
  3119. IN UINT fuFlags,
  3120. IN UINT uTimeout,
  3121. OUT PDWORD_PTR lpdwResult);
  3122. WINUSERAPI
  3123. BOOL
  3124. WINAPI
  3125. SendNotifyMessage%(
  3126. IN HWND hWnd,
  3127. IN UINT Msg,
  3128. IN WPARAM wParam,
  3129. IN LPARAM lParam);
  3130. WINUSERAPI
  3131. BOOL
  3132. WINAPI
  3133. SendMessageCallback%(
  3134. IN HWND hWnd,
  3135. IN UINT Msg,
  3136. IN WPARAM wParam,
  3137. IN LPARAM lParam,
  3138. IN SENDASYNCPROC lpResultCallBack,
  3139. IN ULONG_PTR dwData);
  3140. ;begin_if_(_WIN32_WINNT)_501
  3141. typedef struct {
  3142. UINT cbSize;
  3143. HDESK hdesk;
  3144. HWND hwnd;
  3145. LUID luid;
  3146. } BSMINFO, *PBSMINFO;
  3147. WINUSERAPI
  3148. long
  3149. WINAPI
  3150. BroadcastSystemMessageEx%(
  3151. IN DWORD,
  3152. IN LPDWORD,
  3153. IN UINT,
  3154. IN WPARAM,
  3155. IN LPARAM,
  3156. OUT PBSMINFO);
  3157. ;end_if_(_WIN32_WINNT)_501
  3158. ;begin_winver_400
  3159. #if defined(_WIN32_WINNT)
  3160. WINUSERAPI
  3161. long
  3162. WINAPI
  3163. BroadcastSystemMessage%(
  3164. IN DWORD,
  3165. IN LPDWORD,
  3166. IN UINT,
  3167. IN WPARAM,
  3168. IN LPARAM);
  3169. #elif defined(_WIN32_WINDOWS)
  3170. // The Win95 version isn't A/W decorated
  3171. WINUSERAPI
  3172. long
  3173. WINAPI
  3174. BroadcastSystemMessage(
  3175. IN DWORD,
  3176. IN LPDWORD,
  3177. IN UINT,
  3178. IN WPARAM,
  3179. IN LPARAM);
  3180. #endif
  3181. //Broadcast Special Message Recipient list
  3182. #define BSM_ALLCOMPONENTS 0x00000000
  3183. #define BSM_VXDS 0x00000001
  3184. #define BSM_NETDRIVER 0x00000002
  3185. #define BSM_INSTALLABLEDRIVERS 0x00000004
  3186. #define BSM_APPLICATIONS 0x00000008
  3187. #define BSM_ALLDESKTOPS 0x00000010
  3188. #define BSM_COMPONENTS 0x0000000F ;internal
  3189. #define BSM_VALID 0x0000001F ;internal
  3190. //Broadcast Special Message Flags
  3191. #define BSF_QUERY 0x00000001
  3192. #define BSF_IGNORECURRENTTASK 0x00000002
  3193. #define BSF_FLUSHDISK 0x00000004
  3194. #define BSF_NOHANG 0x00000008
  3195. #define BSF_POSTMESSAGE 0x00000010
  3196. #define BSF_FORCEIFHUNG 0x00000020
  3197. #define BSF_NOTIMEOUTIFNOTHUNG 0x00000040
  3198. ;begin_if_(_WIN32_WINNT)_500
  3199. #define BSF_ALLOWSFW 0x00000080
  3200. #define BSF_SENDNOTIFYMESSAGE 0x00000100
  3201. ;end_if_(_WIN32_WINNT)_500
  3202. ;begin_if_(_WIN32_WINNT)_501
  3203. #define BSF_RETURNHDESK 0x00000200
  3204. #define BSF_LUID 0x00000400
  3205. ;end_if_(_WIN32_WINNT)_501
  3206. #define BSF_QUEUENOTIFYMESSAGE 0x20000000 ;internal
  3207. #define BSF_SYSTEMSHUTDOWN 0x40000000 ;internal
  3208. #define BSF_MSGSRV32OK 0x80000000 ;internal
  3209. #define BSF_VALID 0x000007FF ;internal
  3210. ;begin_internal
  3211. #define BSF_ASYNC (BSF_POSTMESSAGE | BSF_SENDNOTIFYMESSAGE)
  3212. ;end_internal
  3213. #define BROADCAST_QUERY_DENY 0x424D5144 // Return this value to deny a query.
  3214. ;end_winver_400
  3215. // RegisterDeviceNotification
  3216. ;begin_winver_500
  3217. typedef PVOID HDEVNOTIFY;
  3218. typedef HDEVNOTIFY *PHDEVNOTIFY;
  3219. #define DEVICE_NOTIFY_WINDOW_HANDLE 0x00000000
  3220. #define DEVICE_NOTIFY_SERVICE_HANDLE 0x00000001
  3221. ;begin_if_(_WIN32_WINNT)_501
  3222. #define DEVICE_NOTIFY_ALL_INTERFACE_CLASSES 0x00000004
  3223. ;end_if_(_WIN32_WINNT)_501
  3224. WINUSERAPI
  3225. HDEVNOTIFY
  3226. WINAPI
  3227. RegisterDeviceNotification%(
  3228. IN HANDLE hRecipient,
  3229. IN LPVOID NotificationFilter,
  3230. IN DWORD Flags
  3231. );
  3232. WINUSERAPI
  3233. BOOL
  3234. WINAPI
  3235. UnregisterDeviceNotification(
  3236. IN HDEVNOTIFY Handle
  3237. );
  3238. ;end_winver_500
  3239. ;begin_internal
  3240. //
  3241. // NOTE: Completion port-based notification is not implemented in Win2K,
  3242. // nor is it planned for Whistler.
  3243. //
  3244. #define DEVICE_NOTIFY_COMPLETION_HANDLE 0x00000002
  3245. ;end_internal
  3246. ;begin_internal
  3247. WINUSERAPI
  3248. ULONG
  3249. WINAPI
  3250. DeviceEventWorker(
  3251. IN HWND hWnd,
  3252. IN WPARAM wParam,
  3253. IN LPARAM lParam,
  3254. IN DWORD dwFlags,
  3255. OUT PDWORD pdwResult
  3256. );
  3257. ;end_internal
  3258. WINUSERAPI
  3259. BOOL
  3260. WINAPI
  3261. PostMessage%(
  3262. IN HWND hWnd,
  3263. IN UINT Msg,
  3264. IN WPARAM wParam,
  3265. IN LPARAM lParam);
  3266. WINUSERAPI
  3267. BOOL
  3268. WINAPI
  3269. PostThreadMessage%(
  3270. IN DWORD idThread,
  3271. IN UINT Msg,
  3272. IN WPARAM wParam,
  3273. IN LPARAM lParam);
  3274. #define PostAppMessage%(idThread, wMsg, wParam, lParam)\
  3275. PostThreadMessage%((DWORD)idThread, wMsg, wParam, lParam)
  3276. /*
  3277. * Special HWND value for use with PostMessage() and SendMessage()
  3278. */
  3279. #define HWND_BROADCAST ((HWND)0xffff)
  3280. ;begin_winver_500
  3281. #define HWND_MESSAGE ((HWND)-3)
  3282. ;end_winver_500
  3283. WINUSERAPI
  3284. BOOL
  3285. WINAPI
  3286. AttachThreadInput(
  3287. IN DWORD idAttach,
  3288. IN DWORD idAttachTo,
  3289. IN BOOL fAttach);
  3290. WINUSERAPI
  3291. BOOL
  3292. WINAPI
  3293. ReplyMessage(
  3294. IN LRESULT lResult);
  3295. WINUSERAPI
  3296. BOOL
  3297. WINAPI
  3298. WaitMessage(
  3299. VOID);
  3300. ;begin_internal_501
  3301. typedef BOOL (CALLBACK* WAITMESSAGEEXPROC)(UINT fsWakeMask, DWORD dwTimeout);
  3302. ;end_internal_501
  3303. WINUSERAPI
  3304. DWORD
  3305. WINAPI
  3306. WaitForInputIdle(
  3307. IN HANDLE hProcess,
  3308. IN DWORD dwMilliseconds);
  3309. WINUSERAPI
  3310. #ifndef _MAC
  3311. LRESULT
  3312. WINAPI
  3313. #else
  3314. LRESULT
  3315. CALLBACK
  3316. #endif
  3317. DefWindowProc%(
  3318. IN HWND hWnd,
  3319. IN UINT Msg,
  3320. IN WPARAM wParam,
  3321. IN LPARAM lParam);
  3322. WINUSERAPI
  3323. VOID
  3324. WINAPI
  3325. PostQuitMessage(
  3326. IN int nExitCode);
  3327. #ifdef STRICT
  3328. WINUSERAPI
  3329. LRESULT
  3330. WINAPI
  3331. CallWindowProc%(
  3332. IN WNDPROC lpPrevWndFunc,
  3333. IN HWND hWnd,
  3334. IN UINT Msg,
  3335. IN WPARAM wParam,
  3336. IN LPARAM lParam);
  3337. #else /* !STRICT */
  3338. WINUSERAPI
  3339. LRESULT
  3340. WINAPI
  3341. CallWindowProc%(
  3342. IN FARPROC lpPrevWndFunc,
  3343. IN HWND hWnd,
  3344. IN UINT Msg,
  3345. IN WPARAM wParam,
  3346. IN LPARAM lParam);
  3347. #endif /* !STRICT */
  3348. WINUSERAPI
  3349. BOOL
  3350. WINAPI
  3351. InSendMessage(
  3352. VOID);
  3353. ;begin_winver_500
  3354. WINUSERAPI
  3355. DWORD
  3356. WINAPI
  3357. InSendMessageEx(
  3358. IN LPVOID lpReserved);
  3359. /*
  3360. * InSendMessageEx return value
  3361. */
  3362. #define ISMEX_NOSEND 0x00000000
  3363. #define ISMEX_SEND 0x00000001
  3364. #define ISMEX_NOTIFY 0x00000002
  3365. #define ISMEX_CALLBACK 0x00000004
  3366. #define ISMEX_REPLIED 0x00000008
  3367. ;end_winver_500
  3368. WINUSERAPI
  3369. UINT
  3370. WINAPI
  3371. GetDoubleClickTime(
  3372. VOID);
  3373. WINUSERAPI
  3374. BOOL
  3375. WINAPI
  3376. SetDoubleClickTime(
  3377. IN UINT);
  3378. WINUSERAPI
  3379. ATOM
  3380. WINAPI
  3381. RegisterClass%(
  3382. IN CONST WNDCLASS% *lpWndClass);
  3383. WINUSERAPI
  3384. BOOL
  3385. WINAPI
  3386. UnregisterClass%(
  3387. IN LPCTSTR% lpClassName,
  3388. IN HINSTANCE hInstance);
  3389. WINUSERAPI
  3390. BOOL
  3391. WINAPI
  3392. GetClassInfo%(
  3393. IN HINSTANCE hInstance,
  3394. IN LPCTSTR% lpClassName,
  3395. OUT LPWNDCLASS% lpWndClass);
  3396. ;begin_winver_400
  3397. WINUSERAPI
  3398. ATOM
  3399. WINAPI
  3400. RegisterClassEx%(
  3401. IN CONST WNDCLASSEX% *);
  3402. WINUSERAPI
  3403. BOOL
  3404. WINAPI
  3405. GetClassInfoEx%(
  3406. IN HINSTANCE,
  3407. IN LPCTSTR%,
  3408. OUT LPWNDCLASSEX%);
  3409. ;end_winver_400
  3410. #define CW_USEDEFAULT ((int)0x80000000)
  3411. /*
  3412. * Special value for CreateWindow, et al.
  3413. */
  3414. #define HWND_DESKTOP ((HWND)0)
  3415. ;begin_if_(_WIN32_WINNT)_501
  3416. typedef BOOLEAN (WINAPI * PREGISTERCLASSNAMEW)(LPCWSTR);
  3417. ;end_if_(_WIN32_WINNT)_501
  3418. WINUSERAPI
  3419. HWND
  3420. WINAPI
  3421. CreateWindowEx%(
  3422. IN DWORD dwExStyle,
  3423. IN LPCTSTR% lpClassName,
  3424. IN LPCTSTR% lpWindowName,
  3425. IN DWORD dwStyle,
  3426. IN int X,
  3427. IN int Y,
  3428. IN int nWidth,
  3429. IN int nHeight,
  3430. IN HWND hWndParent,
  3431. IN HMENU hMenu,
  3432. IN HINSTANCE hInstance,
  3433. IN LPVOID lpParam);
  3434. #define CreateWindow%(lpClassName, lpWindowName, dwStyle, x, y,\
  3435. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)\
  3436. CreateWindowEx%(0L, lpClassName, lpWindowName, dwStyle, x, y,\
  3437. nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
  3438. WINUSERAPI
  3439. BOOL
  3440. WINAPI
  3441. IsWindow(
  3442. IN HWND hWnd);
  3443. WINUSERAPI
  3444. BOOL
  3445. WINAPI
  3446. IsMenu(
  3447. IN HMENU hMenu);
  3448. WINUSERAPI
  3449. BOOL
  3450. WINAPI
  3451. IsChild(
  3452. IN HWND hWndParent,
  3453. IN HWND hWnd);
  3454. WINUSERAPI
  3455. BOOL
  3456. WINAPI
  3457. DestroyWindow(
  3458. IN HWND hWnd);
  3459. WINUSERAPI
  3460. BOOL
  3461. WINAPI
  3462. ShowWindow(
  3463. IN HWND hWnd,
  3464. IN int nCmdShow);
  3465. ;begin_winver_500
  3466. WINUSERAPI
  3467. BOOL
  3468. WINAPI
  3469. AnimateWindow(
  3470. IN HWND hWnd,
  3471. IN DWORD dwTime,
  3472. IN DWORD dwFlags);
  3473. ;end_winver_500
  3474. ;begin_if_(_WIN32_WINNT)_500
  3475. #if defined(_WINGDI_) && !defined (NOGDI)
  3476. WINUSERAPI
  3477. BOOL
  3478. WINAPI
  3479. UpdateLayeredWindow(
  3480. HWND hWnd,
  3481. HDC hdcDst,
  3482. POINT *pptDst,
  3483. SIZE *psize,
  3484. HDC hdcSrc,
  3485. POINT *pptSrc,
  3486. COLORREF crKey,
  3487. BLENDFUNCTION *pblend,
  3488. DWORD dwFlags);
  3489. #endif
  3490. ;begin_if_(_WIN32_WINNT)_501
  3491. WINUSERAPI
  3492. BOOL
  3493. WINAPI
  3494. GetLayeredWindowAttributes(
  3495. HWND hwnd,
  3496. COLORREF *pcrKey,
  3497. BYTE *pbAlpha,
  3498. DWORD *pdwFlags);
  3499. #define PW_CLIENTONLY 0x00000001
  3500. ;begin_internal
  3501. #define PW_VALID (PW_CLIENTONLY)
  3502. ;end_internal
  3503. WINUSERAPI
  3504. BOOL
  3505. WINAPI
  3506. PrintWindow(
  3507. IN HWND hwnd,
  3508. IN HDC hdcBlt,
  3509. IN UINT nFlags);
  3510. ;end_if_(_WIN32_WINNT)_501
  3511. WINUSERAPI
  3512. BOOL
  3513. WINAPI
  3514. SetLayeredWindowAttributes(
  3515. HWND hwnd,
  3516. COLORREF crKey,
  3517. BYTE bAlpha,
  3518. DWORD dwFlags);
  3519. #define LWA_COLORKEY 0x00000001
  3520. #define LWA_ALPHA 0x00000002
  3521. ;begin_internal
  3522. #define LWA_VALID (LWA_COLORKEY | \
  3523. LWA_ALPHA)
  3524. ;end_internal
  3525. #define ULW_COLORKEY 0x00000001
  3526. #define ULW_ALPHA 0x00000002
  3527. #define ULW_OPAQUE 0x00000004
  3528. ;begin_internal
  3529. #define ULW_VALID (ULW_COLORKEY | \
  3530. ULW_ALPHA | \
  3531. ULW_OPAQUE)
  3532. ;end_internal
  3533. ;end_if_(_WIN32_WINNT)_500
  3534. ;begin_winver_400
  3535. WINUSERAPI
  3536. BOOL
  3537. WINAPI
  3538. ShowWindowAsync(
  3539. IN HWND hWnd,
  3540. IN int nCmdShow);
  3541. ;end_winver_400
  3542. WINUSERAPI
  3543. BOOL
  3544. WINAPI
  3545. FlashWindow(
  3546. IN HWND hWnd,
  3547. IN BOOL bInvert);
  3548. ;begin_winver_500
  3549. typedef struct {
  3550. UINT cbSize;
  3551. HWND hwnd;
  3552. DWORD dwFlags;
  3553. UINT uCount;
  3554. DWORD dwTimeout;
  3555. } FLASHWINFO, *PFLASHWINFO;
  3556. WINUSERAPI
  3557. BOOL
  3558. WINAPI
  3559. FlashWindowEx(
  3560. PFLASHWINFO pfwi);
  3561. #define FLASHW_STOP 0
  3562. #define FLASHW_CAPTION 0x00000001
  3563. #define FLASHW_TRAY 0x00000002
  3564. #define FLASHW_ALL (FLASHW_CAPTION | FLASHW_TRAY)
  3565. #define FLASHW_TIMER 0x00000004
  3566. #define FLASHW_FLASHNOFG 0x00000008 ;internal_500
  3567. #define FLASHW_TIMERNOFG 0x0000000C
  3568. #define FLASHW_TIMERCALL 0x00000400 ;internal_500
  3569. #define FLASHW_DONE 0x00000800 ;internal_500
  3570. #define FLASHW_STARTON 0x00001000 ;internal_500
  3571. #define FLASHW_COUNTING 0x00002000 ;internal_500
  3572. #define FLASHW_KILLTIMER 0x00004000 ;internal_500
  3573. #define FLASHW_ON 0x00008000 ;internal_500
  3574. #define FLASHW_VALID (FLASHW_ALL | FLASHW_TIMERNOFG) ;internal_500
  3575. #define FLASHW_COUNTMASK 0xFFFF0000 ;internal_500
  3576. #define FLASHW_CALLERBITS (FLASHW_VALID | FLASHW_COUNTMASK) ;internal_500
  3577. ;end_winver_500
  3578. WINUSERAPI
  3579. BOOL
  3580. WINAPI
  3581. ShowOwnedPopups(
  3582. IN HWND hWnd,
  3583. IN BOOL fShow);
  3584. WINUSERAPI
  3585. BOOL
  3586. WINAPI
  3587. OpenIcon(
  3588. IN HWND hWnd);
  3589. WINUSERAPI
  3590. BOOL
  3591. WINAPI
  3592. CloseWindow(
  3593. IN HWND hWnd);
  3594. WINUSERAPI
  3595. BOOL
  3596. WINAPI
  3597. MoveWindow(
  3598. IN HWND hWnd,
  3599. IN int X,
  3600. IN int Y,
  3601. IN int nWidth,
  3602. IN int nHeight,
  3603. IN BOOL bRepaint);
  3604. WINUSERAPI
  3605. BOOL
  3606. WINAPI
  3607. SetWindowPos(
  3608. IN HWND hWnd,
  3609. IN HWND hWndInsertAfter,
  3610. IN int X,
  3611. IN int Y,
  3612. IN int cx,
  3613. IN int cy,
  3614. IN UINT uFlags);
  3615. WINUSERAPI
  3616. BOOL
  3617. WINAPI
  3618. GetWindowPlacement(
  3619. IN HWND hWnd,
  3620. OUT WINDOWPLACEMENT *lpwndpl);
  3621. WINUSERAPI
  3622. BOOL
  3623. WINAPI
  3624. SetWindowPlacement(
  3625. IN HWND hWnd,
  3626. IN CONST WINDOWPLACEMENT *lpwndpl);
  3627. #ifndef NODEFERWINDOWPOS
  3628. WINUSERAPI
  3629. HDWP
  3630. WINAPI
  3631. BeginDeferWindowPos(
  3632. IN int nNumWindows);
  3633. WINUSERAPI
  3634. HDWP
  3635. WINAPI
  3636. DeferWindowPos(
  3637. IN HDWP hWinPosInfo,
  3638. IN HWND hWnd,
  3639. IN HWND hWndInsertAfter,
  3640. IN int x,
  3641. IN int y,
  3642. IN int cx,
  3643. IN int cy,
  3644. IN UINT uFlags);
  3645. WINUSERAPI
  3646. BOOL
  3647. WINAPI
  3648. EndDeferWindowPos(
  3649. IN HDWP hWinPosInfo);
  3650. #endif /* !NODEFERWINDOWPOS */
  3651. WINUSERAPI
  3652. BOOL
  3653. WINAPI
  3654. IsWindowVisible(
  3655. IN HWND hWnd);
  3656. WINUSERAPI
  3657. BOOL
  3658. WINAPI
  3659. IsIconic(
  3660. IN HWND hWnd);
  3661. WINUSERAPI
  3662. BOOL
  3663. WINAPI
  3664. AnyPopup(
  3665. VOID);
  3666. WINUSERAPI
  3667. BOOL
  3668. WINAPI
  3669. BringWindowToTop(
  3670. IN HWND hWnd);
  3671. WINUSERAPI
  3672. BOOL
  3673. WINAPI
  3674. IsZoomed(
  3675. IN HWND hWnd);
  3676. /*
  3677. * SetWindowPos Flags
  3678. */
  3679. #define SWP_NOSIZE 0x0001
  3680. #define SWP_NOMOVE 0x0002
  3681. #define SWP_NOZORDER 0x0004
  3682. #define SWP_NOREDRAW 0x0008
  3683. #define SWP_NOACTIVATE 0x0010
  3684. #define SWP_FRAMECHANGED 0x0020 /* The frame changed: send WM_NCCALCSIZE */
  3685. #define SWP_SHOWWINDOW 0x0040
  3686. #define SWP_HIDEWINDOW 0x0080
  3687. #define SWP_NOCOPYBITS 0x0100
  3688. #define SWP_NOOWNERZORDER 0x0200 /* Don't do owner Z ordering */
  3689. #define SWP_NOSENDCHANGING 0x0400 /* Don't send WM_WINDOWPOSCHANGING */
  3690. #define SWP_DRAWFRAME SWP_FRAMECHANGED
  3691. #define SWP_NOREPOSITION SWP_NOOWNERZORDER
  3692. ;begin_winver_400
  3693. #define SWP_DEFERERASE 0x2000
  3694. #define SWP_ASYNCWINDOWPOS 0x4000
  3695. #define SWP_STATECHANGE 0x8000 /* force size, move messages */ ;internal
  3696. ;end_winver_400
  3697. ;begin_internal
  3698. #define SWP_NOCLIENTSIZE 0x0800 /* Client didn't resize */
  3699. #define SWP_NOCLIENTMOVE 0x1000 /* Client didn't move */
  3700. #define SWP_DEFERDRAWING 0x2000
  3701. #define SWP_CREATESPB 0x4000
  3702. #define SWP_CHANGEMASK (SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE)
  3703. #define SWP_NOCHANGE (SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE)
  3704. #define SWP_VALID1 (SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE | SWP_FRAMECHANGED)
  3705. #define SWP_VALID2 (SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS | SWP_NOOWNERZORDER | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSENDCHANGING | SWP_ASYNCWINDOWPOS | SWP_DEFERDRAWING | SWP_CREATESPB)
  3706. #define SWP_VALID (SWP_VALID1 | SWP_VALID2)
  3707. #define SWP_NOTIFYCREATE 0x10000000
  3708. #define SWP_NOTIFYDESTROY 0x20000000
  3709. #define SWP_NOTIFYACTIVATE 0x40000000
  3710. #define SWP_NOTIFYFS 0x80000000
  3711. #define SWP_NOTIFYALL (SWP_NOTIFYCREATE | SWP_NOTIFYDESTROY | SWP_NOTIFYACTIVATE | SWP_NOTIFYFS)
  3712. ;end_internal
  3713. #undef SWP_VALID ;internal_cairo
  3714. #define SWP_VALID (SWP_DEFERERASE | \ ;internal_cairo
  3715. SWP_ASYNCWINDOWPOS | \ ;internal_cairo
  3716. SWP_NOCOPYBITS | \ ;internal_cairo
  3717. SWP_NOOWNERZORDER | \ ;internal_cairo
  3718. SWP_NOSENDCHANGING | \ ;internal_cairo
  3719. SWP_NOSIZE | \ ;internal_cairo
  3720. SWP_NOMOVE | \ ;internal_cairo
  3721. SWP_NOZORDER | \ ;internal_cairo
  3722. SWP_NOREDRAW | \ ;internal_cairo
  3723. SWP_NOACTIVATE | \ ;internal_cairo
  3724. SWP_FRAMECHANGED | \ ;internal_cairo
  3725. SWP_SHOWWINDOW | \ ;internal_cairo
  3726. SWP_HIDEWINDOW) ;internal_cairo
  3727. #define HWND_TOP ((HWND)0)
  3728. #define HWND_BOTTOM ((HWND)1)
  3729. #define HWND_TOPMOST ((HWND)-1)
  3730. #define HWND_NOTOPMOST ((HWND)-2)
  3731. #define HWND_GROUPTOTOP HWND_TOPMOST ;internal
  3732. #ifndef NOCTLMGR
  3733. /*
  3734. * WARNING:
  3735. * The following structures must NOT be DWORD padded because they are
  3736. * followed by strings, etc that do not have to be DWORD aligned.
  3737. */
  3738. #include <pshpack2.h>
  3739. /*
  3740. * original NT 32 bit dialog template:
  3741. */
  3742. typedef struct {
  3743. DWORD style;
  3744. DWORD dwExtendedStyle;
  3745. WORD cdit;
  3746. short x;
  3747. short y;
  3748. short cx;
  3749. short cy;
  3750. } DLGTEMPLATE;
  3751. typedef DLGTEMPLATE *LPDLGTEMPLATE%;
  3752. typedef CONST DLGTEMPLATE *LPCDLGTEMPLATE%;
  3753. ;begin_internal_NT
  3754. /*
  3755. * WARNING:
  3756. * The following structures must NOT be DWORD padded because they are
  3757. * followed by strings, etc that do not have to be DWORD aligned.
  3758. */
  3759. #include <pshpack2.h>
  3760. /*
  3761. * Chicago dialog template
  3762. */
  3763. typedef struct {
  3764. WORD wDlgVer;
  3765. WORD wSignature;
  3766. DWORD dwHelpID;
  3767. DWORD dwExStyle;
  3768. DWORD style;
  3769. WORD cDlgItems;
  3770. short x;
  3771. short y;
  3772. short cx;
  3773. short cy;
  3774. } DLGTEMPLATE2;
  3775. typedef DLGTEMPLATE2 *LPDLGTEMPLATE2%;
  3776. typedef CONST DLGTEMPLATE2 *LPCDLGTEMPLATE2%;
  3777. ;end_internal_NT
  3778. /*
  3779. * 32 bit Dialog item template.
  3780. */
  3781. typedef struct {
  3782. DWORD style;
  3783. DWORD dwExtendedStyle;
  3784. short x;
  3785. short y;
  3786. short cx;
  3787. short cy;
  3788. WORD id;
  3789. } DLGITEMTEMPLATE;
  3790. typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATE%;
  3791. typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATE%;
  3792. ;begin_internal_NT
  3793. /*
  3794. * Dialog item template for NT 1.0a/Chicago (dit2)
  3795. */
  3796. typedef struct {
  3797. DWORD dwHelpID;
  3798. DWORD dwExStyle;
  3799. DWORD style;
  3800. short x;
  3801. short y;
  3802. short cx;
  3803. short cy;
  3804. DWORD dwID;
  3805. } DLGITEMTEMPLATE2;
  3806. typedef DLGITEMTEMPLATE2 *PDLGITEMTEMPLATE2%;
  3807. typedef DLGITEMTEMPLATE2 *LPDLGITEMTEMPLATE2%;
  3808. #include <poppack.h> /* Resume normal packing */
  3809. ;end_internal_NT
  3810. #include <poppack.h> /* Resume normal packing */
  3811. WINUSERAPI
  3812. HWND
  3813. WINAPI
  3814. CreateDialogParam%(
  3815. IN HINSTANCE hInstance,
  3816. IN LPCTSTR% lpTemplateName,
  3817. IN HWND hWndParent,
  3818. IN DLGPROC lpDialogFunc,
  3819. IN LPARAM dwInitParam);
  3820. WINUSERAPI
  3821. HWND
  3822. WINAPI
  3823. CreateDialogIndirectParam%(
  3824. IN HINSTANCE hInstance,
  3825. IN LPCDLGTEMPLATE% lpTemplate,
  3826. IN HWND hWndParent,
  3827. IN DLGPROC lpDialogFunc,
  3828. IN LPARAM dwInitParam);
  3829. #define CreateDialog%(hInstance, lpName, hWndParent, lpDialogFunc) \
  3830. CreateDialogParam%(hInstance, lpName, hWndParent, lpDialogFunc, 0L)
  3831. #define CreateDialogIndirect%(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3832. CreateDialogIndirectParam%(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3833. WINUSERAPI
  3834. INT_PTR
  3835. WINAPI
  3836. DialogBoxParam%(
  3837. IN HINSTANCE hInstance,
  3838. IN LPCTSTR% lpTemplateName,
  3839. IN HWND hWndParent,
  3840. IN DLGPROC lpDialogFunc,
  3841. IN LPARAM dwInitParam);
  3842. WINUSERAPI
  3843. INT_PTR
  3844. WINAPI
  3845. DialogBoxIndirectParam%(
  3846. IN HINSTANCE hInstance,
  3847. IN LPCDLGTEMPLATE% hDialogTemplate,
  3848. IN HWND hWndParent,
  3849. IN DLGPROC lpDialogFunc,
  3850. IN LPARAM dwInitParam);
  3851. #define DialogBox%(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3852. DialogBoxParam%(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3853. #define DialogBoxIndirect%(hInstance, lpTemplate, hWndParent, lpDialogFunc) \
  3854. DialogBoxIndirectParam%(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L)
  3855. WINUSERAPI
  3856. BOOL
  3857. WINAPI
  3858. EndDialog(
  3859. IN HWND hDlg,
  3860. IN INT_PTR nResult);
  3861. WINUSERAPI
  3862. HWND
  3863. WINAPI
  3864. GetDlgItem(
  3865. IN HWND hDlg,
  3866. IN int nIDDlgItem);
  3867. WINUSERAPI
  3868. BOOL
  3869. WINAPI
  3870. SetDlgItemInt(
  3871. IN HWND hDlg,
  3872. IN int nIDDlgItem,
  3873. IN UINT uValue,
  3874. IN BOOL bSigned);
  3875. WINUSERAPI
  3876. UINT
  3877. WINAPI
  3878. GetDlgItemInt(
  3879. IN HWND hDlg,
  3880. IN int nIDDlgItem,
  3881. OUT BOOL *lpTranslated,
  3882. IN BOOL bSigned);
  3883. WINUSERAPI
  3884. BOOL
  3885. WINAPI
  3886. SetDlgItemText%(
  3887. IN HWND hDlg,
  3888. IN int nIDDlgItem,
  3889. IN LPCTSTR% lpString);
  3890. WINUSERAPI
  3891. UINT
  3892. WINAPI
  3893. GetDlgItemText%(
  3894. IN HWND hDlg,
  3895. IN int nIDDlgItem,
  3896. OUT LPTSTR% lpString,
  3897. IN int nMaxCount);
  3898. WINUSERAPI
  3899. BOOL
  3900. WINAPI
  3901. CheckDlgButton(
  3902. IN HWND hDlg,
  3903. IN int nIDButton,
  3904. IN UINT uCheck);
  3905. WINUSERAPI
  3906. BOOL
  3907. WINAPI
  3908. CheckRadioButton(
  3909. IN HWND hDlg,
  3910. IN int nIDFirstButton,
  3911. IN int nIDLastButton,
  3912. IN int nIDCheckButton);
  3913. WINUSERAPI
  3914. UINT
  3915. WINAPI
  3916. IsDlgButtonChecked(
  3917. IN HWND hDlg,
  3918. IN int nIDButton);
  3919. WINUSERAPI
  3920. LRESULT
  3921. WINAPI
  3922. SendDlgItemMessage%(
  3923. IN HWND hDlg,
  3924. IN int nIDDlgItem,
  3925. IN UINT Msg,
  3926. IN WPARAM wParam,
  3927. IN LPARAM lParam);
  3928. WINUSERAPI
  3929. HWND
  3930. WINAPI
  3931. GetNextDlgGroupItem(
  3932. IN HWND hDlg,
  3933. IN HWND hCtl,
  3934. IN BOOL bPrevious);
  3935. WINUSERAPI
  3936. HWND
  3937. WINAPI
  3938. GetNextDlgTabItem(
  3939. IN HWND hDlg,
  3940. IN HWND hCtl,
  3941. IN BOOL bPrevious);
  3942. WINUSERAPI
  3943. int
  3944. WINAPI
  3945. GetDlgCtrlID(
  3946. IN HWND hWnd);
  3947. WINUSERAPI
  3948. long
  3949. WINAPI
  3950. GetDialogBaseUnits(VOID);
  3951. WINUSERAPI
  3952. #ifndef _MAC
  3953. LRESULT
  3954. WINAPI
  3955. #else
  3956. LRESULT
  3957. CALLBACK
  3958. #endif
  3959. DefDlgProc%(
  3960. IN HWND hDlg,
  3961. IN UINT Msg,
  3962. IN WPARAM wParam,
  3963. IN LPARAM lParam);
  3964. /*
  3965. * Window extra byted needed for private dialog classes.
  3966. */
  3967. #ifndef _MAC
  3968. #define DLGWINDOWEXTRA 30
  3969. #else
  3970. #define DLGWINDOWEXTRA 48
  3971. #endif
  3972. #endif /* !NOCTLMGR */
  3973. #ifndef NOMSG
  3974. WINUSERAPI
  3975. BOOL
  3976. WINAPI
  3977. CallMsgFilter%(
  3978. IN LPMSG lpMsg,
  3979. IN int nCode);
  3980. #endif /* !NOMSG */
  3981. #ifndef NOCLIPBOARD
  3982. /*
  3983. * Clipboard Manager Functions
  3984. */
  3985. WINUSERAPI
  3986. BOOL
  3987. WINAPI
  3988. OpenClipboard(
  3989. IN HWND hWndNewOwner);
  3990. WINUSERAPI
  3991. BOOL
  3992. WINAPI
  3993. CloseClipboard(
  3994. VOID);
  3995. ;begin_winver_500
  3996. WINUSERAPI
  3997. DWORD
  3998. WINAPI
  3999. GetClipboardSequenceNumber(
  4000. VOID);
  4001. ;end_winver_500
  4002. WINUSERAPI
  4003. HWND
  4004. WINAPI
  4005. GetClipboardOwner(
  4006. VOID);
  4007. WINUSERAPI
  4008. HWND
  4009. WINAPI
  4010. SetClipboardViewer(
  4011. IN HWND hWndNewViewer);
  4012. WINUSERAPI
  4013. HWND
  4014. WINAPI
  4015. GetClipboardViewer(
  4016. VOID);
  4017. WINUSERAPI
  4018. BOOL
  4019. WINAPI
  4020. ChangeClipboardChain(
  4021. IN HWND hWndRemove,
  4022. IN HWND hWndNewNext);
  4023. WINUSERAPI
  4024. HANDLE
  4025. WINAPI
  4026. SetClipboardData(
  4027. IN UINT uFormat,
  4028. IN HANDLE hMem);
  4029. WINUSERAPI
  4030. HANDLE
  4031. WINAPI
  4032. GetClipboardData(
  4033. IN UINT uFormat);
  4034. WINUSERAPI
  4035. UINT
  4036. WINAPI
  4037. RegisterClipboardFormat%(
  4038. IN LPCTSTR% lpszFormat);
  4039. WINUSERAPI
  4040. int
  4041. WINAPI
  4042. CountClipboardFormats(
  4043. VOID);
  4044. WINUSERAPI
  4045. UINT
  4046. WINAPI
  4047. EnumClipboardFormats(
  4048. IN UINT format);
  4049. WINUSERAPI
  4050. int
  4051. WINAPI
  4052. GetClipboardFormatName%(
  4053. IN UINT format,
  4054. OUT LPTSTR% lpszFormatName,
  4055. IN int cchMaxCount);
  4056. WINUSERAPI
  4057. BOOL
  4058. WINAPI
  4059. EmptyClipboard(
  4060. VOID);
  4061. WINUSERAPI
  4062. BOOL
  4063. WINAPI
  4064. IsClipboardFormatAvailable(
  4065. IN UINT format);
  4066. WINUSERAPI
  4067. int
  4068. WINAPI
  4069. GetPriorityClipboardFormat(
  4070. OUT UINT *paFormatPriorityList,
  4071. IN int cFormats);
  4072. WINUSERAPI
  4073. HWND
  4074. WINAPI
  4075. GetOpenClipboardWindow(
  4076. VOID);
  4077. #endif /* !NOCLIPBOARD */
  4078. /*
  4079. * Character Translation Routines
  4080. */
  4081. WINUSERAPI
  4082. BOOL
  4083. WINAPI
  4084. CharToOem%(
  4085. IN LPCTSTR% lpszSrc,
  4086. OUT LPSTR lpszDst);
  4087. WINUSERAPI
  4088. BOOL
  4089. WINAPI
  4090. OemToChar%(
  4091. IN LPCSTR lpszSrc,
  4092. OUT LPTSTR% lpszDst);
  4093. WINUSERAPI
  4094. BOOL
  4095. WINAPI
  4096. CharToOemBuff%(
  4097. IN LPCTSTR% lpszSrc,
  4098. OUT LPSTR lpszDst,
  4099. IN DWORD cchDstLength);
  4100. WINUSERAPI
  4101. BOOL
  4102. WINAPI
  4103. OemToCharBuff%(
  4104. IN LPCSTR lpszSrc,
  4105. OUT LPTSTR% lpszDst,
  4106. IN DWORD cchDstLength);
  4107. WINUSERAPI
  4108. LPTSTR%
  4109. WINAPI
  4110. CharUpper%(
  4111. IN OUT LPTSTR% lpsz);
  4112. WINUSERAPI
  4113. DWORD
  4114. WINAPI
  4115. CharUpperBuff%(
  4116. IN OUT LPTSTR% lpsz,
  4117. IN DWORD cchLength);
  4118. WINUSERAPI
  4119. LPTSTR%
  4120. WINAPI
  4121. CharLower%(
  4122. IN OUT LPTSTR% lpsz);
  4123. WINUSERAPI
  4124. DWORD
  4125. WINAPI
  4126. CharLowerBuff%(
  4127. IN OUT LPTSTR% lpsz,
  4128. IN DWORD cchLength);
  4129. WINUSERAPI
  4130. LPTSTR%
  4131. WINAPI
  4132. CharNext%(
  4133. IN LPCTSTR% lpsz);
  4134. WINUSERAPI
  4135. LPTSTR%
  4136. WINAPI
  4137. CharPrev%(
  4138. IN LPCTSTR% lpszStart,
  4139. IN LPCTSTR% lpszCurrent);
  4140. ;begin_winver_400
  4141. WINUSERAPI
  4142. LPSTR
  4143. WINAPI
  4144. CharNextExA(
  4145. IN WORD CodePage,
  4146. IN LPCSTR lpCurrentChar,
  4147. IN DWORD dwFlags);
  4148. WINUSERAPI
  4149. LPSTR
  4150. WINAPI
  4151. CharPrevExA(
  4152. IN WORD CodePage,
  4153. IN LPCSTR lpStart,
  4154. IN LPCSTR lpCurrentChar,
  4155. IN DWORD dwFlags);
  4156. ;end_winver_400
  4157. /*
  4158. * Compatibility defines for character translation routines
  4159. */
  4160. #define AnsiToOem CharToOemA
  4161. #define OemToAnsi OemToCharA
  4162. #define AnsiToOemBuff CharToOemBuffA
  4163. #define OemToAnsiBuff OemToCharBuffA
  4164. #define AnsiUpper CharUpperA
  4165. #define AnsiUpperBuff CharUpperBuffA
  4166. #define AnsiLower CharLowerA
  4167. #define AnsiLowerBuff CharLowerBuffA
  4168. #define AnsiNext CharNextA
  4169. #define AnsiPrev CharPrevA
  4170. #ifndef NOLANGUAGE
  4171. /*
  4172. * Language dependent Routines
  4173. */
  4174. WINUSERAPI
  4175. BOOL
  4176. WINAPI
  4177. IsCharAlpha%(
  4178. IN TCHAR% ch);
  4179. WINUSERAPI
  4180. BOOL
  4181. WINAPI
  4182. IsCharAlphaNumeric%(
  4183. IN TCHAR% ch);
  4184. WINUSERAPI
  4185. BOOL
  4186. WINAPI
  4187. IsCharUpper%(
  4188. IN TCHAR% ch);
  4189. WINUSERAPI
  4190. BOOL
  4191. WINAPI
  4192. IsCharLower%(
  4193. IN TCHAR% ch);
  4194. #endif /* !NOLANGUAGE */
  4195. WINUSERAPI
  4196. HWND
  4197. WINAPI
  4198. SetFocus(
  4199. IN HWND hWnd);
  4200. WINUSERAPI
  4201. HWND
  4202. WINAPI
  4203. GetActiveWindow(
  4204. VOID);
  4205. WINUSERAPI
  4206. HWND
  4207. WINAPI
  4208. GetFocus(
  4209. VOID);
  4210. WINUSERAPI
  4211. UINT
  4212. WINAPI
  4213. GetKBCodePage(
  4214. VOID);
  4215. WINUSERAPI
  4216. SHORT
  4217. WINAPI
  4218. GetKeyState(
  4219. IN int nVirtKey);
  4220. WINUSERAPI
  4221. SHORT
  4222. WINAPI
  4223. GetAsyncKeyState(
  4224. IN int vKey);
  4225. WINUSERAPI
  4226. BOOL
  4227. WINAPI
  4228. GetKeyboardState(
  4229. OUT PBYTE lpKeyState);
  4230. WINUSERAPI
  4231. BOOL
  4232. WINAPI
  4233. SetKeyboardState(
  4234. IN LPBYTE lpKeyState);
  4235. WINUSERAPI
  4236. int
  4237. WINAPI
  4238. GetKeyNameText%(
  4239. IN LONG lParam,
  4240. OUT LPTSTR% lpString,
  4241. IN int nSize
  4242. );
  4243. WINUSERAPI
  4244. int
  4245. WINAPI
  4246. GetKeyboardType(
  4247. IN int nTypeFlag);
  4248. WINUSERAPI
  4249. int
  4250. WINAPI
  4251. ToAscii(
  4252. IN UINT uVirtKey,
  4253. IN UINT uScanCode,
  4254. IN CONST BYTE *lpKeyState,
  4255. OUT LPWORD lpChar,
  4256. IN UINT uFlags);
  4257. ;begin_winver_400
  4258. WINUSERAPI
  4259. int
  4260. WINAPI
  4261. ToAsciiEx(
  4262. IN UINT uVirtKey,
  4263. IN UINT uScanCode,
  4264. IN CONST BYTE *lpKeyState,
  4265. OUT LPWORD lpChar,
  4266. IN UINT uFlags,
  4267. IN HKL dwhkl);
  4268. ;end_winver_400
  4269. WINUSERAPI
  4270. int
  4271. WINAPI
  4272. ToUnicode(
  4273. IN UINT wVirtKey,
  4274. IN UINT wScanCode,
  4275. IN CONST BYTE *lpKeyState,
  4276. OUT LPWSTR pwszBuff,
  4277. IN int cchBuff,
  4278. IN UINT wFlags);
  4279. WINUSERAPI
  4280. DWORD
  4281. WINAPI
  4282. OemKeyScan(
  4283. IN WORD wOemChar);
  4284. WINUSERAPI
  4285. SHORT
  4286. WINAPI
  4287. VkKeyScan%(
  4288. IN TCHAR% ch);
  4289. ;begin_winver_400
  4290. WINUSERAPI
  4291. SHORT
  4292. WINAPI
  4293. VkKeyScanEx%(
  4294. IN TCHAR% ch,
  4295. IN HKL dwhkl);
  4296. ;end_winver_400
  4297. #define KEYEVENTF_EXTENDEDKEY 0x0001
  4298. #define KEYEVENTF_KEYUP 0x0002
  4299. ;begin_if_(_WIN32_WINNT)_500
  4300. #define KEYEVENTF_UNICODE 0x0004
  4301. #define KEYEVENTF_SCANCODE 0x0008
  4302. ;end_if_(_WIN32_WINNT)_500
  4303. WINUSERAPI
  4304. VOID
  4305. WINAPI
  4306. keybd_event(
  4307. IN BYTE bVk,
  4308. IN BYTE bScan,
  4309. IN DWORD dwFlags,
  4310. IN ULONG_PTR dwExtraInfo);
  4311. #define MOUSEEVENTF_MOVE 0x0001 /* mouse move */
  4312. #define MOUSEEVENTF_LEFTDOWN 0x0002 /* left button down */
  4313. #define MOUSEEVENTF_LEFTUP 0x0004 /* left button up */
  4314. #define MOUSEEVENTF_RIGHTDOWN 0x0008 /* right button down */
  4315. #define MOUSEEVENTF_RIGHTUP 0x0010 /* right button up */
  4316. #define MOUSEEVENTF_MIDDLEDOWN 0x0020 /* middle button down */
  4317. #define MOUSEEVENTF_MIDDLEUP 0x0040 /* middle button up */
  4318. #define MOUSEEVENTF_XDOWN 0x0080 /* x button down */
  4319. #define MOUSEEVENTF_XUP 0x0100 /* x button down */
  4320. ;begin_internal_500
  4321. /*
  4322. * The driver flags corresponding to these mouse events are
  4323. * shifted to the right by one, e.g.
  4324. * MOUSEEVENTF_LEFTDOWN >> 1 == MOUSE_LEFT_BUTTON_DOWN
  4325. *
  4326. * The mouse driver sends the fourth and fifth buttons corresponding
  4327. * as button flags, so we define MOUSEEVENTF_ flags INTERNALLY for
  4328. * mimicking the input sent by the driver.
  4329. */
  4330. #define MOUSEEVENTF_DRIVER_X1DOWN 0x0080 /* x1 button down */
  4331. #define MOUSEEVENTF_DRIVER_X1UP 0x0100 /* x1 button up */
  4332. #define MOUSEEVENTF_DRIVER_X2DOWN 0x0200 /* x2 button down */
  4333. #define MOUSEEVENTF_DRIVER_X2UP 0x0400 /* x2 button up */
  4334. ;end_internal_500
  4335. #define MOUSEEVENTF_WHEEL 0x0800 /* wheel button rolled */
  4336. #define MOUSEEVENTF_VIRTUALDESK 0x4000 /* map to entire virtual desktop */
  4337. #define MOUSEEVENTF_ABSOLUTE 0x8000 /* absolute move */
  4338. ;begin_internal_500
  4339. /* Legal MOUSEEVENTF_ flags that indicate a button has been pressed or the wheel moved */
  4340. #define MOUSEEVENTF_BUTTONMASK \
  4341. (MOUSEEVENTF_LEFTDOWN | \
  4342. MOUSEEVENTF_LEFTUP | \
  4343. MOUSEEVENTF_RIGHTDOWN | \
  4344. MOUSEEVENTF_RIGHTUP | \
  4345. MOUSEEVENTF_MIDDLEDOWN | \
  4346. MOUSEEVENTF_MIDDLEUP | \
  4347. MOUSEEVENTF_XDOWN | \
  4348. MOUSEEVENTF_XUP | \
  4349. MOUSEEVENTF_WHEEL)
  4350. /* MOUSEEVENTF_ flags that indicate useful data in the mouseData field */
  4351. #define MOUSEEVENTF_MOUSEDATAMASK \
  4352. (MOUSEEVENTF_XDOWN | \
  4353. MOUSEEVENTF_XUP | \
  4354. MOUSEEVENTF_WHEEL)
  4355. ;end_internal_500
  4356. WINUSERAPI
  4357. VOID
  4358. WINAPI
  4359. mouse_event(
  4360. IN DWORD dwFlags,
  4361. IN DWORD dx,
  4362. IN DWORD dy,
  4363. IN DWORD dwData,
  4364. IN ULONG_PTR dwExtraInfo);
  4365. #if (_WIN32_WINNT > 0x0400)
  4366. typedef struct tagMOUSEINPUT {
  4367. LONG dx;
  4368. LONG dy;
  4369. DWORD mouseData;
  4370. DWORD dwFlags;
  4371. DWORD time;
  4372. ULONG_PTR dwExtraInfo;
  4373. } MOUSEINPUT, *PMOUSEINPUT, FAR* LPMOUSEINPUT;
  4374. typedef struct tagKEYBDINPUT {
  4375. WORD wVk;
  4376. WORD wScan;
  4377. DWORD dwFlags;
  4378. DWORD time;
  4379. ULONG_PTR dwExtraInfo;
  4380. } KEYBDINPUT, *PKEYBDINPUT, FAR* LPKEYBDINPUT;
  4381. typedef struct tagHARDWAREINPUT {
  4382. DWORD uMsg;
  4383. WORD wParamL;
  4384. WORD wParamH;
  4385. } HARDWAREINPUT, *PHARDWAREINPUT, FAR* LPHARDWAREINPUT;
  4386. #define INPUT_MOUSE 0
  4387. #define INPUT_KEYBOARD 1
  4388. #define INPUT_HARDWARE 2
  4389. typedef struct tagINPUT {
  4390. DWORD type;
  4391. union
  4392. {
  4393. MOUSEINPUT mi;
  4394. KEYBDINPUT ki;
  4395. HARDWAREINPUT hi;
  4396. };
  4397. } INPUT, *PINPUT, FAR* LPINPUT;
  4398. WINUSERAPI
  4399. UINT
  4400. WINAPI
  4401. SendInput(
  4402. IN UINT cInputs, // number of input in the array
  4403. IN LPINPUT pInputs, // array of inputs
  4404. IN int cbSize); // sizeof(INPUT)
  4405. #endif // (_WIN32_WINNT > 0x0400)
  4406. ;begin_if_(_WIN32_WINNT)_500
  4407. typedef struct tagLASTINPUTINFO {
  4408. UINT cbSize;
  4409. DWORD dwTime;
  4410. } LASTINPUTINFO, * PLASTINPUTINFO;
  4411. WINUSERAPI
  4412. BOOL
  4413. WINAPI
  4414. GetLastInputInfo(
  4415. OUT PLASTINPUTINFO plii);
  4416. ;end_if_(_WIN32_WINNT)_500
  4417. WINUSERAPI
  4418. UINT
  4419. WINAPI
  4420. MapVirtualKey%(
  4421. IN UINT uCode,
  4422. IN UINT uMapType);
  4423. ;begin_winver_400
  4424. WINUSERAPI
  4425. UINT
  4426. WINAPI
  4427. MapVirtualKeyEx%(
  4428. IN UINT uCode,
  4429. IN UINT uMapType,
  4430. IN HKL dwhkl);
  4431. ;end_winver_400
  4432. WINUSERAPI
  4433. BOOL
  4434. WINAPI
  4435. GetInputState(
  4436. VOID);
  4437. WINUSERAPI
  4438. DWORD
  4439. WINAPI
  4440. GetQueueStatus(
  4441. IN UINT flags);
  4442. ;begin_internal_501
  4443. typedef DWORD (CALLBACK* GETQUEUESTATUSPROC)(IN UINT flags);
  4444. ;end_internal_501
  4445. WINUSERAPI
  4446. HWND
  4447. WINAPI
  4448. GetCapture(
  4449. VOID);
  4450. WINUSERAPI
  4451. HWND
  4452. WINAPI
  4453. SetCapture(
  4454. IN HWND hWnd);
  4455. WINUSERAPI
  4456. BOOL
  4457. WINAPI
  4458. ReleaseCapture(
  4459. VOID);
  4460. WINUSERAPI
  4461. DWORD
  4462. WINAPI
  4463. MsgWaitForMultipleObjects(
  4464. IN DWORD nCount,
  4465. IN CONST HANDLE *pHandles,
  4466. IN BOOL fWaitAll,
  4467. IN DWORD dwMilliseconds,
  4468. IN DWORD dwWakeMask);
  4469. WINUSERAPI
  4470. DWORD
  4471. WINAPI
  4472. MsgWaitForMultipleObjectsEx(
  4473. IN DWORD nCount,
  4474. IN CONST HANDLE *pHandles,
  4475. IN DWORD dwMilliseconds,
  4476. IN DWORD dwWakeMask,
  4477. IN DWORD dwFlags);
  4478. ;begin_internal_501
  4479. typedef DWORD (CALLBACK* MSGWAITFORMULTIPLEOBJECTSEXPROC)(IN DWORD nCount, IN CONST HANDLE *pHandles, IN DWORD dwMilliseconds, IN DWORD dwWakeMask, IN DWORD dwFlags);
  4480. ;end_internal_501
  4481. #define MWMO_WAITALL 0x0001
  4482. #define MWMO_ALERTABLE 0x0002
  4483. #define MWMO_INPUTAVAILABLE 0x0004
  4484. #define MWMO_VALID 0x0007 ;internal
  4485. /*
  4486. * Queue status flags for GetQueueStatus() and MsgWaitForMultipleObjects()
  4487. */
  4488. #define QS_KEY 0x0001
  4489. #define QS_MOUSEMOVE 0x0002
  4490. #define QS_MOUSEBUTTON 0x0004
  4491. #define QS_POSTMESSAGE 0x0008
  4492. #define QS_TIMER 0x0010
  4493. #define QS_PAINT 0x0020
  4494. #define QS_SENDMESSAGE 0x0040
  4495. #define QS_HOTKEY 0x0080
  4496. #define QS_ALLPOSTMESSAGE 0x0100
  4497. ;begin_internal_NT
  4498. #define QS_SMSREPLY 0x0200
  4499. ;end_internal_NT
  4500. ;begin_if_(_WIN32_WINNT)_501
  4501. ;internal // 0x0400: used to be QS_SYSEXPUNGE, dropped on 4/18/1995
  4502. ;internal // (see private/windows/user/server/input.c in SLM, and WinBug #109384)
  4503. #define QS_RAWINPUT 0x0400
  4504. ;end_if_(_WIN32_WINNT)_501
  4505. ;begin_internal_NT
  4506. #define QS_THREADATTACHED 0x0800
  4507. #define QS_EXCLUSIVE 0x1000 // wait for these events only!!
  4508. #define QS_EVENT 0x2000 // signifies event message
  4509. #define QS_TRANSFER 0x4000 // Input was transfered from another thread
  4510. // 0x8000 // unused, but should not be used for external API.
  4511. // Win9x has used this for SMSREPLY
  4512. ;end_internal_NT
  4513. #define QS_MOUSE (QS_MOUSEMOVE | \
  4514. QS_MOUSEBUTTON)
  4515. #if (_WIN32_WINNT >= 0x0501)
  4516. #define QS_INPUT (QS_MOUSE | \
  4517. QS_KEY | \
  4518. QS_RAWINPUT)
  4519. #else
  4520. #define QS_INPUT (QS_MOUSE | \
  4521. QS_KEY)
  4522. #endif // (_WIN32_WINNT >= 0x0501)
  4523. #define QS_ALLEVENTS (QS_INPUT | \
  4524. QS_POSTMESSAGE | \
  4525. QS_TIMER | \
  4526. QS_PAINT | \
  4527. QS_HOTKEY)
  4528. #define QS_ALLINPUT (QS_INPUT | \
  4529. QS_POSTMESSAGE | \
  4530. QS_TIMER | \
  4531. QS_PAINT | \
  4532. QS_HOTKEY | \
  4533. QS_SENDMESSAGE)
  4534. ;begin_internal_NT
  4535. #define QS_VALID (QS_KEY | \
  4536. QS_MOUSEMOVE | \
  4537. QS_MOUSEBUTTON | \
  4538. QS_POSTMESSAGE | \
  4539. QS_TIMER | \
  4540. QS_PAINT | \
  4541. QS_SENDMESSAGE | \
  4542. QS_TRANSFER | \
  4543. QS_HOTKEY | \
  4544. QS_ALLPOSTMESSAGE| \
  4545. QS_RAWINPUT)
  4546. /*
  4547. * QS_EVENT is used to clear the QS_EVENT bit, QS_EVENTSET is used to
  4548. * set the bit.
  4549. *
  4550. * Include QS_SENDMESSAGE because the queue events
  4551. * match what a win3.1 app would see as the QS_SENDMESSAGE bit. Plus 16 bit
  4552. * apps don't even know about QS_EVENT.
  4553. */
  4554. #define QS_EVENTSET (QS_EVENT | QS_SENDMESSAGE)
  4555. ;end_internal_NT
  4556. /*
  4557. * Windows Functions
  4558. */
  4559. WINUSERAPI
  4560. UINT_PTR
  4561. WINAPI
  4562. SetTimer(
  4563. IN HWND hWnd,
  4564. IN UINT_PTR nIDEvent,
  4565. IN UINT uElapse,
  4566. IN TIMERPROC lpTimerFunc);
  4567. WINUSERAPI
  4568. BOOL
  4569. WINAPI
  4570. KillTimer(
  4571. IN HWND hWnd,
  4572. IN UINT_PTR uIDEvent);
  4573. WINUSERAPI
  4574. BOOL
  4575. WINAPI
  4576. IsWindowUnicode(
  4577. IN HWND hWnd);
  4578. WINUSERAPI
  4579. BOOL
  4580. WINAPI
  4581. EnableWindow(
  4582. IN HWND hWnd,
  4583. IN BOOL bEnable);
  4584. WINUSERAPI
  4585. BOOL
  4586. WINAPI
  4587. IsWindowEnabled(
  4588. IN HWND hWnd);
  4589. WINUSERAPI
  4590. HACCEL
  4591. WINAPI
  4592. LoadAccelerators%(
  4593. IN HINSTANCE hInstance,
  4594. IN LPCTSTR% lpTableName);
  4595. WINUSERAPI
  4596. HACCEL
  4597. WINAPI
  4598. CreateAcceleratorTable%(
  4599. IN LPACCEL, IN int);
  4600. WINUSERAPI
  4601. BOOL
  4602. WINAPI
  4603. DestroyAcceleratorTable(
  4604. IN HACCEL hAccel);
  4605. WINUSERAPI
  4606. int
  4607. WINAPI
  4608. CopyAcceleratorTable%(
  4609. IN HACCEL hAccelSrc,
  4610. OUT LPACCEL lpAccelDst,
  4611. IN int cAccelEntries);
  4612. #ifndef NOMSG
  4613. WINUSERAPI
  4614. int
  4615. WINAPI
  4616. TranslateAccelerator%(
  4617. IN HWND hWnd,
  4618. IN HACCEL hAccTable,
  4619. IN LPMSG lpMsg);
  4620. #endif /* !NOMSG */
  4621. #ifndef NOSYSMETRICS
  4622. /*
  4623. * GetSystemMetrics() codes
  4624. */
  4625. ;begin_internal
  4626. /*
  4627. * When you add a system metric, be sure to
  4628. * add it to userexts.c in the function Idsi.
  4629. */
  4630. ;end_internal
  4631. #define SM_CXSCREEN 0
  4632. #define SM_CYSCREEN 1
  4633. #define SM_CXVSCROLL 2
  4634. #define SM_CYHSCROLL 3
  4635. #define SM_CYCAPTION 4
  4636. #define SM_CXBORDER 5
  4637. #define SM_CYBORDER 6
  4638. #define SM_CXDLGFRAME 7
  4639. #define SM_CYDLGFRAME 8
  4640. #define SM_CYVTHUMB 9
  4641. #define SM_CXHTHUMB 10
  4642. #define SM_CXICON 11
  4643. #define SM_CYICON 12
  4644. #define SM_CXCURSOR 13
  4645. #define SM_CYCURSOR 14
  4646. #define SM_CYMENU 15
  4647. #define SM_CXFULLSCREEN 16
  4648. #define SM_CYFULLSCREEN 17
  4649. #define SM_CYKANJIWINDOW 18
  4650. #define SM_MOUSEPRESENT 19
  4651. #define SM_CYVSCROLL 20
  4652. #define SM_CXHSCROLL 21
  4653. #define SM_DEBUG 22
  4654. #define SM_SWAPBUTTON 23
  4655. #define SM_RESERVED1 24
  4656. #define SM_RESERVED2 25
  4657. #define SM_RESERVED3 26
  4658. #define SM_RESERVED4 27
  4659. #define SM_CXMIN 28
  4660. #define SM_CYMIN 29
  4661. #define SM_CXSIZE 30
  4662. #define SM_CYSIZE 31
  4663. #define SM_CXFRAME 32
  4664. #define SM_CYFRAME 33
  4665. #define SM_CXMINTRACK 34
  4666. #define SM_CYMINTRACK 35
  4667. #define SM_CXDOUBLECLK 36
  4668. #define SM_CYDOUBLECLK 37
  4669. #define SM_CXICONSPACING 38
  4670. #define SM_CYICONSPACING 39
  4671. #define SM_MENUDROPALIGNMENT 40
  4672. #define SM_PENWINDOWS 41
  4673. #define SM_DBCSENABLED 42
  4674. #define SM_CMOUSEBUTTONS 43
  4675. ;begin_winver_400
  4676. #define SM_CXFIXEDFRAME SM_CXDLGFRAME /* ;win40 name change */
  4677. #define SM_CYFIXEDFRAME SM_CYDLGFRAME /* ;win40 name change */
  4678. #define SM_CXSIZEFRAME SM_CXFRAME /* ;win40 name change */
  4679. #define SM_CYSIZEFRAME SM_CYFRAME /* ;win40 name change */
  4680. #define SM_SECURE 44
  4681. #define SM_CXEDGE 45
  4682. #define SM_CYEDGE 46
  4683. #define SM_CXMINSPACING 47
  4684. #define SM_CYMINSPACING 48
  4685. #define SM_CXSMICON 49
  4686. #define SM_CYSMICON 50
  4687. #define SM_CYSMCAPTION 51
  4688. #define SM_CXSMSIZE 52
  4689. #define SM_CYSMSIZE 53
  4690. #define SM_CXMENUSIZE 54
  4691. #define SM_CYMENUSIZE 55
  4692. #define SM_ARRANGE 56
  4693. #define SM_CXMINIMIZED 57
  4694. #define SM_CYMINIMIZED 58
  4695. #define SM_CXMAXTRACK 59
  4696. #define SM_CYMAXTRACK 60
  4697. #define SM_CXMAXIMIZED 61
  4698. #define SM_CYMAXIMIZED 62
  4699. #define SM_NETWORK 63
  4700. #define SM_UNUSED_64 64 ;internal
  4701. #define SM_UNUSED_65 65 ;internal
  4702. #define SM_UNUSED_66 66 ;internal
  4703. #define SM_CLEANBOOT 67
  4704. #define SM_CXDRAG 68
  4705. #define SM_CYDRAG 69
  4706. ;end_winver_400
  4707. #define SM_SHOWSOUNDS 70
  4708. ;begin_winver_400
  4709. #define SM_CXMENUCHECK 71 /* Use instead of GetMenuCheckMarkDimensions()! */
  4710. #define SM_CYMENUCHECK 72
  4711. #define SM_SLOWMACHINE 73
  4712. #define SM_MIDEASTENABLED 74
  4713. ;end_winver_400
  4714. #if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
  4715. #define SM_MOUSEWHEELPRESENT 75
  4716. #endif
  4717. ;begin_winver_500
  4718. #define SM_XVIRTUALSCREEN 76
  4719. #define SM_YVIRTUALSCREEN 77
  4720. #define SM_CXVIRTUALSCREEN 78
  4721. #define SM_CYVIRTUALSCREEN 79
  4722. #define SM_CMONITORS 80
  4723. #define SM_SAMEDISPLAYFORMAT 81
  4724. ;end_winver_500
  4725. ;begin_if_(_WIN32_WINNT)_500
  4726. #define SM_IMMENABLED 82
  4727. ;end_if_(_WIN32_WINNT)_500
  4728. ;begin_if_(_WIN32_WINNT)_501
  4729. #define SM_CXFOCUSBORDER 83
  4730. #define SM_CYFOCUSBORDER 84
  4731. ;end_if_(_WIN32_WINNT)_501
  4732. ;begin_internal_501
  4733. #define SM_BOOLEANS 85
  4734. ;end_internal_501
  4735. ;begin_if_(_WIN32_WINNT)_501
  4736. #define SM_TABLETPC 86
  4737. #define SM_MEDIACENTER 87
  4738. ;end_if_(_WIN32_WINNT)_501
  4739. #if (WINVER < 0x0500) && (!defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0400))
  4740. #define SM_CMETRICS 76
  4741. #elif WINVER == 0x500
  4742. #define SM_CMETRICS 83
  4743. #else
  4744. #define SM_CMETRICS 88
  4745. #endif
  4746. ;begin_winver_500
  4747. ;begin_internal
  4748. /*
  4749. * Add system metrics that don't take space in gpsi->aiSysMet here.
  4750. */
  4751. ;end_internal
  4752. #define SM_REMOTESESSION 0x1000
  4753. ;begin_internal
  4754. /*
  4755. * To add a BOOLEAN system metric increment SM_ENDBOOLRANGE by 1 and make your
  4756. * SM_XXXX constant that new value.
  4757. */
  4758. ;end_internal
  4759. ;begin_internal
  4760. #define SM_STARTBOOLRANGE 0x2000
  4761. ;end_internal
  4762. ;begin_if_(_WIN32_WINNT)_501
  4763. #define SM_SHUTTINGDOWN 0x2000
  4764. ;end_if_(_WIN32_WINNT)_501
  4765. ;begin_winver_501
  4766. #define SM_REMOTECONTROL 0x2001
  4767. ;end_winver_501
  4768. ;begin_internal
  4769. #define SM_ENDBOOLRANGE 0x2001
  4770. ;end_internal
  4771. ;end_winver_500
  4772. ;begin_internal
  4773. /*
  4774. * When you add a system metric, be sure to
  4775. * add it to userexts.c in the function Idsi.
  4776. */
  4777. ;end_internal
  4778. WINUSERAPI
  4779. int
  4780. WINAPI
  4781. GetSystemMetrics(
  4782. IN int nIndex);
  4783. ;begin_internal_501
  4784. ;begin_if_(_WIN32_WINNT)_501
  4785. typedef int (CALLBACK* GETSYSTEMMETRICSPROC)(IN int nIndex);
  4786. ;end_if_(_WIN32_WINNT)_501
  4787. ;end_internal_501
  4788. #endif /* !NOSYSMETRICS */
  4789. #ifndef NOMENUS
  4790. WINUSERAPI
  4791. HMENU
  4792. WINAPI
  4793. LoadMenu%(
  4794. IN HINSTANCE hInstance,
  4795. IN LPCTSTR% lpMenuName);
  4796. WINUSERAPI
  4797. HMENU
  4798. WINAPI
  4799. LoadMenuIndirect%(
  4800. IN CONST MENUTEMPLATE% *lpMenuTemplate);
  4801. WINUSERAPI
  4802. HMENU
  4803. WINAPI
  4804. GetMenu(
  4805. IN HWND hWnd);
  4806. WINUSERAPI
  4807. BOOL
  4808. WINAPI
  4809. SetMenu(
  4810. IN HWND hWnd,
  4811. IN HMENU hMenu);
  4812. WINUSERAPI
  4813. BOOL
  4814. WINAPI
  4815. ChangeMenu%(
  4816. IN HMENU hMenu,
  4817. IN UINT cmd,
  4818. IN LPCTSTR% lpszNewItem,
  4819. IN UINT cmdInsert,
  4820. IN UINT flags);
  4821. WINUSERAPI
  4822. BOOL
  4823. WINAPI
  4824. HiliteMenuItem(
  4825. IN HWND hWnd,
  4826. IN HMENU hMenu,
  4827. IN UINT uIDHiliteItem,
  4828. IN UINT uHilite);
  4829. WINUSERAPI
  4830. int
  4831. WINAPI
  4832. GetMenuString%(
  4833. IN HMENU hMenu,
  4834. IN UINT uIDItem,
  4835. OUT LPTSTR% lpString,
  4836. IN int nMaxCount,
  4837. IN UINT uFlag);
  4838. WINUSERAPI
  4839. UINT
  4840. WINAPI
  4841. GetMenuState(
  4842. IN HMENU hMenu,
  4843. IN UINT uId,
  4844. IN UINT uFlags);
  4845. WINUSERAPI
  4846. BOOL
  4847. WINAPI
  4848. DrawMenuBar(
  4849. IN HWND hWnd);
  4850. ;begin_if_(_WIN32_WINNT)_501
  4851. #define PMB_ACTIVE 0x00000001
  4852. ;begin_internal_501
  4853. #define PMB_VALID PMB_ACTIVE
  4854. WINUSERAPI
  4855. UINT
  4856. WINAPI
  4857. PaintMenuBar(
  4858. IN HWND hwnd,
  4859. IN HDC hdc,
  4860. IN int iLeftOffset,
  4861. IN int iRightOffset,
  4862. IN int iTopOffset,
  4863. IN DWORD dwFlags);
  4864. WINUSERAPI
  4865. UINT
  4866. WINAPI
  4867. CalcMenuBar(
  4868. IN HWND hwnd,
  4869. IN int iLeftOffset,
  4870. IN int iRightOffset,
  4871. IN int iTopOffset,
  4872. IN LPCRECT prcWnd);
  4873. ;end_internal_501
  4874. ;end_if_(_WIN32_WINNT)_501
  4875. ;begin_internal_win40
  4876. WINUSERAPI
  4877. int
  4878. WINAPI
  4879. DrawMenuBarTemp(
  4880. IN HWND,
  4881. IN HDC,
  4882. IN LPCRECT,
  4883. IN HMENU,
  4884. IN HFONT);
  4885. ;end_internal_win40
  4886. WINUSERAPI
  4887. HMENU
  4888. WINAPI
  4889. GetSystemMenu(
  4890. IN HWND hWnd,
  4891. IN BOOL bRevert);
  4892. WINUSERAPI BOOL WINAPI SetSystemMenu( IN HWND, IN HMENU); ;internal_win40
  4893. WINUSERAPI
  4894. HMENU
  4895. WINAPI
  4896. CreateMenu(
  4897. VOID);
  4898. WINUSERAPI
  4899. HMENU
  4900. WINAPI
  4901. CreatePopupMenu(
  4902. VOID);
  4903. WINUSERAPI
  4904. BOOL
  4905. WINAPI
  4906. DestroyMenu(
  4907. IN HMENU hMenu);
  4908. WINUSERAPI
  4909. DWORD
  4910. WINAPI
  4911. CheckMenuItem(
  4912. IN HMENU hMenu,
  4913. IN UINT uIDCheckItem,
  4914. IN UINT uCheck);
  4915. WINUSERAPI
  4916. BOOL
  4917. WINAPI
  4918. EnableMenuItem(
  4919. IN HMENU hMenu,
  4920. IN UINT uIDEnableItem,
  4921. IN UINT uEnable);
  4922. WINUSERAPI
  4923. HMENU
  4924. WINAPI
  4925. GetSubMenu(
  4926. IN HMENU hMenu,
  4927. IN int nPos);
  4928. WINUSERAPI
  4929. UINT
  4930. WINAPI
  4931. GetMenuItemID(
  4932. IN HMENU hMenu,
  4933. IN int nPos);
  4934. WINUSERAPI
  4935. int
  4936. WINAPI
  4937. GetMenuItemCount(
  4938. IN HMENU hMenu);
  4939. WINUSERAPI
  4940. BOOL
  4941. WINAPI
  4942. InsertMenu%(
  4943. IN HMENU hMenu,
  4944. IN UINT uPosition,
  4945. IN UINT uFlags,
  4946. IN UINT_PTR uIDNewItem,
  4947. IN LPCTSTR% lpNewItem
  4948. );
  4949. WINUSERAPI
  4950. BOOL
  4951. WINAPI
  4952. AppendMenu%(
  4953. IN HMENU hMenu,
  4954. IN UINT uFlags,
  4955. IN UINT_PTR uIDNewItem,
  4956. IN LPCTSTR% lpNewItem
  4957. );
  4958. WINUSERAPI
  4959. BOOL
  4960. WINAPI
  4961. ModifyMenu%(
  4962. IN HMENU hMnu,
  4963. IN UINT uPosition,
  4964. IN UINT uFlags,
  4965. IN UINT_PTR uIDNewItem,
  4966. IN LPCTSTR% lpNewItem
  4967. );
  4968. WINUSERAPI
  4969. BOOL
  4970. WINAPI RemoveMenu(
  4971. IN HMENU hMenu,
  4972. IN UINT uPosition,
  4973. IN UINT uFlags);
  4974. WINUSERAPI
  4975. BOOL
  4976. WINAPI
  4977. DeleteMenu(
  4978. IN HMENU hMenu,
  4979. IN UINT uPosition,
  4980. IN UINT uFlags);
  4981. WINUSERAPI
  4982. BOOL
  4983. WINAPI
  4984. SetMenuItemBitmaps(
  4985. IN HMENU hMenu,
  4986. IN UINT uPosition,
  4987. IN UINT uFlags,
  4988. IN HBITMAP hBitmapUnchecked,
  4989. IN HBITMAP hBitmapChecked);
  4990. WINUSERAPI
  4991. LONG
  4992. WINAPI
  4993. GetMenuCheckMarkDimensions(
  4994. VOID);
  4995. WINUSERAPI
  4996. BOOL
  4997. WINAPI
  4998. TrackPopupMenu(
  4999. IN HMENU hMenu,
  5000. IN UINT uFlags,
  5001. IN int x,
  5002. IN int y,
  5003. IN int nReserved,
  5004. IN HWND hWnd,
  5005. IN CONST RECT *prcRect);
  5006. ;begin_winver_400
  5007. /* return codes for WM_MENUCHAR */
  5008. #define MNC_IGNORE 0
  5009. #define MNC_CLOSE 1
  5010. #define MNC_EXECUTE 2
  5011. #define MNC_SELECT 3
  5012. typedef struct tagTPMPARAMS
  5013. {
  5014. UINT cbSize; /* Size of structure */
  5015. RECT rcExclude; /* Screen coordinates of rectangle to exclude when positioning */
  5016. } TPMPARAMS;
  5017. typedef TPMPARAMS FAR *LPTPMPARAMS;
  5018. WINUSERAPI
  5019. BOOL
  5020. WINAPI
  5021. TrackPopupMenuEx(
  5022. IN HMENU,
  5023. IN UINT,
  5024. IN int,
  5025. IN int,
  5026. IN HWND,
  5027. IN LPTPMPARAMS);
  5028. ;end_winver_400
  5029. ;begin_internal_500
  5030. /*
  5031. * MNS_ values are stored in pMenu->fFlags.
  5032. * Low order bits are used for internal MF* flags defined in user.h
  5033. */
  5034. ;end_internal_500
  5035. ;begin_winver_500
  5036. #define MNS_NOCHECK 0x80000000
  5037. #define MNS_MODELESS 0x40000000
  5038. #define MNS_DRAGDROP 0x20000000
  5039. #define MNS_AUTODISMISS 0x10000000
  5040. #define MNS_NOTIFYBYPOS 0x08000000
  5041. #define MNS_CHECKORBMP 0x04000000
  5042. #define MNS_LAST 0x04000000 ;internal_500
  5043. #define MNS_VALID 0xFC000000 ;internal_500
  5044. #define MIM_MAXHEIGHT 0x00000001
  5045. #define MIM_BACKGROUND 0x00000002
  5046. #define MIM_HELPID 0x00000004
  5047. #define MIM_MENUDATA 0x00000008
  5048. #define MIM_STYLE 0x00000010
  5049. #define MIM_APPLYTOSUBMENUS 0x80000000
  5050. #define MIM_MASK 0x8000001F ;internal_500
  5051. typedef struct tagMENUINFO
  5052. {
  5053. DWORD cbSize;
  5054. DWORD fMask;
  5055. DWORD dwStyle;
  5056. UINT cyMax;
  5057. HBRUSH hbrBack;
  5058. DWORD dwContextHelpID;
  5059. ULONG_PTR dwMenuData;
  5060. } MENUINFO, FAR *LPMENUINFO;
  5061. typedef MENUINFO CONST FAR *LPCMENUINFO;
  5062. WINUSERAPI
  5063. BOOL
  5064. WINAPI
  5065. GetMenuInfo(
  5066. IN HMENU,
  5067. OUT LPMENUINFO);
  5068. WINUSERAPI
  5069. BOOL
  5070. WINAPI
  5071. SetMenuInfo(
  5072. IN HMENU,
  5073. IN LPCMENUINFO);
  5074. WINUSERAPI
  5075. BOOL
  5076. WINAPI
  5077. EndMenu(
  5078. VOID);
  5079. /*
  5080. * WM_MENUDRAG return values.
  5081. */
  5082. #define MND_CONTINUE 0
  5083. #define MND_ENDMENU 1
  5084. typedef struct tagMENUGETOBJECTINFO
  5085. {
  5086. DWORD dwFlags;
  5087. UINT uPos;
  5088. HMENU hmenu;
  5089. PVOID riid;
  5090. PVOID pvObj;
  5091. } MENUGETOBJECTINFO, * PMENUGETOBJECTINFO;
  5092. /*
  5093. * MENUGETOBJECTINFO dwFlags values
  5094. */
  5095. #define MNGOF_TOPGAP 0x00000001
  5096. #define MNGOF_BOTTOMGAP 0x00000002
  5097. #define MNGOF_GAP 0x00000003 ;internal_500
  5098. #define MNGOF_CROSSBOUNDARY 0x00000004 ;internal_500
  5099. /*
  5100. * WM_MENUGETOBJECT return values
  5101. */
  5102. #define MNGO_NOINTERFACE 0x00000000
  5103. #define MNGO_NOERROR 0x00000001
  5104. ;end_winver_500
  5105. ;begin_winver_400
  5106. #define MIIM_STATE 0x00000001
  5107. #define MIIM_ID 0x00000002
  5108. #define MIIM_SUBMENU 0x00000004
  5109. #define MIIM_CHECKMARKS 0x00000008
  5110. #define MIIM_TYPE 0x00000010
  5111. #define MIIM_DATA 0x00000020
  5112. ;end_winver_400
  5113. ;begin_winver_500
  5114. #define MIIM_STRING 0x00000040
  5115. #define MIIM_BITMAP 0x00000080
  5116. #define MIIM_FTYPE 0x00000100
  5117. #define MIIM_MASK 0x000001FF ;Internal
  5118. #define HBMMENU_CALLBACK ((HBITMAP) -1)
  5119. #define HBMMENU_MIN ((HBITMAP) 0) ;internal_500
  5120. #define HBMMENU_SYSTEM ((HBITMAP) 1)
  5121. #define HBMMENU_MBARFIRST ((HBITMAP) 2) ;internal_500
  5122. #define HBMMENU_MBAR_RESTORE ((HBITMAP) 2)
  5123. #define HBMMENU_MBAR_MINIMIZE ((HBITMAP) 3)
  5124. #define HBMMENU_UNUSED ((HBITMAP) 4) ;internal_500
  5125. #define HBMMENU_MBAR_CLOSE ((HBITMAP) 5)
  5126. #define HBMMENU_MBAR_CLOSE_D ((HBITMAP) 6)
  5127. #define HBMMENU_MBAR_MINIMIZE_D ((HBITMAP) 7)
  5128. #define HBMMENU_MBARLAST ((HBITMAP) 7) ;internal_500
  5129. #define HBMMENU_POPUPFIRST ((HBITMAP) 8) ;internal_500
  5130. #define HBMMENU_POPUP_CLOSE ((HBITMAP) 8)
  5131. #define HBMMENU_POPUP_RESTORE ((HBITMAP) 9)
  5132. #define HBMMENU_POPUP_MAXIMIZE ((HBITMAP) 10)
  5133. #define HBMMENU_POPUP_MINIMIZE ((HBITMAP) 11)
  5134. #define HBMMENU_POPUPLAST ((HBITMAP) 11) ;internal_500
  5135. #define HBMMENU_MAX ((HBITMAP) 12) ;internal_500
  5136. ;end_winver_500
  5137. ;begin_winver_400
  5138. typedef struct tagMENUITEMINFO%
  5139. {
  5140. UINT cbSize;
  5141. UINT fMask;
  5142. UINT fType; // used if MIIM_TYPE (4.0) or MIIM_FTYPE (>4.0)
  5143. UINT fState; // used if MIIM_STATE
  5144. UINT wID; // used if MIIM_ID
  5145. HMENU hSubMenu; // used if MIIM_SUBMENU
  5146. HBITMAP hbmpChecked; // used if MIIM_CHECKMARKS
  5147. HBITMAP hbmpUnchecked; // used if MIIM_CHECKMARKS
  5148. ULONG_PTR dwItemData; // used if MIIM_DATA
  5149. LPTSTR% dwTypeData; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
  5150. UINT cch; // used if MIIM_TYPE (4.0) or MIIM_STRING (>4.0)
  5151. ;begin_winver_500
  5152. HBITMAP hbmpItem; // used if MIIM_BITMAP
  5153. ;end_winver_500
  5154. } MENUITEMINFO%, FAR *LPMENUITEMINFO%;
  5155. typedef MENUITEMINFO% CONST FAR *LPCMENUITEMINFO%;
  5156. ;begin_internal_500
  5157. /*
  5158. * Make sure to keep this in synch with the MENUITEMINFO structure. It should
  5159. * be equal to the size of the structure pre NT5.
  5160. */
  5161. #define SIZEOFMENUITEMINFO95 FIELD_OFFSET(MENUITEMINFO, hbmpItem)
  5162. ;end_internal_500
  5163. WINUSERAPI
  5164. BOOL
  5165. WINAPI
  5166. InsertMenuItem%(
  5167. IN HMENU,
  5168. IN UINT,
  5169. IN BOOL,
  5170. IN LPCMENUITEMINFO%
  5171. );
  5172. WINUSERAPI
  5173. BOOL
  5174. WINAPI
  5175. GetMenuItemInfo%(
  5176. IN HMENU,
  5177. IN UINT,
  5178. IN BOOL,
  5179. IN OUT LPMENUITEMINFO%
  5180. );
  5181. WINUSERAPI
  5182. BOOL
  5183. WINAPI
  5184. SetMenuItemInfo%(
  5185. IN HMENU,
  5186. IN UINT,
  5187. IN BOOL,
  5188. IN LPCMENUITEMINFO%
  5189. );
  5190. #define GMDI_USEDISABLED 0x0001L
  5191. #define GMDI_GOINTOPOPUPS 0x0002L
  5192. WINUSERAPI UINT WINAPI GetMenuDefaultItem( IN HMENU hMenu, IN UINT fByPos, IN UINT gmdiFlags);
  5193. WINUSERAPI BOOL WINAPI SetMenuDefaultItem( IN HMENU hMenu, IN UINT uItem, IN UINT fByPos);
  5194. WINUSERAPI BOOL WINAPI GetMenuItemRect( IN HWND hWnd, IN HMENU hMenu, IN UINT uItem, OUT LPRECT lprcItem);
  5195. WINUSERAPI int WINAPI MenuItemFromPoint( IN HWND hWnd, IN HMENU hMenu, IN POINT ptScreen);
  5196. ;end_winver_400
  5197. /*
  5198. * Flags for TrackPopupMenu
  5199. */
  5200. #define TPM_LEFTBUTTON 0x0000L
  5201. #define TPM_RIGHTBUTTON 0x0002L
  5202. #define TPM_LEFTALIGN 0x0000L
  5203. #define TPM_CENTERALIGN 0x0004L
  5204. #define TPM_RIGHTALIGN 0x0008L
  5205. ;begin_winver_400
  5206. #define TPM_TOPALIGN 0x0000L
  5207. #define TPM_VCENTERALIGN 0x0010L
  5208. #define TPM_BOTTOMALIGN 0x0020L
  5209. #define TPM_HORIZONTAL 0x0000L /* Horz alignment matters more */
  5210. #define TPM_VERTICAL 0x0040L /* Vert alignment matters more */
  5211. #define TPM_NONOTIFY 0x0080L /* Don't send any notification msgs */
  5212. #define TPM_RETURNCMD 0x0100L
  5213. #define TPM_SYSMENU 0x0200L ;internal
  5214. ;end_winver_400
  5215. ;begin_winver_500
  5216. #define TPM_RECURSE 0x0001L
  5217. #define TPM_FIRSTANIBITPOS 10 ;internal_500
  5218. #define TPM_HORPOSANIMATION 0x0400L
  5219. #define TPM_HORNEGANIMATION 0x0800L
  5220. #define TPM_VERPOSANIMATION 0x1000L
  5221. #define TPM_VERNEGANIMATION 0x2000L
  5222. #define TPM_ANIMATIONBITS 0x3C00L ;internal_500
  5223. ;begin_if_(_WIN32_WINNT)_500
  5224. #define TPM_NOANIMATION 0x4000L
  5225. ;end_if_(_WIN32_WINNT)_500
  5226. ;begin_if_(_WIN32_WINNT)_501
  5227. #define TPM_LAYOUTRTL 0x8000L
  5228. ;end_if_(_WIN32_WINNT)_501
  5229. ;end_winver_500
  5230. ;begin_internal
  5231. #if (WINVER >= 0x0500)
  5232. #define TPM_VALID (TPM_LEFTBUTTON | \
  5233. TPM_RIGHTBUTTON | \
  5234. TPM_LEFTALIGN | \
  5235. TPM_CENTERALIGN | \
  5236. TPM_RIGHTALIGN | \
  5237. TPM_TOPALIGN | \
  5238. TPM_VCENTERALIGN | \
  5239. TPM_BOTTOMALIGN | \
  5240. TPM_HORIZONTAL | \
  5241. TPM_VERTICAL | \
  5242. TPM_NONOTIFY | \
  5243. TPM_RECURSE | \
  5244. TPM_RETURNCMD | \
  5245. TPM_HORPOSANIMATION | \
  5246. TPM_HORNEGANIMATION | \
  5247. TPM_VERPOSANIMATION | \
  5248. TPM_VERNEGANIMATION | \
  5249. TPM_NOANIMATION |\
  5250. TPM_LAYOUTRTL)
  5251. #else /* (WINVER >= 0x0500) */
  5252. #define TPM_VALID (TPM_LEFTBUTTON | \
  5253. TPM_RIGHTBUTTON | \
  5254. TPM_LEFTALIGN | \
  5255. TPM_CENTERALIGN | \
  5256. TPM_RIGHTALIGN | \
  5257. TPM_TOPALIGN | \
  5258. TPM_VCENTERALIGN | \
  5259. TPM_BOTTOMALIGN | \
  5260. TPM_HORIZONTAL | \
  5261. TPM_VERTICAL | \
  5262. TPM_NONOTIFY | \
  5263. TPM_RETURNCMD)
  5264. #endif /* (WINVER >= 0x0500) */
  5265. ;end_internal
  5266. #endif /* !NOMENUS */
  5267. ;begin_internal_NT
  5268. typedef struct _dropfilestruct {
  5269. DWORD pFiles; // offset of file list
  5270. POINT pt; // drop point
  5271. BOOL fNC; // is it on NonClient area
  5272. BOOL fWide; // WIDE character switch
  5273. } DROPFILESTRUCT, FAR * LPDROPFILESTRUCT;
  5274. ;end_internal_NT
  5275. ;begin_winver_400
  5276. //
  5277. // Drag-and-drop support
  5278. // Obsolete - use OLE instead
  5279. //
  5280. typedef struct tagDROPSTRUCT
  5281. {
  5282. HWND hwndSource;
  5283. HWND hwndSink;
  5284. DWORD wFmt;
  5285. ULONG_PTR dwData;
  5286. POINT ptDrop;
  5287. DWORD dwControlData;
  5288. } DROPSTRUCT, *PDROPSTRUCT, *LPDROPSTRUCT;
  5289. #define DOF_EXECUTABLE 0x8001 // wFmt flags
  5290. #define DOF_DOCUMENT 0x8002
  5291. #define DOF_DIRECTORY 0x8003
  5292. #define DOF_MULTIPLE 0x8004
  5293. #define DOF_PROGMAN 0x0001
  5294. #define DOF_SHELLDATA 0x0002
  5295. #define DO_DROPFILE 0x454C4946L
  5296. #define DO_PRINTFILE 0x544E5250L
  5297. WINUSERAPI
  5298. DWORD
  5299. WINAPI
  5300. DragObject(
  5301. IN HWND,
  5302. IN HWND,
  5303. IN UINT,
  5304. IN ULONG_PTR,
  5305. IN HCURSOR);
  5306. WINUSERAPI
  5307. BOOL
  5308. WINAPI
  5309. DragDetect(
  5310. IN HWND,
  5311. IN POINT);
  5312. ;end_winver_400
  5313. WINUSERAPI
  5314. BOOL
  5315. WINAPI
  5316. DrawIcon(
  5317. IN HDC hDC,
  5318. IN int X,
  5319. IN int Y,
  5320. IN HICON hIcon);
  5321. #ifndef NODRAWTEXT
  5322. /*
  5323. * DrawText() Format Flags
  5324. */
  5325. #define DT_TOP 0x00000000
  5326. #define DT_LEFT 0x00000000
  5327. #define DT_CENTER 0x00000001
  5328. #define DT_RIGHT 0x00000002
  5329. #define DT_VCENTER 0x00000004
  5330. #define DT_BOTTOM 0x00000008
  5331. #define DT_WORDBREAK 0x00000010
  5332. #define DT_SINGLELINE 0x00000020
  5333. #define DT_EXPANDTABS 0x00000040
  5334. #define DT_TABSTOP 0x00000080
  5335. #define DT_NOCLIP 0x00000100
  5336. #define DT_EXTERNALLEADING 0x00000200
  5337. #define DT_CALCRECT 0x00000400
  5338. #define DT_NOPREFIX 0x00000800
  5339. #define DT_INTERNAL 0x00001000
  5340. ;begin_winver_400
  5341. #define DT_EDITCONTROL 0x00002000
  5342. #define DT_PATH_ELLIPSIS 0x00004000
  5343. #define DT_END_ELLIPSIS 0x00008000
  5344. #define DT_MODIFYSTRING 0x00010000
  5345. #define DT_RTLREADING 0x00020000
  5346. #define DT_WORD_ELLIPSIS 0x00040000
  5347. #define DT_VALID 0x0007ffff /* union of all others */ ;internal_win40
  5348. ;begin_winver_500
  5349. #define DT_NOFULLWIDTHCHARBREAK 0x00080000
  5350. ;begin_if_(_WIN32_WINNT)_500
  5351. #define DT_HIDEPREFIX 0x00100000
  5352. #define DT_PREFIXONLY 0x00200000
  5353. ;end_if_(_WIN32_WINNT)_500
  5354. ;end_winver_500
  5355. typedef struct tagDRAWTEXTPARAMS
  5356. {
  5357. UINT cbSize;
  5358. int iTabLength;
  5359. int iLeftMargin;
  5360. int iRightMargin;
  5361. UINT uiLengthDrawn;
  5362. } DRAWTEXTPARAMS, FAR *LPDRAWTEXTPARAMS;
  5363. ;end_winver_400
  5364. #undef DT_VALID ;internal_cairo
  5365. #define DT_VALID (DT_CENTER | \ ;internal_cairo
  5366. DT_RIGHT | \ ;internal_cairo
  5367. DT_VCENTER | \ ;internal_cairo
  5368. DT_BOTTOM | \ ;internal_cairo
  5369. DT_WORDBREAK | \ ;internal_cairo
  5370. DT_SINGLELINE | \ ;internal_cairo
  5371. DT_EXPANDTABS | \ ;internal_cairo
  5372. DT_TABSTOP | \ ;internal_cairo
  5373. DT_NOCLIP | \ ;internal_cairo
  5374. DT_EXTERNALLEADING | \ ;internal_cairo
  5375. DT_CALCRECT | \ ;internal_cairo
  5376. DT_NOPREFIX | \ ;internal_cairo
  5377. DT_INTERNAL | \ ;internal_cairo
  5378. DT_EDITCONTROL | \ ;internal_cairo
  5379. DT_PATH_ELLIPSIS | \ ;internal_cairo
  5380. DT_END_ELLIPSIS | \ ;internal_cairo
  5381. DT_MODIFYSTRING | \ ;internal_cairo
  5382. DT_RTLREADING | \ ;internal_cairo
  5383. DT_WORD_ELLIPSIS | \ ;internal_cairo
  5384. DT_NOFULLWIDTHCHARBREAK |\ ;internal_cairo
  5385. DT_HIDEPREFIX | \ ;internal_cairo
  5386. DT_PREFIXONLY ) ;internal_cairo
  5387. ;begin_internal_NT_35
  5388. #define DT_CTABS 0xff00
  5389. #define DT_VALID (DT_TOP | \
  5390. DT_LEFT | \
  5391. DT_CENTER | \
  5392. DT_RIGHT | \
  5393. DT_VCENTER | \
  5394. DT_BOTTOM | \
  5395. DT_WORDBREAK | \
  5396. DT_SINGLELINE | \
  5397. DT_EXPANDTABS | \
  5398. DT_TABSTOP | \
  5399. DT_NOCLIP | \
  5400. DT_EXTERNALLEADING | \
  5401. DT_CALCRECT | \
  5402. DT_NOPREFIX | \
  5403. DT_INTERNAL | \
  5404. DT_CTABS)
  5405. ;end_internal_NT_35
  5406. WINUSERAPI
  5407. int
  5408. WINAPI
  5409. DrawText%(
  5410. IN HDC hDC,
  5411. IN LPCTSTR% lpString,
  5412. IN int nCount,
  5413. IN OUT LPRECT lpRect,
  5414. IN UINT uFormat);
  5415. ;begin_winver_400
  5416. WINUSERAPI
  5417. int
  5418. WINAPI
  5419. DrawTextEx%(
  5420. IN HDC,
  5421. IN OUT LPTSTR%,
  5422. IN int,
  5423. IN OUT LPRECT,
  5424. IN UINT,
  5425. IN LPDRAWTEXTPARAMS);
  5426. ;end_winver_400
  5427. #endif /* !NODRAWTEXT */
  5428. WINUSERAPI
  5429. BOOL
  5430. WINAPI
  5431. GrayString%(
  5432. IN HDC hDC,
  5433. IN HBRUSH hBrush,
  5434. IN GRAYSTRINGPROC lpOutputFunc,
  5435. IN LPARAM lpData,
  5436. IN int nCount,
  5437. IN int X,
  5438. IN int Y,
  5439. IN int nWidth,
  5440. IN int nHeight);
  5441. ;begin_winver_400
  5442. /* Monolithic state-drawing routine */
  5443. /* Image type */
  5444. #define DST_COMPLEX 0x0000
  5445. #define DST_TEXT 0x0001
  5446. #define DST_PREFIXTEXT 0x0002
  5447. #define DST_TEXTMAX 0x0002 ;internal
  5448. #define DST_ICON 0x0003
  5449. #define DST_BITMAP 0x0004
  5450. #define DST_GLYPH 0x0005 ;internal
  5451. #define DST_TYPEMASK 0x0007 ;internal
  5452. #define DST_GRAYSTRING 0x0008 ;internal
  5453. /* State type */
  5454. #define DSS_NORMAL 0x0000
  5455. #define DSS_UNION 0x0010 /* Gray string appearance */
  5456. #define DSS_DISABLED 0x0020
  5457. #define DSS_DEFAULT 0x0040 ;internal
  5458. #define DSS_MONO 0x0080
  5459. #define DSS_INACTIVE 0x0100 ;internal
  5460. ;begin_if_(_WIN32_WINNT)_500
  5461. #define DSS_HIDEPREFIX 0x0200
  5462. #define DSS_PREFIXONLY 0x0400
  5463. ;end_if_(_WIN32_WINNT)_500
  5464. #define DSS_RIGHT 0x8000
  5465. WINUSERAPI
  5466. BOOL
  5467. WINAPI
  5468. DrawState%(
  5469. IN HDC,
  5470. IN HBRUSH,
  5471. IN DRAWSTATEPROC,
  5472. IN LPARAM,
  5473. IN WPARAM,
  5474. IN int,
  5475. IN int,
  5476. IN int,
  5477. IN int,
  5478. IN UINT);
  5479. ;end_winver_400
  5480. WINUSERAPI
  5481. LONG
  5482. WINAPI
  5483. TabbedTextOut%(
  5484. IN HDC hDC,
  5485. IN int X,
  5486. IN int Y,
  5487. IN LPCTSTR% lpString,
  5488. IN int nCount,
  5489. IN int nTabPositions,
  5490. IN CONST INT *lpnTabStopPositions,
  5491. IN int nTabOrigin);
  5492. WINUSERAPI
  5493. DWORD
  5494. WINAPI
  5495. GetTabbedTextExtent%(
  5496. IN HDC hDC,
  5497. IN LPCTSTR% lpString,
  5498. IN int nCount,
  5499. IN int nTabPositions,
  5500. IN CONST INT *lpnTabStopPositions);
  5501. WINUSERAPI
  5502. BOOL
  5503. WINAPI
  5504. UpdateWindow(
  5505. IN HWND hWnd);
  5506. WINUSERAPI
  5507. HWND
  5508. WINAPI
  5509. SetActiveWindow(
  5510. IN HWND hWnd);
  5511. WINUSERAPI
  5512. HWND
  5513. WINAPI
  5514. GetForegroundWindow(
  5515. VOID);
  5516. ;begin_winver_400
  5517. WINUSERAPI
  5518. BOOL
  5519. WINAPI
  5520. PaintDesktop(
  5521. IN HDC hdc);
  5522. WINUSERAPI
  5523. VOID
  5524. WINAPI
  5525. SwitchToThisWindow(
  5526. IN HWND hwnd,
  5527. IN BOOL fUnknown);
  5528. ;end_winver_400
  5529. WINUSERAPI
  5530. BOOL
  5531. WINAPI
  5532. SetForegroundWindow(
  5533. IN HWND hWnd);
  5534. ;begin_if_(_WIN32_WINNT)_500
  5535. WINUSERAPI
  5536. BOOL
  5537. WINAPI
  5538. AllowSetForegroundWindow(
  5539. DWORD dwProcessId);
  5540. #define ASFW_ANY ((DWORD)-1)
  5541. WINUSERAPI
  5542. BOOL
  5543. WINAPI
  5544. LockSetForegroundWindow(
  5545. UINT uLockCode);
  5546. #define LSFW_LOCK 1
  5547. #define LSFW_UNLOCK 2
  5548. ;end_if_(_WIN32_WINNT)_500
  5549. WINUSERAPI
  5550. HWND
  5551. WINAPI
  5552. WindowFromDC(
  5553. IN HDC hDC);
  5554. WINUSERAPI
  5555. HDC
  5556. WINAPI
  5557. GetDC(
  5558. IN HWND hWnd);
  5559. WINUSERAPI
  5560. HDC
  5561. WINAPI
  5562. GetDCEx(
  5563. IN HWND hWnd,
  5564. IN HRGN hrgnClip,
  5565. IN DWORD flags);
  5566. /*
  5567. * GetDCEx() flags
  5568. */
  5569. #define DCX_WINDOW 0x00000001L
  5570. #define DCX_CACHE 0x00000002L
  5571. #define DCX_NORESETATTRS 0x00000004L
  5572. #define DCX_CLIPCHILDREN 0x00000008L
  5573. #define DCX_CLIPSIBLINGS 0x00000010L
  5574. #define DCX_PARENTCLIP 0x00000020L
  5575. #define DCX_EXCLUDERGN 0x00000040L
  5576. #define DCX_INTERSECTRGN 0x00000080L
  5577. #define DCX_EXCLUDEUPDATE 0x00000100L
  5578. #define DCX_INTERSECTUPDATE 0x00000200L
  5579. #define DCX_LOCKWINDOWUPDATE 0x00000400L
  5580. ;begin_internal
  5581. #define DCX_INVALID 0x00000800L
  5582. #define DCX_INUSE 0x00001000L
  5583. #define DCX_SAVEDRGNINVALID 0x00002000L
  5584. #define DCX_REDIRECTED 0x00004000L
  5585. #define DCX_OWNDC 0x00008000L
  5586. #define DCX_USESTYLE 0x00010000L
  5587. #define DCX_NEEDFONT 0x00020000L
  5588. #define DCX_NODELETERGN 0x00040000L
  5589. #define DCX_NOCLIPCHILDREN 0x00080000L
  5590. ;end_internal
  5591. #define DCX_NORECOMPUTE 0x00100000L ;internal
  5592. #define DCX_VALIDATE 0x00200000L
  5593. #define DCX_DESTROYTHIS 0x00400000L ;internal
  5594. #define DCX_CREATEDC 0x00800000L ;internal
  5595. ;begin_internal
  5596. #define DCX_REDIRECTEDBITMAP 0x08000000L
  5597. #define DCX_PWNDORGINVISIBLE 0x10000000L
  5598. #define DCX_NOMIRROR 0x40000000L // Don't RTL Mirror DC (RTL_MIRRORING)
  5599. ;end_internal
  5600. ;begin_internal_NT
  5601. #define DCX_MATCHMASK (DCX_WINDOW | \
  5602. DCX_CACHE | \
  5603. DCX_REDIRECTED | \
  5604. DCX_CLIPCHILDREN | \
  5605. DCX_CLIPSIBLINGS | \
  5606. DCX_NORESETATTRS | \
  5607. DCX_LOCKWINDOWUPDATE | \
  5608. DCX_CREATEDC)
  5609. #define DCX_VALID (DCX_WINDOW | \
  5610. DCX_CACHE | \
  5611. DCX_NORESETATTRS | \
  5612. DCX_CLIPCHILDREN | \
  5613. DCX_CLIPSIBLINGS | \
  5614. DCX_PARENTCLIP | \
  5615. DCX_EXCLUDERGN | \
  5616. DCX_INTERSECTRGN | \
  5617. DCX_EXCLUDEUPDATE | \
  5618. DCX_INTERSECTUPDATE | \
  5619. DCX_LOCKWINDOWUPDATE | \
  5620. DCX_INVALID | \
  5621. DCX_INUSE | \
  5622. DCX_SAVEDRGNINVALID | \
  5623. DCX_OWNDC | \
  5624. DCX_USESTYLE | \
  5625. DCX_NEEDFONT | \
  5626. DCX_NODELETERGN | \
  5627. DCX_NOCLIPCHILDREN | \
  5628. DCX_NORECOMPUTE | \
  5629. DCX_VALIDATE | \
  5630. DCX_DESTROYTHIS | \
  5631. DCX_CREATEDC)
  5632. /*
  5633. * DCX_MASK define valid DCX flags callable from applications.
  5634. * Note that DCX_USESTYLE and DCX_NODELETERGN should not be here.
  5635. * Themes uses them extensively so they are just an exception.
  5636. */
  5637. #define DCX_MASK (DCX_WINDOW | \
  5638. DCX_CACHE | \
  5639. DCX_NORESETATTRS | \
  5640. DCX_CLIPCHILDREN | \
  5641. DCX_CLIPSIBLINGS | \
  5642. DCX_PARENTCLIP | \
  5643. DCX_EXCLUDERGN | \
  5644. DCX_INTERSECTRGN | \
  5645. DCX_EXCLUDEUPDATE | \
  5646. DCX_INTERSECTUPDATE | \
  5647. DCX_LOCKWINDOWUPDATE | \
  5648. DCX_USESTYLE | \
  5649. DCX_NODELETERGN | \
  5650. DCX_VALIDATE)
  5651. ;end_internal_NT
  5652. ;begin_internal
  5653. WINUSERAPI
  5654. BOOL
  5655. WINAPI
  5656. AlignRects(
  5657. IN OUT LPRECT arc,
  5658. IN DWORD cCount,
  5659. IN DWORD iPrimary,
  5660. IN DWORD dwFlags);
  5661. //
  5662. // AlignRects flags
  5663. //
  5664. #define CUDR_NORMAL 0x0000
  5665. #define CUDR_NOSNAPTOGRID 0x0001
  5666. #define CUDR_NORESOLVEPOSITIONS 0x0002
  5667. #define CUDR_NOCLOSEGAPS 0x0004
  5668. #define CUDR_NOPRIMARY 0x0010
  5669. ;end_internal
  5670. WINUSERAPI
  5671. HDC
  5672. WINAPI
  5673. GetWindowDC(
  5674. IN HWND hWnd);
  5675. WINUSERAPI
  5676. int
  5677. WINAPI
  5678. ReleaseDC(
  5679. IN HWND hWnd,
  5680. IN HDC hDC);
  5681. WINUSERAPI
  5682. HDC
  5683. WINAPI
  5684. BeginPaint(
  5685. IN HWND hWnd,
  5686. OUT LPPAINTSTRUCT lpPaint);
  5687. WINUSERAPI
  5688. BOOL
  5689. WINAPI
  5690. EndPaint(
  5691. IN HWND hWnd,
  5692. IN CONST PAINTSTRUCT *lpPaint);
  5693. WINUSERAPI
  5694. BOOL
  5695. WINAPI
  5696. GetUpdateRect(
  5697. IN HWND hWnd,
  5698. OUT LPRECT lpRect,
  5699. IN BOOL bErase);
  5700. WINUSERAPI
  5701. int
  5702. WINAPI
  5703. GetUpdateRgn(
  5704. IN HWND hWnd,
  5705. IN HRGN hRgn,
  5706. IN BOOL bErase);
  5707. WINUSERAPI
  5708. int
  5709. WINAPI
  5710. SetWindowRgn(
  5711. IN HWND hWnd,
  5712. IN HRGN hRgn,
  5713. IN BOOL bRedraw);
  5714. ;begin_internal_501
  5715. ;begin_if_(_WIN32_WINNT)_501
  5716. typedef int (CALLBACK* SETWINDOWRGNPROC)(IN HWND hWnd, IN HRGN hRgn, IN BOOL bRedraw);
  5717. ;end_if_(_WIN32_WINNT)_501
  5718. ;end_internal_501
  5719. WINUSERAPI
  5720. int
  5721. WINAPI
  5722. GetWindowRgn(
  5723. IN HWND hWnd,
  5724. IN HRGN hRgn);
  5725. ;begin_if_(_WIN32_WINNT)_501
  5726. WINUSERAPI
  5727. int
  5728. WINAPI
  5729. GetWindowRgnBox(
  5730. IN HWND hWnd,
  5731. OUT LPRECT lprc);
  5732. ;end_if_(_WIN32_WINNT)_501
  5733. WINUSERAPI
  5734. int
  5735. WINAPI
  5736. ExcludeUpdateRgn(
  5737. IN HDC hDC,
  5738. IN HWND hWnd);
  5739. WINUSERAPI
  5740. BOOL
  5741. WINAPI
  5742. InvalidateRect(
  5743. IN HWND hWnd,
  5744. IN CONST RECT *lpRect,
  5745. IN BOOL bErase);
  5746. WINUSERAPI
  5747. BOOL
  5748. WINAPI
  5749. ValidateRect(
  5750. IN HWND hWnd,
  5751. IN CONST RECT *lpRect);
  5752. WINUSERAPI
  5753. BOOL
  5754. WINAPI
  5755. InvalidateRgn(
  5756. IN HWND hWnd,
  5757. IN HRGN hRgn,
  5758. IN BOOL bErase);
  5759. WINUSERAPI
  5760. BOOL
  5761. WINAPI
  5762. ValidateRgn(
  5763. IN HWND hWnd,
  5764. IN HRGN hRgn);
  5765. WINUSERAPI
  5766. BOOL
  5767. WINAPI
  5768. RedrawWindow(
  5769. IN HWND hWnd,
  5770. IN CONST RECT *lprcUpdate,
  5771. IN HRGN hrgnUpdate,
  5772. IN UINT flags);
  5773. /*
  5774. * RedrawWindow() flags
  5775. */
  5776. #define RDW_INVALIDATE 0x0001
  5777. #define RDW_INTERNALPAINT 0x0002
  5778. #define RDW_ERASE 0x0004
  5779. #define RDW_VALIDATE 0x0008
  5780. #define RDW_NOINTERNALPAINT 0x0010
  5781. #define RDW_NOERASE 0x0020
  5782. #define RDW_NOCHILDREN 0x0040
  5783. #define RDW_ALLCHILDREN 0x0080
  5784. #define RDW_UPDATENOW 0x0100
  5785. #define RDW_ERASENOW 0x0200
  5786. #define RDW_FRAME 0x0400
  5787. #define RDW_NOFRAME 0x0800
  5788. ;begin_internal
  5789. #define RDW_REDRAWWINDOW 0x1000 /* Called from RedrawWindow()*/
  5790. #define RDW_SUBTRACTSELF 0x2000 /* Subtract self from hrgn */
  5791. #define RDW_COPYRGN 0x4000 /* Copy the passed-in region */
  5792. #define RDW_IGNOREUPDATEDIRTY 0x8000 /* Ignore WFUPDATEDIRTY */
  5793. #define RDW_INVALIDATELAYERS 0x00010000 /* Allow layered windows invalidation */
  5794. ;end_internal
  5795. ;begin_internal_NT
  5796. #define RDW_VALIDMASK (RDW_INVALIDATE | \
  5797. RDW_INTERNALPAINT | \
  5798. RDW_ERASE | \
  5799. RDW_VALIDATE | \
  5800. RDW_NOINTERNALPAINT | \
  5801. RDW_NOERASE | \
  5802. RDW_NOCHILDREN | \
  5803. RDW_ALLCHILDREN | \
  5804. RDW_UPDATENOW | \
  5805. RDW_ERASENOW | \
  5806. RDW_FRAME | \
  5807. RDW_NOFRAME)
  5808. ;end_internal_NT
  5809. /*
  5810. * LockWindowUpdate API
  5811. */
  5812. WINUSERAPI
  5813. BOOL
  5814. WINAPI
  5815. LockWindowUpdate(
  5816. IN HWND hWndLock);
  5817. WINUSERAPI
  5818. BOOL
  5819. WINAPI
  5820. ScrollWindow(
  5821. IN HWND hWnd,
  5822. IN int XAmount,
  5823. IN int YAmount,
  5824. IN CONST RECT *lpRect,
  5825. IN CONST RECT *lpClipRect);
  5826. WINUSERAPI
  5827. BOOL
  5828. WINAPI
  5829. ScrollDC(
  5830. IN HDC hDC,
  5831. IN int dx,
  5832. IN int dy,
  5833. IN CONST RECT *lprcScroll,
  5834. IN CONST RECT *lprcClip,
  5835. IN HRGN hrgnUpdate,
  5836. OUT LPRECT lprcUpdate);
  5837. WINUSERAPI
  5838. int
  5839. WINAPI
  5840. ScrollWindowEx(
  5841. IN HWND hWnd,
  5842. IN int dx,
  5843. IN int dy,
  5844. IN CONST RECT *prcScroll,
  5845. IN CONST RECT *prcClip,
  5846. IN HRGN hrgnUpdate,
  5847. OUT LPRECT prcUpdate,
  5848. IN UINT flags);
  5849. #define SW_SCROLLCHILDREN 0x0001 /* Scroll children within *lprcScroll. */
  5850. #define SW_INVALIDATE 0x0002 /* Invalidate after scrolling */
  5851. #define SW_ERASE 0x0004 /* If SW_INVALIDATE, don't send WM_ERASEBACKGROUND */
  5852. ;begin_winver_500
  5853. #define SW_SMOOTHSCROLL 0x0010 /* Use smooth scrolling */
  5854. #define SW_EXACTTIME 0x0020 ;internal
  5855. ;end_winver_500
  5856. #define SW_SCROLLWINDOW 0x8000 /* Called from ScrollWindow() */ ;internal
  5857. ;begin_internal_NT
  5858. #define SW_VALIDFLAGS (SW_SCROLLWINDOW | \
  5859. SW_SCROLLCHILDREN | \
  5860. SW_INVALIDATE | \
  5861. SW_SMOOTHSCROLL | \
  5862. SW_EXACTTIME | \
  5863. SW_ERASE)
  5864. ;end_internal_NT
  5865. #ifndef NOSCROLL
  5866. WINUSERAPI
  5867. int
  5868. WINAPI
  5869. SetScrollPos(
  5870. IN HWND hWnd,
  5871. IN int nBar,
  5872. IN int nPos,
  5873. IN BOOL bRedraw);
  5874. WINUSERAPI
  5875. int
  5876. WINAPI
  5877. GetScrollPos(
  5878. IN HWND hWnd,
  5879. IN int nBar);
  5880. WINUSERAPI
  5881. BOOL
  5882. WINAPI
  5883. SetScrollRange(
  5884. IN HWND hWnd,
  5885. IN int nBar,
  5886. IN int nMinPos,
  5887. IN int nMaxPos,
  5888. IN BOOL bRedraw);
  5889. WINUSERAPI
  5890. BOOL
  5891. WINAPI
  5892. GetScrollRange(
  5893. IN HWND hWnd,
  5894. IN int nBar,
  5895. OUT LPINT lpMinPos,
  5896. OUT LPINT lpMaxPos);
  5897. WINUSERAPI
  5898. BOOL
  5899. WINAPI
  5900. ShowScrollBar(
  5901. IN HWND hWnd,
  5902. IN int wBar,
  5903. IN BOOL bShow);
  5904. WINUSERAPI
  5905. BOOL
  5906. WINAPI
  5907. EnableScrollBar(
  5908. IN HWND hWnd,
  5909. IN UINT wSBflags,
  5910. IN UINT wArrows);
  5911. ;begin_internal_501
  5912. ;begin_if_(_WIN32_WINNT)_501
  5913. typedef BOOL (CALLBACK* ENABLESCROLLBARPROC)(IN HWND hWnd, IN UINT wSBflags, IN UINT wArrows);
  5914. ;end_if_(_WIN32_WINNT)_501
  5915. ;end_internal_501
  5916. /*
  5917. * EnableScrollBar() flags
  5918. */
  5919. #define ESB_ENABLE_BOTH 0x0000
  5920. #define ESB_DISABLE_BOTH 0x0003
  5921. #define ESB_DISABLE_LEFT 0x0001
  5922. #define ESB_DISABLE_RIGHT 0x0002
  5923. #define ESB_DISABLE_UP 0x0001
  5924. #define ESB_DISABLE_DOWN 0x0002
  5925. #define ESB_DISABLE_LTUP ESB_DISABLE_LEFT
  5926. #define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT
  5927. #define ESB_MAX 0x0003 ;internal_NT
  5928. #define SB_DISABLE_MASK ESB_DISABLE_BOTH ;internal_NT
  5929. #endif /* !NOSCROLL */
  5930. WINUSERAPI
  5931. BOOL
  5932. WINAPI
  5933. SetProp%(
  5934. IN HWND hWnd,
  5935. IN LPCTSTR% lpString,
  5936. IN HANDLE hData);
  5937. WINUSERAPI
  5938. HANDLE
  5939. WINAPI
  5940. GetProp%(
  5941. IN HWND hWnd,
  5942. IN LPCTSTR% lpString);
  5943. WINUSERAPI
  5944. HANDLE
  5945. WINAPI
  5946. RemoveProp%(
  5947. IN HWND hWnd,
  5948. IN LPCTSTR% lpString);
  5949. WINUSERAPI
  5950. int
  5951. WINAPI
  5952. EnumPropsEx%(
  5953. IN HWND hWnd,
  5954. IN PROPENUMPROCEX% lpEnumFunc,
  5955. IN LPARAM lParam);
  5956. WINUSERAPI
  5957. int
  5958. WINAPI
  5959. EnumProps%(
  5960. IN HWND hWnd,
  5961. IN PROPENUMPROC% lpEnumFunc);
  5962. WINUSERAPI
  5963. BOOL
  5964. WINAPI
  5965. SetWindowText%(
  5966. IN HWND hWnd,
  5967. IN LPCTSTR% lpString);
  5968. WINUSERAPI
  5969. int
  5970. WINAPI
  5971. GetWindowText%(
  5972. IN HWND hWnd,
  5973. OUT LPTSTR% lpString,
  5974. IN int nMaxCount);
  5975. WINUSERAPI
  5976. int
  5977. WINAPI
  5978. GetWindowTextLength%(
  5979. IN HWND hWnd);
  5980. WINUSERAPI
  5981. BOOL
  5982. WINAPI
  5983. GetClientRect(
  5984. IN HWND hWnd,
  5985. OUT LPRECT lpRect);
  5986. WINUSERAPI
  5987. BOOL
  5988. WINAPI
  5989. GetWindowRect(
  5990. IN HWND hWnd,
  5991. OUT LPRECT lpRect);
  5992. WINUSERAPI
  5993. BOOL
  5994. WINAPI
  5995. AdjustWindowRect(
  5996. IN OUT LPRECT lpRect,
  5997. IN DWORD dwStyle,
  5998. IN BOOL bMenu);
  5999. WINUSERAPI
  6000. BOOL
  6001. WINAPI
  6002. AdjustWindowRectEx(
  6003. IN OUT LPRECT lpRect,
  6004. IN DWORD dwStyle,
  6005. IN BOOL bMenu,
  6006. IN DWORD dwExStyle);
  6007. ;begin_internal_501
  6008. ;begin_if_(_WIN32_WINNT)_501
  6009. typedef BOOL (CALLBACK* ADJUSTWINDOWRECTEXPROC)(IN OUT LPRECT lpRect, IN DWORD dwStyle,
  6010. IN BOOL bMenu, IN DWORD dwExStyle);
  6011. ;end_if_(_WIN32_WINNT)_501
  6012. ;end_internal_501
  6013. ;begin_winver_400
  6014. #define HELPINFO_WINDOW 0x0001
  6015. #define HELPINFO_MENUITEM 0x0002
  6016. typedef struct tagHELPINFO /* Structure pointed to by lParam of WM_HELP */
  6017. {
  6018. UINT cbSize; /* Size in bytes of this struct */
  6019. int iContextType; /* Either HELPINFO_WINDOW or HELPINFO_MENUITEM */
  6020. int iCtrlId; /* Control Id or a Menu item Id. */
  6021. HANDLE hItemHandle; /* hWnd of control or hMenu. */
  6022. DWORD_PTR dwContextId; /* Context Id associated with this item */
  6023. POINT MousePos; /* Mouse Position in screen co-ordinates */
  6024. } HELPINFO, FAR *LPHELPINFO;
  6025. WINUSERAPI
  6026. BOOL
  6027. WINAPI
  6028. SetWindowContextHelpId(
  6029. IN HWND,
  6030. IN DWORD);
  6031. WINUSERAPI
  6032. DWORD
  6033. WINAPI
  6034. GetWindowContextHelpId(
  6035. IN HWND);
  6036. WINUSERAPI
  6037. BOOL
  6038. WINAPI
  6039. SetMenuContextHelpId(
  6040. IN HMENU,
  6041. IN DWORD);
  6042. WINUSERAPI
  6043. DWORD
  6044. WINAPI
  6045. GetMenuContextHelpId(
  6046. IN HMENU);
  6047. ;end_winver_400
  6048. ;begin_internal_NT
  6049. /*
  6050. * Help Engine stuff
  6051. *
  6052. * Note: for Chicago this is in winhelp.h and called WINHLP
  6053. */
  6054. typedef struct {
  6055. WORD cbData; /* Size of data */
  6056. WORD usCommand; /* Command to execute */
  6057. ULONG_PTR ulTopic; /* Topic/context number (if needed) */
  6058. DWORD ulReserved; /* Reserved (internal use) */
  6059. WORD offszHelpFile; /* Offset to help file in block */
  6060. WORD offabData; /* Offset to other data in block */
  6061. } HLP, *LPHLP;
  6062. ;end_internal_NT
  6063. #ifndef NOMB
  6064. /*
  6065. * MessageBox() Flags
  6066. */
  6067. #define MB_OK 0x00000000L
  6068. #define MB_OKCANCEL 0x00000001L
  6069. #define MB_ABORTRETRYIGNORE 0x00000002L
  6070. #define MB_YESNOCANCEL 0x00000003L
  6071. #define MB_YESNO 0x00000004L
  6072. #define MB_RETRYCANCEL 0x00000005L
  6073. ;begin_winver_500
  6074. #define MB_CANCELTRYCONTINUE 0x00000006L
  6075. ;end_winver_500
  6076. ;begin_internal
  6077. #if(WINVER >= 0x0500)
  6078. #define MB_LASTVALIDTYPE MB_CANCELTRYCONTINUE
  6079. #else
  6080. #define MB_LASTVALIDTYPE MB_RETRYCANCEL
  6081. #endif
  6082. ;end_internal
  6083. #define MB_ICONHAND 0x00000010L
  6084. #define MB_ICONQUESTION 0x00000020L
  6085. #define MB_ICONEXCLAMATION 0x00000030L
  6086. #define MB_ICONASTERISK 0x00000040L
  6087. ;begin_winver_400
  6088. #define MB_USERICON 0x00000080L
  6089. #define MB_ICONWARNING MB_ICONEXCLAMATION
  6090. #define MB_ICONERROR MB_ICONHAND
  6091. ;end_winver_400
  6092. #define MB_ICONINFORMATION MB_ICONASTERISK
  6093. #define MB_ICONSTOP MB_ICONHAND
  6094. #define MB_DEFBUTTON1 0x00000000L
  6095. #define MB_DEFBUTTON2 0x00000100L
  6096. #define MB_DEFBUTTON3 0x00000200L
  6097. ;begin_winver_400
  6098. #define MB_DEFBUTTON4 0x00000300L
  6099. ;end_winver_400
  6100. #define MB_APPLMODAL 0x00000000L
  6101. #define MB_SYSTEMMODAL 0x00001000L
  6102. #define MB_TASKMODAL 0x00002000L
  6103. ;begin_winver_400
  6104. #define MB_HELP 0x00004000L // Help Button
  6105. ;end_winver_400
  6106. #define MB_NOFOCUS 0x00008000L
  6107. #define MB_SETFOREGROUND 0x00010000L
  6108. #define MB_DEFAULT_DESKTOP_ONLY 0x00020000L
  6109. ;begin_winver_400
  6110. #define MB_TOPMOST 0x00040000L
  6111. #define MB_RIGHT 0x00080000L
  6112. #define MB_RTLREADING 0x00100000L
  6113. #define MBEX_VALIDL 0xf3f7 ;internal
  6114. #define MBEX_VALIDH 1 ;internal
  6115. ;end_winver_400
  6116. #ifdef _WIN32_WINNT
  6117. #if (_WIN32_WINNT >= 0x0400)
  6118. #define MB_SERVICE_NOTIFICATION 0x00200000L
  6119. #else
  6120. #define MB_SERVICE_NOTIFICATION 0x00040000L
  6121. #endif
  6122. #define MB_SERVICE_NOTIFICATION_NT3X 0x00040000L
  6123. #endif
  6124. #define MB_TYPEMASK 0x0000000FL
  6125. #define MB_ICONMASK 0x000000F0L
  6126. #define MB_DEFMASK 0x00000F00L
  6127. #define MB_MODEMASK 0x00003000L
  6128. #define MB_MISCMASK 0x0000C000L
  6129. WINUSERAPI
  6130. int
  6131. WINAPI
  6132. MessageBox%(
  6133. IN HWND hWnd,
  6134. IN LPCTSTR% lpText,
  6135. IN LPCTSTR% lpCaption,
  6136. IN UINT uType);
  6137. WINUSERAPI
  6138. int
  6139. WINAPI
  6140. MessageBoxEx%(
  6141. IN HWND hWnd,
  6142. IN LPCTSTR% lpText,
  6143. IN LPCTSTR% lpCaption,
  6144. IN UINT uType,
  6145. IN WORD wLanguageId);
  6146. ;begin_winver_400
  6147. typedef void (CALLBACK *MSGBOXCALLBACK)(LPHELPINFO lpHelpInfo);
  6148. typedef struct tagMSGBOXPARAMS%
  6149. {
  6150. UINT cbSize;
  6151. HWND hwndOwner;
  6152. HINSTANCE hInstance;
  6153. LPCTSTR% lpszText;
  6154. LPCTSTR% lpszCaption;
  6155. DWORD dwStyle;
  6156. LPCTSTR% lpszIcon;
  6157. DWORD_PTR dwContextHelpId;
  6158. MSGBOXCALLBACK lpfnMsgBoxCallback;
  6159. DWORD dwLanguageId;
  6160. } MSGBOXPARAMS%, *PMSGBOXPARAMS%, *LPMSGBOXPARAMS%;
  6161. WINUSERAPI
  6162. int
  6163. WINAPI
  6164. MessageBoxIndirect%(
  6165. IN CONST MSGBOXPARAMS% *);
  6166. ;end_winver_400
  6167. ;begin_internal_501
  6168. WINUSERAPI
  6169. int
  6170. WINAPI
  6171. MessageBoxTimeout%(
  6172. IN HWND hWnd,
  6173. IN LPCTSTR% lpText,
  6174. IN LPCTSTR% lpCaption,
  6175. IN UINT uType,
  6176. IN WORD wLanguageId,
  6177. IN DWORD dwTimeout);
  6178. ;end_internal_501
  6179. ;begin_internal_NT_35
  6180. #define MB_VALID (MB_OK | \
  6181. MB_OKCANCEL | \
  6182. MB_ABORTRETRYIGNORE | \
  6183. MB_YESNOCANCEL | \
  6184. MB_YESNO | \
  6185. MB_RETRYCANCEL | \
  6186. MB_ICONHAND | \
  6187. MB_ICONQUESTION | \
  6188. MB_ICONEXCLAMATION | \
  6189. MB_ICONASTERISK | \
  6190. MB_DEFBUTTON1 | \
  6191. MB_DEFBUTTON2 | \
  6192. MB_DEFBUTTON3 | \
  6193. MB_APPLMODAL | \
  6194. MB_SYSTEMMODAL | \
  6195. MB_TASKMODAL | \
  6196. MB_NOFOCUS | \
  6197. MB_SETFOREGROUND | \
  6198. MB_DEFAULT_DESKTOP_ONLY | \
  6199. MB_SERVICE_NOTIFICATION | \
  6200. MB_TYPEMASK | \
  6201. MB_ICONMASK | \
  6202. MB_DEFMASK | \
  6203. MB_MODEMASK | \
  6204. MB_MISCMASK)
  6205. ;end_internal_NT_35
  6206. ;begin_internal_cairo
  6207. #define MB_VALID (MB_OK | \
  6208. MB_OKCANCEL | \
  6209. MB_ABORTRETRYIGNORE | \
  6210. MB_YESNOCANCEL | \
  6211. MB_YESNO | \
  6212. MB_RETRYCANCEL | \
  6213. MB_ICONHAND | \
  6214. MB_ICONQUESTION | \
  6215. MB_ICONEXCLAMATION | \
  6216. MB_ICONASTERISK | \
  6217. MB_DEFBUTTON1 | \
  6218. MB_DEFBUTTON2 | \
  6219. MB_DEFBUTTON3 | \
  6220. MB_DEFBUTTON4 | \
  6221. MB_APPLMODAL | \
  6222. MB_SYSTEMMODAL | \
  6223. MB_TASKMODAL | \
  6224. MB_HELP | \
  6225. MB_TOPMOST | \
  6226. MB_RIGHT | \
  6227. MB_RTLREADING | \
  6228. MB_NOFOCUS | \
  6229. MB_SETFOREGROUND | \
  6230. MB_DEFAULT_DESKTOP_ONLY | \
  6231. MB_SERVICE_NOTIFICATION | \
  6232. MB_TYPEMASK | \
  6233. MB_USERICON | \
  6234. MB_ICONMASK | \
  6235. MB_DEFMASK | \
  6236. MB_MODEMASK | \
  6237. MB_MISCMASK)
  6238. ;end_internal_cairo
  6239. WINUSERAPI
  6240. BOOL
  6241. WINAPI
  6242. MessageBeep(
  6243. IN UINT uType);
  6244. #endif /* !NOMB */
  6245. WINUSERAPI
  6246. int
  6247. WINAPI
  6248. ShowCursor(
  6249. IN BOOL bShow);
  6250. WINUSERAPI
  6251. BOOL
  6252. WINAPI
  6253. SetCursorPos(
  6254. IN int X,
  6255. IN int Y);
  6256. WINUSERAPI
  6257. HCURSOR
  6258. WINAPI
  6259. SetCursor(
  6260. IN HCURSOR hCursor);
  6261. WINUSERAPI
  6262. BOOL
  6263. WINAPI
  6264. GetCursorPos(
  6265. OUT LPPOINT lpPoint);
  6266. WINUSERAPI
  6267. BOOL
  6268. WINAPI
  6269. ClipCursor(
  6270. IN CONST RECT *lpRect);
  6271. WINUSERAPI
  6272. BOOL
  6273. WINAPI
  6274. GetClipCursor(
  6275. OUT LPRECT lpRect);
  6276. WINUSERAPI
  6277. HCURSOR
  6278. WINAPI
  6279. GetCursor(
  6280. VOID);
  6281. WINUSERAPI
  6282. BOOL
  6283. WINAPI
  6284. CreateCaret(
  6285. IN HWND hWnd,
  6286. IN HBITMAP hBitmap,
  6287. IN int nWidth,
  6288. IN int nHeight);
  6289. WINUSERAPI
  6290. UINT
  6291. WINAPI
  6292. GetCaretBlinkTime(
  6293. VOID);
  6294. WINUSERAPI
  6295. BOOL
  6296. WINAPI
  6297. SetCaretBlinkTime(
  6298. IN UINT uMSeconds);
  6299. WINUSERAPI
  6300. BOOL
  6301. WINAPI
  6302. DestroyCaret(
  6303. VOID);
  6304. WINUSERAPI
  6305. BOOL
  6306. WINAPI
  6307. HideCaret(
  6308. IN HWND hWnd);
  6309. WINUSERAPI
  6310. BOOL
  6311. WINAPI
  6312. ShowCaret(
  6313. IN HWND hWnd);
  6314. WINUSERAPI
  6315. BOOL
  6316. WINAPI
  6317. SetCaretPos(
  6318. IN int X,
  6319. IN int Y);
  6320. WINUSERAPI
  6321. BOOL
  6322. WINAPI
  6323. GetCaretPos(
  6324. OUT LPPOINT lpPoint);
  6325. WINUSERAPI
  6326. BOOL
  6327. WINAPI
  6328. ClientToScreen(
  6329. IN HWND hWnd,
  6330. IN OUT LPPOINT lpPoint);
  6331. WINUSERAPI
  6332. BOOL
  6333. WINAPI
  6334. ScreenToClient(
  6335. IN HWND hWnd,
  6336. IN OUT LPPOINT lpPoint);
  6337. WINUSERAPI
  6338. int
  6339. WINAPI
  6340. MapWindowPoints(
  6341. IN HWND hWndFrom,
  6342. IN HWND hWndTo,
  6343. IN OUT LPPOINT lpPoints,
  6344. IN UINT cPoints);
  6345. WINUSERAPI
  6346. HWND
  6347. WINAPI
  6348. WindowFromPoint(
  6349. IN POINT Point);
  6350. WINUSERAPI
  6351. HWND
  6352. WINAPI
  6353. ChildWindowFromPoint(
  6354. IN HWND hWndParent,
  6355. IN POINT Point);
  6356. ;begin_winver_400
  6357. #define CWP_ALL 0x0000
  6358. #define CWP_SKIPINVISIBLE 0x0001
  6359. #define CWP_SKIPDISABLED 0x0002
  6360. #define CWP_SKIPTRANSPARENT 0x0004
  6361. #define CWP_VALID (CWP_SKIPINVISIBLE | CWP_SKIPDISABLED | CWP_SKIPTRANSPARENT) ;internal
  6362. WINUSERAPI HWND WINAPI ChildWindowFromPointEx( IN HWND, IN POINT, IN UINT);
  6363. ;end_winver_400
  6364. #ifndef NOCOLOR
  6365. /*
  6366. * Color Types
  6367. */
  6368. #define CTLCOLOR_MSGBOX 0
  6369. #define CTLCOLOR_EDIT 1
  6370. #define CTLCOLOR_LISTBOX 2
  6371. #define CTLCOLOR_BTN 3
  6372. #define CTLCOLOR_DLG 4
  6373. #define CTLCOLOR_SCROLLBAR 5
  6374. #define CTLCOLOR_STATIC 6
  6375. #define CTLCOLOR_MAX 7
  6376. #define COLOR_SCROLLBAR 0
  6377. #define COLOR_BACKGROUND 1
  6378. #define COLOR_ACTIVECAPTION 2
  6379. #define COLOR_INACTIVECAPTION 3
  6380. #define COLOR_MENU 4
  6381. #define COLOR_WINDOW 5
  6382. #define COLOR_WINDOWFRAME 6
  6383. #define COLOR_MENUTEXT 7
  6384. #define COLOR_WINDOWTEXT 8
  6385. #define COLOR_CAPTIONTEXT 9
  6386. #define COLOR_ACTIVEBORDER 10
  6387. #define COLOR_INACTIVEBORDER 11
  6388. #define COLOR_APPWORKSPACE 12
  6389. #define COLOR_HIGHLIGHT 13
  6390. #define COLOR_HIGHLIGHTTEXT 14
  6391. #define COLOR_BTNFACE 15
  6392. #define COLOR_BTNSHADOW 16
  6393. #define COLOR_GRAYTEXT 17
  6394. #define COLOR_BTNTEXT 18
  6395. #define COLOR_INACTIVECAPTIONTEXT 19
  6396. #define COLOR_BTNHIGHLIGHT 20
  6397. ;begin_winver_400
  6398. #define COLOR_3DDKSHADOW 21
  6399. #define COLOR_3DLIGHT 22
  6400. #define COLOR_INFOTEXT 23
  6401. #define COLOR_INFOBK 24
  6402. ;end_winver_400
  6403. ;begin_winver_500
  6404. #define COLOR_3DALTFACE 25 ;internal_500
  6405. #define COLOR_HOTLIGHT 26
  6406. #define COLOR_GRADIENTACTIVECAPTION 27
  6407. #define COLOR_GRADIENTINACTIVECAPTION 28
  6408. ;begin_winver_501
  6409. #define COLOR_MENUHILIGHT 29
  6410. #define COLOR_MENUBAR 30
  6411. ;end_winver_501
  6412. ;end_winver_500
  6413. ;begin_winver_400
  6414. #define COLOR_DESKTOP COLOR_BACKGROUND
  6415. #define COLOR_3DFACE COLOR_BTNFACE
  6416. #define COLOR_3DSHADOW COLOR_BTNSHADOW
  6417. #define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT
  6418. #define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT
  6419. #define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT
  6420. ;end_winver_400
  6421. ;begin_internal
  6422. ;begin_winver_501
  6423. #define COLOR_ENDCOLORS COLOR_MENUBAR
  6424. #else
  6425. #define COLOR_ENDCOLORS COLOR_INFOBK
  6426. ;end_winver_501
  6427. #define COLOR_MAX (COLOR_ENDCOLORS+1)
  6428. ;end_internal
  6429. WINUSERAPI
  6430. DWORD
  6431. WINAPI
  6432. GetSysColor(
  6433. IN int nIndex);
  6434. ;begin_winver_400
  6435. WINUSERAPI
  6436. HBRUSH
  6437. WINAPI
  6438. GetSysColorBrush(
  6439. IN int nIndex);
  6440. ;begin_internal
  6441. WINUSERAPI
  6442. HANDLE
  6443. WINAPI
  6444. SetSysColorsTemp(
  6445. IN CONST COLORREF *,
  6446. IN CONST HBRUSH *,
  6447. IN UINT_PTR wCnt);
  6448. ;end_internal
  6449. ;end_winver_400
  6450. WINUSERAPI
  6451. BOOL
  6452. WINAPI
  6453. SetSysColors(
  6454. IN int cElements,
  6455. IN CONST INT * lpaElements,
  6456. IN CONST COLORREF * lpaRgbValues);
  6457. #endif /* !NOCOLOR */
  6458. WINUSERAPI
  6459. BOOL
  6460. WINAPI
  6461. DrawFocusRect(
  6462. IN HDC hDC,
  6463. IN CONST RECT * lprc);
  6464. WINUSERAPI
  6465. int
  6466. WINAPI
  6467. FillRect(
  6468. IN HDC hDC,
  6469. IN CONST RECT *lprc,
  6470. IN HBRUSH hbr);
  6471. WINUSERAPI
  6472. int
  6473. WINAPI
  6474. FrameRect(
  6475. IN HDC hDC,
  6476. IN CONST RECT *lprc,
  6477. IN HBRUSH hbr);
  6478. WINUSERAPI
  6479. BOOL
  6480. WINAPI
  6481. InvertRect(
  6482. IN HDC hDC,
  6483. IN CONST RECT *lprc);
  6484. WINUSERAPI
  6485. BOOL
  6486. WINAPI
  6487. SetRect(
  6488. OUT LPRECT lprc,
  6489. IN int xLeft,
  6490. IN int yTop,
  6491. IN int xRight,
  6492. IN int yBottom);
  6493. WINUSERAPI
  6494. BOOL
  6495. WINAPI
  6496. SetRectEmpty(
  6497. OUT LPRECT lprc);
  6498. WINUSERAPI
  6499. BOOL
  6500. WINAPI
  6501. CopyRect(
  6502. OUT LPRECT lprcDst,
  6503. IN CONST RECT *lprcSrc);
  6504. WINUSERAPI
  6505. BOOL
  6506. WINAPI
  6507. InflateRect(
  6508. IN OUT LPRECT lprc,
  6509. IN int dx,
  6510. IN int dy);
  6511. WINUSERAPI
  6512. BOOL
  6513. WINAPI
  6514. IntersectRect(
  6515. OUT LPRECT lprcDst,
  6516. IN CONST RECT *lprcSrc1,
  6517. IN CONST RECT *lprcSrc2);
  6518. WINUSERAPI
  6519. BOOL
  6520. WINAPI
  6521. UnionRect(
  6522. OUT LPRECT lprcDst,
  6523. IN CONST RECT *lprcSrc1,
  6524. IN CONST RECT *lprcSrc2);
  6525. WINUSERAPI
  6526. BOOL
  6527. WINAPI
  6528. SubtractRect(
  6529. OUT LPRECT lprcDst,
  6530. IN CONST RECT *lprcSrc1,
  6531. IN CONST RECT *lprcSrc2);
  6532. WINUSERAPI
  6533. BOOL
  6534. WINAPI
  6535. OffsetRect(
  6536. IN OUT LPRECT lprc,
  6537. IN int dx,
  6538. IN int dy);
  6539. WINUSERAPI
  6540. BOOL
  6541. WINAPI
  6542. IsRectEmpty(
  6543. IN CONST RECT *lprc);
  6544. WINUSERAPI
  6545. BOOL
  6546. WINAPI
  6547. EqualRect(
  6548. IN CONST RECT *lprc1,
  6549. IN CONST RECT *lprc2);
  6550. WINUSERAPI
  6551. BOOL
  6552. WINAPI
  6553. PtInRect(
  6554. IN CONST RECT *lprc,
  6555. IN POINT pt);
  6556. #ifndef NOWINOFFSETS
  6557. WINUSERAPI
  6558. WORD
  6559. WINAPI
  6560. GetWindowWord(
  6561. IN HWND hWnd,
  6562. IN int nIndex);
  6563. WINUSERAPI
  6564. WORD
  6565. WINAPI
  6566. SetWindowWord(
  6567. IN HWND hWnd,
  6568. IN int nIndex,
  6569. IN WORD wNewWord);
  6570. WINUSERAPI
  6571. LONG
  6572. WINAPI
  6573. GetWindowLong%(
  6574. IN HWND hWnd,
  6575. IN int nIndex);
  6576. WINUSERAPI
  6577. LONG
  6578. WINAPI
  6579. SetWindowLong%(
  6580. IN HWND hWnd,
  6581. IN int nIndex,
  6582. IN LONG dwNewLong);
  6583. #ifdef _WIN64
  6584. WINUSERAPI
  6585. LONG_PTR
  6586. WINAPI
  6587. GetWindowLongPtr%(
  6588. HWND hWnd,
  6589. int nIndex);
  6590. WINUSERAPI
  6591. LONG_PTR
  6592. WINAPI
  6593. SetWindowLongPtr%(
  6594. HWND hWnd,
  6595. int nIndex,
  6596. LONG_PTR dwNewLong);
  6597. #else /* _WIN64 */
  6598. #define GetWindowLongPtr% GetWindowLong%
  6599. #define SetWindowLongPtr% SetWindowLong%
  6600. #endif /* _WIN64 */
  6601. WINUSERAPI
  6602. WORD
  6603. WINAPI
  6604. GetClassWord(
  6605. IN HWND hWnd,
  6606. IN int nIndex);
  6607. WINUSERAPI
  6608. WORD
  6609. WINAPI
  6610. SetClassWord(
  6611. IN HWND hWnd,
  6612. IN int nIndex,
  6613. IN WORD wNewWord);
  6614. WINUSERAPI
  6615. DWORD
  6616. WINAPI
  6617. GetClassLong%(
  6618. IN HWND hWnd,
  6619. IN int nIndex);
  6620. WINUSERAPI
  6621. DWORD
  6622. WINAPI
  6623. SetClassLong%(
  6624. IN HWND hWnd,
  6625. IN int nIndex,
  6626. IN LONG dwNewLong);
  6627. #ifdef _WIN64
  6628. WINUSERAPI
  6629. ULONG_PTR
  6630. WINAPI
  6631. GetClassLongPtr%(
  6632. IN HWND hWnd,
  6633. IN int nIndex);
  6634. WINUSERAPI
  6635. ULONG_PTR
  6636. WINAPI
  6637. SetClassLongPtr%(
  6638. IN HWND hWnd,
  6639. IN int nIndex,
  6640. IN LONG_PTR dwNewLong);
  6641. #else /* _WIN64 */
  6642. #define GetClassLongPtr% GetClassLong%
  6643. #define SetClassLongPtr% SetClassLong%
  6644. #endif /* _WIN64 */
  6645. #endif /* !NOWINOFFSETS */
  6646. ;begin_winver_500
  6647. ;begin_internal
  6648. /*
  6649. * RTL Mirroring APIs (RTL_MIRRORING)
  6650. */
  6651. ;end_internal
  6652. WINUSERAPI
  6653. BOOL
  6654. WINAPI
  6655. GetProcessDefaultLayout(
  6656. OUT DWORD *pdwDefaultLayout);
  6657. WINUSERAPI
  6658. BOOL
  6659. WINAPI
  6660. SetProcessDefaultLayout(
  6661. IN DWORD dwDefaultLayout);
  6662. ;end_winver_500
  6663. WINUSERAPI
  6664. HWND
  6665. WINAPI
  6666. GetDesktopWindow(
  6667. VOID);
  6668. ;begin_internal_NT
  6669. WINUSERAPI
  6670. BOOL
  6671. WINAPI
  6672. SetDeskWallpaper(
  6673. IN LPCSTR lpString);
  6674. WINUSERAPI
  6675. HWND
  6676. WINAPI
  6677. CreateDialogIndirectParamAorW(
  6678. IN HANDLE hmod,
  6679. IN LPCDLGTEMPLATE lpDlgTemplate,
  6680. IN HWND hwndOwner,
  6681. IN DLGPROC lpDialogFunc,
  6682. IN LPARAM dwInitParam,
  6683. IN UINT fAnsi);
  6684. WINUSERAPI
  6685. INT_PTR
  6686. WINAPI
  6687. DialogBoxIndirectParamAorW(
  6688. IN HINSTANCE hmod,
  6689. IN LPCDLGTEMPLATEW lpDlgTemplate,
  6690. IN HWND hwndOwner,
  6691. IN DLGPROC lpDialogFunc,
  6692. IN LPARAM dwInitParam,
  6693. IN UINT fAnsiFlags);
  6694. WINUSERAPI
  6695. void
  6696. WINAPI
  6697. LoadLocalFonts(void);
  6698. WINUSERAPI
  6699. UINT
  6700. WINAPI
  6701. UserRealizePalette(IN HDC hdc);
  6702. ;end_internal_NT
  6703. WINUSERAPI
  6704. HWND
  6705. WINAPI
  6706. GetParent(
  6707. IN HWND hWnd);
  6708. WINUSERAPI
  6709. HWND
  6710. WINAPI
  6711. SetParent(
  6712. IN HWND hWndChild,
  6713. IN HWND hWndNewParent);
  6714. WINUSERAPI
  6715. BOOL
  6716. WINAPI
  6717. EnumChildWindows(
  6718. IN HWND hWndParent,
  6719. IN WNDENUMPROC lpEnumFunc,
  6720. IN LPARAM lParam);
  6721. WINUSERAPI
  6722. HWND
  6723. WINAPI
  6724. FindWindow%(
  6725. IN LPCTSTR% lpClassName,
  6726. IN LPCTSTR% lpWindowName);
  6727. ;begin_winver_400
  6728. WINUSERAPI HWND WINAPI FindWindowEx%( IN HWND, IN HWND, IN LPCTSTR%, IN LPCTSTR%);
  6729. WINUSERAPI HWND WINAPI GetShellWindow(void);
  6730. WINUSERAPI BOOL WINAPI SetShellWindow( IN HWND); ;internal
  6731. WINUSERAPI BOOL WINAPI SetShellWindowEx( IN HWND, IN HWND); ;internal
  6732. ;end_winver_400
  6733. ;begin_internal_cairo
  6734. WINUSERAPI HWND WINAPI GetProgmanWindow(void);
  6735. WINUSERAPI BOOL WINAPI SetProgmanWindow( IN HWND);
  6736. WINUSERAPI HWND WINAPI GetTaskmanWindow(void);
  6737. WINUSERAPI BOOL WINAPI SetTaskmanWindow( IN HWND);
  6738. ;end_internal_cairo
  6739. WINUSERAPI BOOL WINAPI RegisterShellHookWindow( IN HWND);
  6740. WINUSERAPI BOOL WINAPI DeregisterShellHookWindow( IN HWND);
  6741. WINUSERAPI
  6742. BOOL
  6743. WINAPI
  6744. EnumWindows(
  6745. IN WNDENUMPROC lpEnumFunc,
  6746. IN LPARAM lParam);
  6747. WINUSERAPI
  6748. BOOL
  6749. WINAPI
  6750. EnumThreadWindows(
  6751. IN DWORD dwThreadId,
  6752. IN WNDENUMPROC lpfn,
  6753. IN LPARAM lParam);
  6754. #define EnumTaskWindows(hTask, lpfn, lParam) EnumThreadWindows(HandleToUlong(hTask), lpfn, lParam)
  6755. WINUSERAPI
  6756. int
  6757. WINAPI
  6758. GetClassName%(
  6759. IN HWND hWnd,
  6760. OUT LPTSTR% lpClassName,
  6761. IN int nMaxCount);
  6762. WINUSERAPI
  6763. HWND
  6764. WINAPI
  6765. GetTopWindow(
  6766. IN HWND hWnd);
  6767. #define GetNextWindow(hWnd, wCmd) GetWindow(hWnd, wCmd)
  6768. #define GetSysModalWindow() (NULL)
  6769. #define SetSysModalWindow(hWnd) (NULL)
  6770. WINUSERAPI
  6771. DWORD
  6772. WINAPI
  6773. GetWindowThreadProcessId(
  6774. IN HWND hWnd,
  6775. OUT LPDWORD lpdwProcessId);
  6776. ;begin_if_(_WIN32_WINNT)_501
  6777. WINUSERAPI
  6778. BOOL
  6779. WINAPI
  6780. IsGUIThread(
  6781. BOOL bConvert);
  6782. ;begin_internal_501
  6783. WINUSERAPI
  6784. BOOL
  6785. WINAPI
  6786. IsWindowInDestroy(IN HWND hwnd);
  6787. WINUSERAPI
  6788. BOOL
  6789. WINAPI
  6790. IsServerSideWindow(IN HWND hwnd);
  6791. ;end_internal_501
  6792. ;end_if_(_WIN32_WINNT)_501
  6793. #define GetWindowTask(hWnd) \
  6794. ((HANDLE)(DWORD_PTR)GetWindowThreadProcessId(hWnd, NULL))
  6795. WINUSERAPI
  6796. HWND
  6797. WINAPI
  6798. GetLastActivePopup(
  6799. IN HWND hWnd);
  6800. /*
  6801. * GetWindow() Constants
  6802. */
  6803. #define GW_HWNDFIRST 0
  6804. #define GW_HWNDLAST 1
  6805. #define GW_HWNDNEXT 2
  6806. #define GW_HWNDPREV 3
  6807. #define GW_OWNER 4
  6808. #define GW_CHILD 5
  6809. #if(WINVER <= 0x0400)
  6810. #define GW_MAX 5
  6811. #else
  6812. #define GW_ENABLEDPOPUP 6
  6813. #define GW_MAX 6
  6814. #endif
  6815. WINUSERAPI
  6816. HWND
  6817. WINAPI
  6818. GetWindow(
  6819. IN HWND hWnd,
  6820. IN UINT uCmd);
  6821. WINUSERAPI HWND WINAPI GetNextQueueWindow ( IN HWND hWnd, IN INT nCmd); ;internal_win40
  6822. #ifndef NOWH
  6823. #ifdef STRICT
  6824. WINUSERAPI
  6825. HHOOK
  6826. WINAPI
  6827. SetWindowsHook%(
  6828. IN int nFilterType,
  6829. IN HOOKPROC pfnFilterProc);
  6830. #else /* !STRICT */
  6831. WINUSERAPI
  6832. HOOKPROC
  6833. WINAPI
  6834. SetWindowsHook%(
  6835. IN int nFilterType,
  6836. IN HOOKPROC pfnFilterProc);
  6837. #endif /* !STRICT */
  6838. WINUSERAPI
  6839. BOOL
  6840. WINAPI
  6841. UnhookWindowsHook(
  6842. IN int nCode,
  6843. IN HOOKPROC pfnFilterProc);
  6844. WINUSERAPI
  6845. HHOOK
  6846. WINAPI
  6847. SetWindowsHookEx%(
  6848. IN int idHook,
  6849. IN HOOKPROC lpfn,
  6850. IN HINSTANCE hmod,
  6851. IN DWORD dwThreadId);
  6852. WINUSERAPI
  6853. BOOL
  6854. WINAPI
  6855. UnhookWindowsHookEx(
  6856. IN HHOOK hhk);
  6857. WINUSERAPI
  6858. LRESULT
  6859. WINAPI
  6860. CallNextHookEx(
  6861. IN HHOOK hhk,
  6862. IN int nCode,
  6863. IN WPARAM wParam,
  6864. IN LPARAM lParam);
  6865. /*
  6866. * Macros for source-level compatibility with old functions.
  6867. */
  6868. #ifdef STRICT
  6869. #define DefHookProc(nCode, wParam, lParam, phhk)\
  6870. CallNextHookEx(*phhk, nCode, wParam, lParam)
  6871. #else
  6872. #define DefHookProc(nCode, wParam, lParam, phhk)\
  6873. CallNextHookEx((HHOOK)*phhk, nCode, wParam, lParam)
  6874. #endif /* STRICT */
  6875. #endif /* !NOWH */
  6876. #ifndef NOMENUS
  6877. ;begin_rwinuser
  6878. /* ;win40 -- A lot of MF_* flags have been renamed as MFT_* and MFS_* flags */
  6879. /*
  6880. * Menu flags for Add/Check/EnableMenuItem()
  6881. */
  6882. #define MF_INSERT 0x00000000L
  6883. #define MF_CHANGE 0x00000080L
  6884. #define MF_APPEND 0x00000100L
  6885. #define MF_DELETE 0x00000200L
  6886. #define MF_REMOVE 0x00001000L
  6887. #define MF_BYCOMMAND 0x00000000L
  6888. #define MF_BYPOSITION 0x00000400L
  6889. #define MF_SEPARATOR 0x00000800L
  6890. #define MF_ENABLED 0x00000000L
  6891. #define MF_GRAYED 0x00000001L
  6892. #define MF_DISABLED 0x00000002L
  6893. #define MF_UNCHECKED 0x00000000L
  6894. #define MF_CHECKED 0x00000008L
  6895. #define MF_USECHECKBITMAPS 0x00000200L
  6896. #define MF_STRING 0x00000000L
  6897. #define MF_BITMAP 0x00000004L
  6898. #define MF_OWNERDRAW 0x00000100L
  6899. #define MF_POPUP 0x00000010L
  6900. #define MF_MENUBARBREAK 0x00000020L
  6901. #define MF_MENUBREAK 0x00000040L
  6902. #define MF_UNHILITE 0x00000000L
  6903. #define MF_HILITE 0x00000080L
  6904. #define MF_DEFAULT 0x00001000L ;public_winver_400
  6905. #define MF_SYSMENU 0x00002000L
  6906. #define MF_HELP 0x00004000L
  6907. #define MF_RIGHTJUSTIFY 0x00004000L ;public_winver_400
  6908. #define MF_MOUSESELECT 0x00008000L
  6909. ;begin_winver_400
  6910. #define MF_END 0x00000080L /* Obsolete -- only used by old RES files */
  6911. ;end_winver_400
  6912. ;begin_internal_NT
  6913. #define MF_CHANGE_VALID (MF_INSERT | \
  6914. MF_CHANGE | \
  6915. MF_APPEND | \
  6916. MF_DELETE | \
  6917. MF_REMOVE | \
  6918. MF_BYCOMMAND | \
  6919. MF_BYPOSITION | \
  6920. MF_SEPARATOR | \
  6921. MF_ENABLED | \
  6922. MF_GRAYED | \
  6923. MF_DISABLED | \
  6924. MF_UNCHECKED | \
  6925. MF_CHECKED | \
  6926. MF_USECHECKBITMAPS | \
  6927. MF_STRING | \
  6928. MF_BITMAP | \
  6929. MF_OWNERDRAW | \
  6930. MF_POPUP | \
  6931. MF_MENUBARBREAK | \
  6932. MF_MENUBREAK | \
  6933. MF_UNHILITE | \
  6934. MF_HILITE | \
  6935. MF_SYSMENU)
  6936. #define MF_VALID (MF_CHANGE_VALID | \
  6937. MF_HELP | \
  6938. MF_MOUSESELECT)
  6939. ;end_internal_NT
  6940. ;begin_winver_400
  6941. #define MFT_STRING MF_STRING ;public_NT
  6942. #define MFT_BITMAP MF_BITMAP
  6943. #define MFT_MENUBARBREAK MF_MENUBARBREAK
  6944. #define MFT_MENUBREAK MF_MENUBREAK
  6945. #define MFT_OWNERDRAW MF_OWNERDRAW
  6946. #define MFT_RADIOCHECK 0x00000200L
  6947. #define MFT_SEPARATOR MF_SEPARATOR
  6948. #define MFT_RIGHTORDER 0x00002000L
  6949. #define MFT_RIGHTJUSTIFY MF_RIGHTJUSTIFY
  6950. #define MFT_MASK 0x00036B64L ;internal_cairo
  6951. /* Menu flags for Add/Check/EnableMenuItem() */
  6952. #define MFS_GRAYED 0x00000003L
  6953. #define MFS_DISABLED MFS_GRAYED
  6954. #define MFS_HOTTRACK MF_APPEND ;internal
  6955. #define MFS_CHECKED MF_CHECKED
  6956. #define MFS_HILITE MF_HILITE
  6957. #define MFS_ENABLED MF_ENABLED
  6958. #define MFS_UNCHECKED MF_UNCHECKED
  6959. #define MFS_UNHILITE MF_UNHILITE
  6960. #define MFS_DEFAULT MF_DEFAULT
  6961. ;begin_internal_500
  6962. #define MFS_MASK 0x0000108BL
  6963. #define MFS_HOTTRACKDRAWN 0x10000000L
  6964. #define MFS_CACHEDBMP 0x20000000L
  6965. #define MFS_BOTTOMGAPDROP 0x40000000L
  6966. #define MFS_TOPGAPDROP 0x80000000L
  6967. #define MFS_GAPDROP 0xC0000000L
  6968. ;end_internal_500
  6969. #define MFR_POPUP 0x01 ;internal
  6970. #define MFR_END 0x80 ;internal
  6971. #define MFT_OLDAPI_MASK 0x00006B64L ;internal
  6972. #define MFS_OLDAPI_MASK 0x0000008BL ;internal
  6973. #define MFT_NONSTRING 0x00000904L ;internal
  6974. #define MFT_BREAK 0x00000060L ;internal
  6975. ;end_winver_400
  6976. ;end_rwinuser
  6977. ;begin_winver_400
  6978. WINUSERAPI
  6979. BOOL
  6980. WINAPI
  6981. CheckMenuRadioItem(
  6982. IN HMENU,
  6983. IN UINT,
  6984. IN UINT,
  6985. IN UINT,
  6986. IN UINT);
  6987. ;end_winver_400
  6988. /*
  6989. * Menu item resource format
  6990. */
  6991. typedef struct {
  6992. WORD versionNumber;
  6993. WORD offset;
  6994. } MENUITEMTEMPLATEHEADER, *PMENUITEMTEMPLATEHEADER;
  6995. typedef struct { // version 0
  6996. WORD mtOption;
  6997. WORD mtID;
  6998. WCHAR mtString[1];
  6999. } MENUITEMTEMPLATE, *PMENUITEMTEMPLATE;
  7000. ;begin_internal_NT
  7001. typedef struct { // version 1
  7002. DWORD dwHelpID;
  7003. DWORD fType;
  7004. DWORD fState;
  7005. DWORD menuId;
  7006. WORD wResInfo;
  7007. WCHAR mtString[1];
  7008. } MENUITEMTEMPLATE2, *PMENUITEMTEMPLATE2;
  7009. ;end_internal_NT
  7010. #define MF_END 0x00000080L ;rwinuser
  7011. #endif /* !NOMENUS */
  7012. #ifndef NOSYSCOMMANDS
  7013. ;begin_rwinuser
  7014. /*
  7015. * System Menu Command Values
  7016. */
  7017. #define SC_SIZE 0xF000
  7018. #define SC_MOVE 0xF010
  7019. #define SC_MINIMIZE 0xF020
  7020. #define SC_MAXIMIZE 0xF030
  7021. #define SC_NEXTWINDOW 0xF040
  7022. #define SC_PREVWINDOW 0xF050
  7023. #define SC_CLOSE 0xF060
  7024. #define SC_VSCROLL 0xF070
  7025. #define SC_HSCROLL 0xF080
  7026. #define SC_MOUSEMENU 0xF090
  7027. #define SC_KEYMENU 0xF100
  7028. #define SC_ARRANGE 0xF110
  7029. #define SC_RESTORE 0xF120
  7030. #define SC_TASKLIST 0xF130
  7031. #define SC_SCREENSAVE 0xF140
  7032. #define SC_HOTKEY 0xF150
  7033. ;begin_winver_400
  7034. #define SC_DEFAULT 0xF160
  7035. #define SC_MONITORPOWER 0xF170
  7036. #define SC_CONTEXTHELP 0xF180
  7037. #define SC_SEPARATOR 0xF00F
  7038. ;end_winver_400
  7039. ;begin_internal
  7040. #define SC_LAMEBUTTON 0xF190
  7041. ;end_internal
  7042. /*
  7043. * Obsolete names
  7044. */
  7045. #define SC_ICON SC_MINIMIZE
  7046. #define SC_ZOOM SC_MAXIMIZE
  7047. ;end_rwinuser
  7048. #endif /* !NOSYSCOMMANDS */
  7049. /*
  7050. * Resource Loading Routines
  7051. */
  7052. WINUSERAPI
  7053. HBITMAP
  7054. WINAPI
  7055. LoadBitmap%(
  7056. IN HINSTANCE hInstance,
  7057. IN LPCTSTR% lpBitmapName);
  7058. WINUSERAPI
  7059. HCURSOR
  7060. WINAPI
  7061. LoadCursor%(
  7062. IN HINSTANCE hInstance,
  7063. IN LPCTSTR% lpCursorName);
  7064. WINUSERAPI
  7065. HCURSOR
  7066. WINAPI
  7067. LoadCursorFromFile%(
  7068. IN LPCTSTR% lpFileName);
  7069. WINUSERAPI
  7070. HCURSOR
  7071. WINAPI
  7072. CreateCursor(
  7073. IN HINSTANCE hInst,
  7074. IN int xHotSpot,
  7075. IN int yHotSpot,
  7076. IN int nWidth,
  7077. IN int nHeight,
  7078. IN CONST VOID *pvANDPlane,
  7079. IN CONST VOID *pvXORPlane);
  7080. WINUSERAPI
  7081. BOOL
  7082. WINAPI
  7083. DestroyCursor(
  7084. IN HCURSOR hCursor);
  7085. #ifndef _MAC
  7086. #define CopyCursor(pcur) ((HCURSOR)CopyIcon((HICON)(pcur)))
  7087. #else
  7088. WINUSERAPI
  7089. HCURSOR
  7090. WINAPI
  7091. CopyCursor(
  7092. IN HCURSOR hCursor);
  7093. #endif
  7094. /*
  7095. * Standard Cursor IDs
  7096. */
  7097. #define IDC_ARROW MAKEINTRESOURCE(32512)
  7098. #define IDC_IBEAM MAKEINTRESOURCE(32513)
  7099. #define IDC_WAIT MAKEINTRESOURCE(32514)
  7100. #define IDC_CROSS MAKEINTRESOURCE(32515)
  7101. #define IDC_UPARROW MAKEINTRESOURCE(32516)
  7102. #define IDC_NWPEN MAKEINTRESOURCE(32531) ;internal
  7103. #define IDC_HUNG MAKEINTRESOURCE(32632) ;internal
  7104. #define IDC_SIZE MAKEINTRESOURCE(32640) /* OBSOLETE: use IDC_SIZEALL */
  7105. #define IDC_ICON MAKEINTRESOURCE(32641) /* OBSOLETE: use IDC_ARROW */
  7106. #define IDC_SIZENWSE MAKEINTRESOURCE(32642)
  7107. #define IDC_SIZENESW MAKEINTRESOURCE(32643)
  7108. #define IDC_SIZEWE MAKEINTRESOURCE(32644)
  7109. #define IDC_SIZENS MAKEINTRESOURCE(32645)
  7110. #define IDC_SIZEALL MAKEINTRESOURCE(32646)
  7111. #define IDC_NO MAKEINTRESOURCE(32648) /*not in win3.1 */
  7112. ;begin_winver_500
  7113. #define IDC_HAND MAKEINTRESOURCE(32649)
  7114. ;end_winver_500
  7115. #define IDC_APPSTARTING MAKEINTRESOURCE(32650) /*not in win3.1 */
  7116. ;begin_winver_400
  7117. #define IDC_HELP MAKEINTRESOURCE(32651)
  7118. ;end_winver_400
  7119. WINUSERAPI
  7120. BOOL
  7121. WINAPI
  7122. SetSystemCursor(
  7123. IN HCURSOR hcur,
  7124. IN DWORD id);
  7125. typedef struct _ICONINFO {
  7126. BOOL fIcon;
  7127. DWORD xHotspot;
  7128. DWORD yHotspot;
  7129. HBITMAP hbmMask;
  7130. HBITMAP hbmColor;
  7131. } ICONINFO;
  7132. typedef ICONINFO *PICONINFO;
  7133. WINUSERAPI
  7134. HICON
  7135. WINAPI
  7136. LoadIcon%(
  7137. IN HINSTANCE hInstance,
  7138. IN LPCTSTR% lpIconName);
  7139. ;begin_internal_NT
  7140. WINUSERAPI UINT PrivateExtractIconEx%(
  7141. IN LPCTSTR% szFileName,
  7142. IN int nIconIndex,
  7143. OUT HICON *phiconLarge,
  7144. OUT HICON *phiconSmall,
  7145. IN UINT nIcons);
  7146. ;end_internal_NT
  7147. WINUSERAPI UINT PrivateExtractIcons%(
  7148. IN LPCTSTR% szFileName,
  7149. IN int nIconIndex,
  7150. IN int cxIcon,
  7151. IN int cyIcon,
  7152. OUT HICON *phicon,
  7153. OUT UINT *piconid,
  7154. IN UINT nIcons,
  7155. IN UINT flags);
  7156. WINUSERAPI
  7157. HICON
  7158. WINAPI
  7159. CreateIcon(
  7160. IN HINSTANCE hInstance,
  7161. IN int nWidth,
  7162. IN int nHeight,
  7163. IN BYTE cPlanes,
  7164. IN BYTE cBitsPixel,
  7165. IN CONST BYTE *lpbANDbits,
  7166. IN CONST BYTE *lpbXORbits);
  7167. WINUSERAPI
  7168. BOOL
  7169. WINAPI
  7170. DestroyIcon(
  7171. IN HICON hIcon);
  7172. WINUSERAPI
  7173. int
  7174. WINAPI
  7175. LookupIconIdFromDirectory(
  7176. IN PBYTE presbits,
  7177. IN BOOL fIcon);
  7178. ;begin_winver_400
  7179. WINUSERAPI
  7180. int
  7181. WINAPI
  7182. LookupIconIdFromDirectoryEx(
  7183. IN PBYTE presbits,
  7184. IN BOOL fIcon,
  7185. IN int cxDesired,
  7186. IN int cyDesired,
  7187. IN UINT Flags);
  7188. ;end_winver_400
  7189. WINUSERAPI
  7190. HICON
  7191. WINAPI
  7192. CreateIconFromResource(
  7193. IN PBYTE presbits,
  7194. IN DWORD dwResSize,
  7195. IN BOOL fIcon,
  7196. IN DWORD dwVer);
  7197. ;begin_winver_400
  7198. WINUSERAPI
  7199. HICON
  7200. WINAPI
  7201. CreateIconFromResourceEx(
  7202. IN PBYTE presbits,
  7203. IN DWORD dwResSize,
  7204. IN BOOL fIcon,
  7205. IN DWORD dwVer,
  7206. IN int cxDesired,
  7207. IN int cyDesired,
  7208. IN UINT Flags);
  7209. /* Icon/Cursor header */
  7210. typedef struct tagCURSORSHAPE
  7211. {
  7212. int xHotSpot;
  7213. int yHotSpot;
  7214. int cx;
  7215. int cy;
  7216. int cbWidth;
  7217. BYTE Planes;
  7218. BYTE BitsPixel;
  7219. } CURSORSHAPE, FAR *LPCURSORSHAPE;
  7220. ;end_winver_400
  7221. #define IMAGE_BITMAP 0
  7222. #define IMAGE_ICON 1
  7223. #define IMAGE_CURSOR 2
  7224. ;begin_winver_400
  7225. #define IMAGE_ENHMETAFILE 3
  7226. #define LR_DEFAULTCOLOR 0x0000
  7227. #define LR_MONOCHROME 0x0001
  7228. #define LR_COLOR 0x0002
  7229. #define LR_COPYRETURNORG 0x0004
  7230. #define LR_COPYDELETEORG 0x0008
  7231. #define LR_LOADFROMFILE 0x0010
  7232. #define LR_LOADTRANSPARENT 0x0020
  7233. #define LR_DEFAULTSIZE 0x0040
  7234. #define LR_VGACOLOR 0x0080
  7235. #define LR_GLOBAL 0x0100 ;internal
  7236. #define LR_ENVSUBST 0x0200 ;internal
  7237. #define LR_ACONFRAME 0x0400 ;internal
  7238. #define LR_LOADMAP3DCOLORS 0x1000
  7239. #define LR_CREATEDIBSECTION 0x2000
  7240. #define LR_COPYFROMRESOURCE 0x4000
  7241. #define LR_SHARED 0x8000
  7242. #define LR_CREATEREALDIB 0x0800 ;internal
  7243. #define LR_VALID 0xF8FF ;internal
  7244. WINUSERAPI
  7245. HANDLE
  7246. WINAPI
  7247. LoadImage%(
  7248. IN HINSTANCE,
  7249. IN LPCTSTR%,
  7250. IN UINT,
  7251. IN int,
  7252. IN int,
  7253. IN UINT);
  7254. WINUSERAPI
  7255. HANDLE
  7256. WINAPI
  7257. CopyImage(
  7258. IN HANDLE,
  7259. IN UINT,
  7260. IN int,
  7261. IN int,
  7262. IN UINT);
  7263. #define DI_MASK 0x0001
  7264. #define DI_IMAGE 0x0002
  7265. #define DI_NORMAL 0x0003
  7266. #define DI_COMPAT 0x0004
  7267. #define DI_DEFAULTSIZE 0x0008
  7268. ;begin_if_(_WIN32_WINNT)_501
  7269. #define DI_NOMIRROR 0x0010
  7270. ;end_if_(_WIN32_WINNT)_501
  7271. #define DI_VALID (DI_MASK | DI_IMAGE | DI_COMPAT | DI_DEFAULTSIZE | DI_NOMIRROR) ;internal
  7272. WINUSERAPI BOOL WINAPI DrawIconEx( IN HDC hdc, IN int xLeft, IN int yTop,
  7273. IN HICON hIcon, IN int cxWidth, IN int cyWidth,
  7274. IN UINT istepIfAniCur, IN HBRUSH hbrFlickerFreeDraw, IN UINT diFlags);
  7275. ;end_winver_400
  7276. WINUSERAPI
  7277. HICON
  7278. WINAPI
  7279. CreateIconIndirect(
  7280. IN PICONINFO piconinfo);
  7281. WINUSERAPI
  7282. HICON
  7283. WINAPI
  7284. CopyIcon(
  7285. IN HICON hIcon);
  7286. WINUSERAPI
  7287. BOOL
  7288. WINAPI
  7289. GetIconInfo(
  7290. IN HICON hIcon,
  7291. OUT PICONINFO piconinfo);
  7292. ;begin_winver_400
  7293. #define RES_ICON 1
  7294. #define RES_CURSOR 2
  7295. ;end_winver_400
  7296. #ifdef OEMRESOURCE
  7297. ;begin_rwinuser
  7298. /*
  7299. * OEM Resource Ordinal Numbers
  7300. */
  7301. #define OBM_CLOSE 32754
  7302. #define OBM_UPARROW 32753
  7303. #define OBM_DNARROW 32752
  7304. #define OBM_RGARROW 32751
  7305. #define OBM_LFARROW 32750
  7306. #define OBM_REDUCE 32749
  7307. #define OBM_ZOOM 32748
  7308. #define OBM_RESTORE 32747
  7309. #define OBM_REDUCED 32746
  7310. #define OBM_ZOOMD 32745
  7311. #define OBM_RESTORED 32744
  7312. #define OBM_UPARROWD 32743
  7313. #define OBM_DNARROWD 32742
  7314. #define OBM_RGARROWD 32741
  7315. #define OBM_LFARROWD 32740
  7316. #define OBM_MNARROW 32739
  7317. #define OBM_COMBO 32738
  7318. #define OBM_UPARROWI 32737
  7319. #define OBM_DNARROWI 32736
  7320. #define OBM_RGARROWI 32735
  7321. #define OBM_LFARROWI 32734
  7322. #define OBM_STARTUP 32733 ;internal_NT
  7323. #define OBM_TRUETYPE 32732 ;internal_NT
  7324. #define OBM_HELP 32731 ;internal_NT
  7325. #define OBM_HELPD 32730 ;internal_NT
  7326. #define OBM_OLD_CLOSE 32767
  7327. #define OBM_SIZE 32766
  7328. #define OBM_OLD_UPARROW 32765
  7329. #define OBM_OLD_DNARROW 32764
  7330. #define OBM_OLD_RGARROW 32763
  7331. #define OBM_OLD_LFARROW 32762
  7332. #define OBM_BTSIZE 32761
  7333. #define OBM_CHECK 32760
  7334. #define OBM_CHECKBOXES 32759
  7335. #define OBM_BTNCORNERS 32758
  7336. #define OBM_OLD_REDUCE 32757
  7337. #define OBM_OLD_ZOOM 32756
  7338. #define OBM_OLD_RESTORE 32755
  7339. ;begin_internal_500
  7340. #define OBM_RDRVERT 32559
  7341. #define OBM_RDRHORZ 32660
  7342. #define OBM_RDR2DIM 32661
  7343. ;end_internal_500
  7344. #define OCR_NORMAL 32512
  7345. #define OCR_IBEAM 32513
  7346. #define OCR_WAIT 32514
  7347. #define OCR_CROSS 32515
  7348. #define OCR_UP 32516
  7349. #define OCR_NWPEN 32631 ;internal
  7350. #define OCR_SIZE 32640 /* OBSOLETE: use OCR_SIZEALL */
  7351. #define OCR_ICON 32641 /* OBSOLETE: use OCR_NORMAL */
  7352. #define OCR_SIZENWSE 32642
  7353. #define OCR_SIZENESW 32643
  7354. #define OCR_SIZEWE 32644
  7355. #define OCR_SIZENS 32645
  7356. #define OCR_SIZEALL 32646
  7357. #define OCR_ICOCUR 32647 /* OBSOLETE: use OIC_WINLOGO */
  7358. #define OCR_NO 32648
  7359. ;begin_winver_500
  7360. #define OCR_HAND 32649
  7361. ;end_winver_500
  7362. ;begin_winver_400
  7363. #define OCR_APPSTARTING 32650
  7364. ;end_winver_400
  7365. #define OCR_HELP 32651 ;internal
  7366. ;begin_internal_500
  7367. #define OCR_RDRVERT 32652
  7368. #define OCR_RDRHORZ 32653
  7369. #define OCR_RDR2DIM 32654
  7370. #define OCR_RDRNORTH 32655
  7371. #define OCR_RDRSOUTH 32656
  7372. #define OCR_RDRWEST 32657
  7373. #define OCR_RDREAST 32658
  7374. #define OCR_RDRNORTHWEST 32659
  7375. #define OCR_RDRNORTHEAST 32660
  7376. #define OCR_RDRSOUTHWEST 32661
  7377. #define OCR_RDRSOUTHEAST 32662
  7378. ;end_internal_500
  7379. ;begin_internal_501
  7380. #define OCR_AUTORUN 32663
  7381. ;end_internal_501
  7382. /* ;internal
  7383. * Default Cursor IDs to get original image from User ;internal
  7384. */ ;internal
  7385. #define OCR_FIRST_DEFAULT 100 ;internal
  7386. #define OCR_ARROW_DEFAULT 100 ;internal
  7387. #define OCR_IBEAM_DEFAULT 101 ;internal
  7388. #define OCR_WAIT_DEFAULT 102 ;internal
  7389. #define OCR_CROSS_DEFAULT 103 ;internal
  7390. #define OCR_UPARROW_DEFAULT 104 ;internal
  7391. #define OCR_SIZENWSE_DEFAULT 105 ;internal
  7392. #define OCR_SIZENESW_DEFAULT 106 ;internal
  7393. #define OCR_SIZEWE_DEFAULT 107 ;internal
  7394. #define OCR_SIZENS_DEFAULT 108 ;internal
  7395. #define OCR_SIZEALL_DEFAULT 109 ;internal
  7396. #define OCR_NO_DEFAULT 110 ;internal
  7397. #define OCR_APPSTARTING_DEFAULT 111 ;internal
  7398. #define OCR_HELP_DEFAULT 112 ;internal
  7399. #define OCR_NWPEN_DEFAULT 113 ;internal
  7400. #define OCR_HAND_DEFAULT 114 ;internal
  7401. #define OCR_ICON_DEFAULT 115 ;internal
  7402. #define OCR_AUTORUN_DEFAULT 116 ;internal
  7403. #define COCR_CONFIGURABLE (OCR_AUTORUN_DEFAULT - OCR_FIRST_DEFAULT + 1) ;internal
  7404. #define OIC_SAMPLE 32512
  7405. #define OIC_HAND 32513
  7406. #define OIC_QUES 32514
  7407. #define OIC_BANG 32515
  7408. #define OIC_NOTE 32516
  7409. ;begin_winver_400
  7410. #define OIC_WINLOGO 32517
  7411. #define OIC_WARNING OIC_BANG
  7412. #define OIC_ERROR OIC_HAND
  7413. #define OIC_INFORMATION OIC_NOTE
  7414. ;end_winver_400
  7415. /* Default IDs for original User images */ ;internal
  7416. #define OIC_FIRST_DEFAULT 100 ;internal
  7417. #define OIC_APPLICATION_DEFAULT 100 ;internal
  7418. #define OIC_HAND_DEFAULT 101 ;internal
  7419. #define OIC_WARNING_DEFAULT 101 ;internal
  7420. #define OIC_QUESTION_DEFAULT 102 ;internal
  7421. #define OIC_EXCLAMATION_DEFAULT 103 ;internal
  7422. #define OIC_ERROR_DEFAULT 103 ;internal
  7423. #define OIC_ASTERISK_DEFAULT 104 ;internal
  7424. #define OIC_INFORMATION_DEFAULT 104 ;internal
  7425. #define OIC_WINLOGO_DEFAULT 105 ;internal
  7426. #define COIC_CONFIGURABLE (OIC_WINLOGO_DEFAULT - OIC_FIRST_DEFAULT + 1) ;internal
  7427. ;end_rwinuser
  7428. #endif /* OEMRESOURCE */
  7429. #define ORD_LANGDRIVER 1 /* The ordinal number for the entry point of
  7430. ** language drivers.
  7431. */
  7432. #ifndef NOICONS
  7433. ;begin_rwinuser
  7434. /*
  7435. * Standard Icon IDs
  7436. */
  7437. #ifdef RC_INVOKED
  7438. #define IDI_APPLICATION 32512
  7439. #define IDI_HAND 32513
  7440. #define IDI_QUESTION 32514
  7441. #define IDI_EXCLAMATION 32515
  7442. #define IDI_ASTERISK 32516
  7443. ;begin_winver_400
  7444. #define IDI_WINLOGO 32517
  7445. ;end_winver_400
  7446. #else
  7447. #define IDI_APPLICATION MAKEINTRESOURCE(32512)
  7448. #define IDI_HAND MAKEINTRESOURCE(32513)
  7449. #define IDI_QUESTION MAKEINTRESOURCE(32514)
  7450. #define IDI_EXCLAMATION MAKEINTRESOURCE(32515)
  7451. #define IDI_ASTERISK MAKEINTRESOURCE(32516)
  7452. ;begin_winver_400
  7453. #define IDI_WINLOGO MAKEINTRESOURCE(32517)
  7454. ;end_winver_400
  7455. #endif /* RC_INVOKED */
  7456. ;begin_winver_400
  7457. #define IDI_WARNING IDI_EXCLAMATION
  7458. #define IDI_ERROR IDI_HAND
  7459. #define IDI_INFORMATION IDI_ASTERISK
  7460. ;end_winver_400
  7461. ;end_rwinuser
  7462. #endif /* !NOICONS */
  7463. WINUSERAPI
  7464. int
  7465. WINAPI
  7466. LoadString%(
  7467. IN HINSTANCE hInstance,
  7468. IN UINT uID,
  7469. OUT LPTSTR% lpBuffer,
  7470. IN int nBufferMax);
  7471. ;begin_rwinuser
  7472. /*
  7473. * Dialog Box Command IDs
  7474. */
  7475. #define IDOK 1
  7476. #define IDCANCEL 2
  7477. #define IDABORT 3
  7478. #define IDRETRY 4
  7479. #define IDIGNORE 5
  7480. #define IDYES 6
  7481. #define IDNO 7
  7482. ;begin_winver_400
  7483. #define IDCLOSE 8
  7484. #define IDHELP 9
  7485. #define IDUSERICON 20 ;internal
  7486. ;end_winver_400
  7487. ;begin_winver_500
  7488. #define IDTRYAGAIN 10
  7489. #define IDCONTINUE 11
  7490. ;end_winver_500
  7491. ;begin_winver_501
  7492. #ifndef IDTIMEOUT
  7493. #define IDTIMEOUT 32000
  7494. #endif
  7495. ;end_winver_501
  7496. ;end_rwinuser
  7497. #ifndef NOCTLMGR
  7498. /*
  7499. * Control Manager Structures and Definitions
  7500. */
  7501. #ifndef NOWINSTYLES
  7502. ;begin_rwinuser
  7503. /*
  7504. * Edit Control Styles
  7505. */
  7506. #define ES_LEFT 0x0000L
  7507. #define ES_CENTER 0x0001L
  7508. #define ES_RIGHT 0x0002L
  7509. #define ES_FMTMASK 0x0003L ;internal_NT
  7510. #define ES_MULTILINE 0x0004L
  7511. #define ES_UPPERCASE 0x0008L
  7512. #define ES_LOWERCASE 0x0010L
  7513. #define ES_PASSWORD 0x0020L
  7514. #define ES_AUTOVSCROLL 0x0040L
  7515. #define ES_AUTOHSCROLL 0x0080L
  7516. #define ES_NOHIDESEL 0x0100L
  7517. #define ES_COMBOBOX 0x0200L ;internal
  7518. #define ES_OEMCONVERT 0x0400L
  7519. #define ES_READONLY 0x0800L
  7520. #define ES_WANTRETURN 0x1000L
  7521. #define ES_NUMBER 0x2000L ;public_winver_400
  7522. ;end_rwinuser
  7523. #endif /* !NOWINSTYLES */
  7524. /*
  7525. * Edit Control Notification Codes
  7526. */
  7527. #define EN_SETFOCUS 0x0100
  7528. #define EN_KILLFOCUS 0x0200
  7529. #define EN_CHANGE 0x0300
  7530. #define EN_UPDATE 0x0400
  7531. #define EN_ERRSPACE 0x0500
  7532. #define EN_MAXTEXT 0x0501
  7533. #define EN_HSCROLL 0x0601
  7534. #define EN_VSCROLL 0x0602
  7535. ;begin_if_(_WIN32_WINNT)_500
  7536. #define EN_ALIGN_LTR_EC 0x0700
  7537. #define EN_ALIGN_RTL_EC 0x0701
  7538. ;end_if_(_WIN32_WINNT)_500
  7539. ;begin_winver_400
  7540. /* Edit control EM_SETMARGIN parameters */
  7541. #define EC_LEFTMARGIN 0x0001
  7542. #define EC_RIGHTMARGIN 0x0002
  7543. #define EC_USEFONTINFO 0xffff
  7544. ;end_winver_400
  7545. ;begin_winver_500
  7546. /* wParam of EM_GET/SETIMESTATUS */
  7547. #define EMSIS_COMPOSITIONSTRING 0x0001
  7548. /* lParam for EMSIS_COMPOSITIONSTRING */
  7549. #define EIMES_GETCOMPSTRATONCE 0x0001
  7550. #define EIMES_CANCELCOMPSTRINFOCUS 0x0002
  7551. #define EIMES_COMPLETECOMPSTRKILLFOCUS 0x0004
  7552. ;end_winver_500
  7553. #ifndef NOWINMESSAGES
  7554. ;begin_rwinuser
  7555. /*
  7556. * Edit Control Messages
  7557. */
  7558. #define EM_GETSEL 0x00B0
  7559. #define EM_SETSEL 0x00B1
  7560. #define EM_GETRECT 0x00B2
  7561. #define EM_SETRECT 0x00B3
  7562. #define EM_SETRECTNP 0x00B4
  7563. #define EM_SCROLL 0x00B5
  7564. #define EM_LINESCROLL 0x00B6
  7565. #define EM_SCROLLCARET 0x00B7
  7566. #define EM_GETMODIFY 0x00B8
  7567. #define EM_SETMODIFY 0x00B9
  7568. #define EM_GETLINECOUNT 0x00BA
  7569. #define EM_LINEINDEX 0x00BB
  7570. #define EM_SETHANDLE 0x00BC
  7571. #define EM_GETHANDLE 0x00BD
  7572. #define EM_GETTHUMB 0x00BE
  7573. #define EM_LINELENGTH 0x00C1
  7574. #define EM_REPLACESEL 0x00C2
  7575. #define EM_SETFONT 0x00C3 /* no longer suported */ ;internal
  7576. #define EM_GETLINE 0x00C4
  7577. #define EM_LIMITTEXT 0x00C5
  7578. #define EM_CANUNDO 0x00C6
  7579. #define EM_UNDO 0x00C7
  7580. #define EM_FMTLINES 0x00C8
  7581. #define EM_LINEFROMCHAR 0x00C9
  7582. #define EM_SETWORDBREAK 0x00CA /* no longer suported */ ;internal
  7583. #define EM_SETTABSTOPS 0x00CB
  7584. #define EM_SETPASSWORDCHAR 0x00CC
  7585. #define EM_EMPTYUNDOBUFFER 0x00CD
  7586. #define EM_GETFIRSTVISIBLELINE 0x00CE
  7587. #define EM_SETREADONLY 0x00CF
  7588. #define EM_SETWORDBREAKPROC 0x00D0
  7589. #define EM_GETWORDBREAKPROC 0x00D1
  7590. #define EM_GETPASSWORDCHAR 0x00D2
  7591. ;begin_winver_400
  7592. #define EM_SETMARGINS 0x00D3
  7593. #define EM_GETMARGINS 0x00D4
  7594. #define EM_SETLIMITTEXT EM_LIMITTEXT /* ;win40 Name change */
  7595. #define EM_GETLIMITTEXT 0x00D5
  7596. #define EM_POSFROMCHAR 0x00D6
  7597. #define EM_CHARFROMPOS 0x00D7
  7598. ;end_winver_400
  7599. ;begin_winver_500
  7600. #define EM_SETIMESTATUS 0x00D8
  7601. #define EM_GETIMESTATUS 0x00D9
  7602. ;end_winver_500
  7603. #define EM_MSGMAX 0x00D3 ;internal_NT_35
  7604. #define EM_MSGMAX 0x00DA ;internal_cairo
  7605. ;end_rwinuser
  7606. #endif /* !NOWINMESSAGES */
  7607. /*
  7608. * EDITWORDBREAKPROC code values
  7609. */
  7610. #define WB_LEFT 0
  7611. #define WB_RIGHT 1
  7612. #define WB_ISDELIMITER 2
  7613. ;begin_rwinuser
  7614. /*
  7615. * Button Control Styles
  7616. */
  7617. #define BS_PUSHBUTTON 0x00000000L
  7618. #define BS_DEFPUSHBUTTON 0x00000001L
  7619. #define BS_CHECKBOX 0x00000002L
  7620. #define BS_AUTOCHECKBOX 0x00000003L
  7621. #define BS_RADIOBUTTON 0x00000004L
  7622. #define BS_3STATE 0x00000005L
  7623. #define BS_AUTO3STATE 0x00000006L
  7624. #define BS_GROUPBOX 0x00000007L
  7625. #define BS_USERBUTTON 0x00000008L
  7626. #define BS_AUTORADIOBUTTON 0x00000009L
  7627. #define BS_PUSHBOX 0x0000000AL
  7628. #define BS_OWNERDRAW 0x0000000BL
  7629. #define BS_TYPEMASK 0x0000000FL
  7630. #define BS_LEFTTEXT 0x00000020L
  7631. ;begin_winver_400
  7632. #define BS_TEXT 0x00000000L
  7633. #define BS_ICON 0x00000040L
  7634. #define BS_BITMAP 0x00000080L
  7635. #define BS_IMAGEMASK 0x000000C0L ;internal
  7636. #define BS_LEFT 0x00000100L
  7637. #define BS_RIGHT 0x00000200L
  7638. #define BS_CENTER 0x00000300L
  7639. #define BS_HORZMASK 0x00000300L ;internal
  7640. #define BS_TOP 0x00000400L
  7641. #define BS_BOTTOM 0x00000800L
  7642. #define BS_VCENTER 0x00000C00L
  7643. #define BS_VERTMASK 0x00000C00L ;internal
  7644. #define BS_ALIGNMASK 0x00000F00L ;internal
  7645. #define BS_PUSHLIKE 0x00001000L
  7646. #define BS_MULTILINE 0x00002000L
  7647. #define BS_NOTIFY 0x00004000L
  7648. #define BS_FLAT 0x00008000L
  7649. #define BS_RIGHTBUTTON BS_LEFTTEXT
  7650. ;end_winver_400
  7651. /*
  7652. * User Button Notification Codes
  7653. */
  7654. #define BN_CLICKED 0
  7655. #define BN_PAINT 1
  7656. #define BN_HILITE 2
  7657. #define BN_UNHILITE 3
  7658. #define BN_DISABLE 4
  7659. #define BN_DOUBLECLICKED 5
  7660. ;begin_winver_400
  7661. #define BN_PUSHED BN_HILITE
  7662. #define BN_UNPUSHED BN_UNHILITE
  7663. #define BN_DBLCLK BN_DOUBLECLICKED
  7664. #define BN_SETFOCUS 6
  7665. #define BN_KILLFOCUS 7
  7666. ;end_winver_400
  7667. /*
  7668. * Button Control Messages
  7669. */
  7670. #define BM_GETCHECK 0x00F0
  7671. #define BM_SETCHECK 0x00F1
  7672. #define BM_GETSTATE 0x00F2
  7673. #define BM_SETSTATE 0x00F3
  7674. #define BM_SETSTYLE 0x00F4
  7675. ;begin_winver_400
  7676. #define BM_CLICK 0x00F5
  7677. #define BM_GETIMAGE 0x00F6
  7678. #define BM_SETIMAGE 0x00F7
  7679. #define BST_UNCHECKED 0x0000
  7680. #define BST_CHECKED 0x0001
  7681. #define BST_INDETERMINATE 0x0002
  7682. #define BST_PUSHED 0x0004
  7683. #define BST_FOCUS 0x0008
  7684. ;end_winver_400
  7685. /*
  7686. * Static Control Constants
  7687. */
  7688. #define SS_LEFT 0x00000000L
  7689. #define SS_CENTER 0x00000001L
  7690. #define SS_RIGHT 0x00000002L
  7691. #define SS_TEXTMAX0 0x00000002L ;internal_500
  7692. #define SS_ICON 0x00000003L
  7693. #define SS_BLACKRECT 0x00000004L
  7694. #define SS_GRAYRECT 0x00000005L
  7695. #define SS_WHITERECT 0x00000006L
  7696. #define SS_BLACKFRAME 0x00000007L
  7697. #define SS_GRAYFRAME 0x00000008L
  7698. #define SS_WHITEFRAME 0x00000009L
  7699. #define SS_USERITEM 0x0000000AL
  7700. #define SS_TEXTMIN1 0x0000000BL ;internal_500
  7701. #define SS_SIMPLE 0x0000000BL
  7702. #define SS_LEFTNOWORDWRAP 0x0000000CL
  7703. ;begin_winver_400
  7704. #define SS_OWNERDRAW 0x0000000DL
  7705. #define SS_TEXTMAX1 0x0000000DL ;internal_500
  7706. #define SS_BITMAP 0x0000000EL
  7707. #define SS_ENHMETAFILE 0x0000000FL
  7708. #define SS_ETCHEDHORZ 0x00000010L
  7709. #define SS_ETCHEDVERT 0x00000011L
  7710. #define SS_ETCHEDFRAME 0x00000012L
  7711. #define SS_TYPEMASK 0x0000001FL
  7712. ;end_winver_400
  7713. ;begin_winver_501
  7714. #define SS_REALSIZECONTROL 0x00000040L
  7715. ;end_winver_501
  7716. #define SS_NOPREFIX 0x00000080L /* Don't do "&" character translation */
  7717. ;begin_winver_400
  7718. #define SS_NOTIFY 0x00000100L
  7719. #define SS_CENTERIMAGE 0x00000200L
  7720. #define SS_RIGHTJUST 0x00000400L
  7721. #define SS_REALSIZEIMAGE 0x00000800L
  7722. #define SS_SUNKEN 0x00001000L
  7723. #define SS_EDITCONTROL 0x00002000L
  7724. #define SS_ENDELLIPSIS 0x00004000L
  7725. #define SS_PATHELLIPSIS 0x00008000L
  7726. #define SS_WORDELLIPSIS 0x0000C000L
  7727. #define SS_ELLIPSISMASK 0x0000C000L
  7728. ;end_winver_400
  7729. ;begin_internal_500
  7730. #define ISSSTEXTOROD(bType) (((bType) <= SS_TEXTMAX0) \
  7731. || (((bType) >= SS_TEXTMIN1) && ((bType) <= SS_TEXTMAX1)))
  7732. ;end_internal_500
  7733. ;end_rwinuser
  7734. #ifndef NOWINMESSAGES
  7735. /*
  7736. * Static Control Mesages
  7737. */
  7738. #define STM_SETICON 0x0170
  7739. #define STM_GETICON 0x0171
  7740. ;begin_winver_400
  7741. #define STM_SETIMAGE 0x0172
  7742. #define STM_GETIMAGE 0x0173
  7743. #define STN_CLICKED 0
  7744. #define STN_DBLCLK 1
  7745. #define STN_ENABLE 2
  7746. #define STN_DISABLE 3
  7747. ;end_winver_400
  7748. #define STM_MSGMAX 0x0174
  7749. #endif /* !NOWINMESSAGES */
  7750. /*
  7751. * Dialog window class
  7752. */
  7753. #define WC_DIALOG (MAKEINTATOM(0x8002))
  7754. /*
  7755. * Get/SetWindowWord/Long offsets for use with WC_DIALOG windows
  7756. */
  7757. #define DWL_MSGRESULT 0
  7758. #define DWL_DLGPROC 4
  7759. #define DWL_USER 8
  7760. #ifdef _WIN64
  7761. #undef DWL_MSGRESULT
  7762. #undef DWL_DLGPROC
  7763. #undef DWL_USER
  7764. #endif /* _WIN64 */
  7765. #define DWLP_MSGRESULT 0
  7766. #define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT)
  7767. #define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC)
  7768. /*
  7769. * Dialog Manager Routines
  7770. */
  7771. #ifndef NOMSG
  7772. WINUSERAPI
  7773. BOOL
  7774. WINAPI
  7775. IsDialogMessage%(
  7776. IN HWND hDlg,
  7777. IN LPMSG lpMsg);
  7778. #endif /* !NOMSG */
  7779. WINUSERAPI
  7780. BOOL
  7781. WINAPI
  7782. MapDialogRect(
  7783. IN HWND hDlg,
  7784. IN OUT LPRECT lpRect);
  7785. WINUSERAPI
  7786. int
  7787. WINAPI
  7788. DlgDirList%(
  7789. IN HWND hDlg,
  7790. IN OUT LPTSTR% lpPathSpec,
  7791. IN int nIDListBox,
  7792. IN int nIDStaticPath,
  7793. IN UINT uFileType);
  7794. /*
  7795. * DlgDirList, DlgDirListComboBox flags values
  7796. */
  7797. #define DDL_READWRITE 0x0000
  7798. #define DDL_READONLY 0x0001
  7799. #define DDL_HIDDEN 0x0002
  7800. #define DDL_SYSTEM 0x0004
  7801. #define DDL_DIRECTORY 0x0010
  7802. #define DDL_ARCHIVE 0x0020
  7803. #define DDL_NOFILES 0x1000 ;internal_cairo
  7804. #define DDL_POSTMSGS 0x2000
  7805. #define DDL_DRIVES 0x4000
  7806. #define DDL_EXCLUSIVE 0x8000
  7807. WINUSERAPI
  7808. BOOL
  7809. WINAPI
  7810. DlgDirSelectEx%(
  7811. IN HWND hDlg,
  7812. OUT LPTSTR% lpString,
  7813. IN int nCount,
  7814. IN int nIDListBox);
  7815. WINUSERAPI
  7816. int
  7817. WINAPI
  7818. DlgDirListComboBox%(
  7819. IN HWND hDlg,
  7820. IN OUT LPTSTR% lpPathSpec,
  7821. IN int nIDComboBox,
  7822. IN int nIDStaticPath,
  7823. IN UINT uFiletype);
  7824. WINUSERAPI
  7825. BOOL
  7826. WINAPI
  7827. DlgDirSelectComboBoxEx%(
  7828. IN HWND hDlg,
  7829. OUT LPTSTR% lpString,
  7830. IN int nCount,
  7831. IN int nIDComboBox);
  7832. ;begin_internal_NT
  7833. #define DDL_VALID (DDL_READWRITE | \
  7834. DDL_READONLY | \
  7835. DDL_HIDDEN | \
  7836. DDL_SYSTEM | \
  7837. DDL_DIRECTORY | \
  7838. DDL_ARCHIVE | \
  7839. DDL_POSTMSGS | \
  7840. DDL_DRIVES | \
  7841. DDL_EXCLUSIVE)
  7842. ;end_internal_NT
  7843. ;begin_rwinuser
  7844. /*
  7845. * Dialog Styles
  7846. */
  7847. #define DS_ABSALIGN 0x01L
  7848. #define DS_SYSMODAL 0x02L
  7849. #define DS_LOCALEDIT 0x20L /* Edit items get Local storage. */
  7850. #define DS_SETFONT 0x40L /* User specified font for Dlg controls */
  7851. #define DS_MODALFRAME 0x80L /* Can be combined with WS_CAPTION */
  7852. #define DS_NOIDLEMSG 0x100L /* WM_ENTERIDLE message will not be sent */
  7853. #define DS_SETFOREGROUND 0x200L /* not in win3.1 */
  7854. ;begin_internal
  7855. /*
  7856. * Valid dialog style bits for Chicago compatibility.
  7857. */
  7858. //#define DS_VALID_FLAGS (DS_ABSALIGN|DS_SYSMODAL|DS_LOCALEDIT|DS_SETFONT|DS_MODALFRAME|DS_NOIDLEMSG | DS_SETFOREGROUND)
  7859. #define DS_VALID_FLAGS 0x1FFF
  7860. #define SCDLG_CLIENT 0x0001
  7861. #define SCDLG_ANSI 0x0002
  7862. #define SCDLG_NOREVALIDATE 0x0004
  7863. #define SCDLG_16BIT 0x0008 // Created for a 16 bit thread; common dialogs
  7864. ;end_internal
  7865. #define DS_VALID31 0x01e3L ;internal
  7866. #define DS_VALID40 0x7FFFL ;internal
  7867. ;begin_winver_400
  7868. #define DS_3DLOOK 0x0004L
  7869. #define DS_FIXEDSYS 0x0008L
  7870. #define DS_NOFAILCREATE 0x0010L
  7871. #define DS_CONTROL 0x0400L
  7872. #define DS_RECURSE DS_CONTROL /* BOGUS GOING AWAY */ ;internal
  7873. #define DS_CENTER 0x0800L
  7874. #define DS_CENTERMOUSE 0x1000L
  7875. #define DS_CONTEXTHELP 0x2000L
  7876. #define DS_COMMONDIALOG 0x4000L ;internal
  7877. #define DS_NONBOLD DS_3DLOOK /* BOGUS GOING AWAY */ ;internal
  7878. #define DS_SHELLFONT (DS_SETFONT | DS_FIXEDSYS)
  7879. ;end_winver_400
  7880. #if(_WIN32_WCE >= 0x0500)
  7881. #define DS_USEPIXELS 0x8000L
  7882. #endif
  7883. ;end_rwinuser
  7884. #define DM_GETDEFID (WM_USER+0)
  7885. #define DM_SETDEFID (WM_USER+1)
  7886. ;begin_winver_400
  7887. #define DM_REPOSITION (WM_USER+2)
  7888. ;end_winver_400
  7889. /*
  7890. * Returned in HIWORD() of DM_GETDEFID result if msg is supported
  7891. */
  7892. #define DC_HASDEFID 0x534B
  7893. /*
  7894. * Dialog Codes
  7895. */
  7896. #define DLGC_WANTARROWS 0x0001 /* Control wants arrow keys */
  7897. #define DLGC_WANTTAB 0x0002 /* Control wants tab keys */
  7898. #define DLGC_WANTALLKEYS 0x0004 /* Control wants all keys */
  7899. #define DLGC_WANTMESSAGE 0x0004 /* Pass message to control */
  7900. #define DLGC_HASSETSEL 0x0008 /* Understands EM_SETSEL message */
  7901. #define DLGC_DEFPUSHBUTTON 0x0010 /* Default pushbutton */
  7902. #define DLGC_UNDEFPUSHBUTTON 0x0020 /* Non-default pushbutton */
  7903. #define DLGC_RADIOBUTTON 0x0040 /* Radio button */
  7904. #define DLGC_WANTCHARS 0x0080 /* Want WM_CHAR messages */
  7905. #define DLGC_STATIC 0x0100 /* Static item: don't include */
  7906. #define DLGC_BUTTON 0x2000 /* Button item: can be checked */
  7907. #define LB_CTLCODE 0L
  7908. /*
  7909. * Listbox Return Values
  7910. */
  7911. #define LB_OKAY 0
  7912. #define LB_ERR (-1)
  7913. #define LB_ERRSPACE (-2)
  7914. /*
  7915. ** The idStaticPath parameter to DlgDirList can have the following values
  7916. ** ORed if the list box should show other details of the files along with
  7917. ** the name of the files;
  7918. */
  7919. /* all other details also will be returned */
  7920. /*
  7921. * Listbox Notification Codes
  7922. */
  7923. #define LBN_ERRSPACE (-2)
  7924. #define LBN_SELCHANGE 1
  7925. #define LBN_DBLCLK 2
  7926. #define LBN_SELCANCEL 3
  7927. #define LBN_SETFOCUS 4
  7928. #define LBN_KILLFOCUS 5
  7929. #ifndef NOWINMESSAGES
  7930. /*
  7931. * Listbox messages
  7932. */
  7933. #define LB_ADDSTRING 0x0180
  7934. #define LB_INSERTSTRING 0x0181
  7935. #define LB_DELETESTRING 0x0182
  7936. #define LB_SELITEMRANGEEX 0x0183
  7937. #define LB_RESETCONTENT 0x0184
  7938. #define LB_SETSEL 0x0185
  7939. #define LB_SETCURSEL 0x0186
  7940. #define LB_GETSEL 0x0187
  7941. #define LB_GETCURSEL 0x0188
  7942. #define LB_GETTEXT 0x0189
  7943. #define LB_GETTEXTLEN 0x018A
  7944. #define LB_GETCOUNT 0x018B
  7945. #define LB_SELECTSTRING 0x018C
  7946. #define LB_DIR 0x018D
  7947. #define LB_GETTOPINDEX 0x018E
  7948. #define LB_FINDSTRING 0x018F
  7949. #define LB_GETSELCOUNT 0x0190
  7950. #define LB_GETSELITEMS 0x0191
  7951. #define LB_SETTABSTOPS 0x0192
  7952. #define LB_GETHORIZONTALEXTENT 0x0193
  7953. #define LB_SETHORIZONTALEXTENT 0x0194
  7954. #define LB_SETCOLUMNWIDTH 0x0195
  7955. #define LB_ADDFILE 0x0196
  7956. #define LB_SETTOPINDEX 0x0197
  7957. #define LB_GETITEMRECT 0x0198
  7958. #define LB_GETITEMDATA 0x0199
  7959. #define LB_SETITEMDATA 0x019A
  7960. #define LB_SELITEMRANGE 0x019B
  7961. #define LB_SETANCHORINDEX 0x019C
  7962. #define LB_GETANCHORINDEX 0x019D
  7963. #define LB_SETCARETINDEX 0x019E
  7964. #define LB_GETCARETINDEX 0x019F
  7965. #define LB_SETITEMHEIGHT 0x01A0
  7966. #define LB_GETITEMHEIGHT 0x01A1
  7967. #define LB_FINDSTRINGEXACT 0x01A2
  7968. #define LBCB_CARETON 0x01A3 ;internal_NT
  7969. #define LBCB_CARETOFF 0x01A4 ;internal_NT
  7970. #define LB_SETLOCALE 0x01A5
  7971. #define LB_GETLOCALE 0x01A6
  7972. #define LB_SETCOUNT 0x01A7
  7973. ;begin_winver_400
  7974. #define LB_INITSTORAGE 0x01A8
  7975. #define LB_ITEMFROMPOINT 0x01A9
  7976. #define LB_INSERTSTRINGUPPER 0x01AA ;internal
  7977. #define LB_INSERTSTRINGLOWER 0x01AB ;internal
  7978. #define LB_ADDSTRINGUPPER 0x01AC ;internal
  7979. #define LB_ADDSTRINGLOWER 0x01AD ;internal
  7980. #define LBCB_STARTTRACK 0x01AE ;internal_win40
  7981. #define LBCB_ENDTRACK 0x01AF ;internal_win40
  7982. ;end_winver_400
  7983. #if(_WIN32_WCE >= 0x0400)
  7984. #define LB_MULTIPLEADDSTRING 0x01B1
  7985. #endif
  7986. ;begin_if_(_WIN32_WINNT)_501
  7987. #define LB_GETLISTBOXINFO 0x01B2
  7988. ;end_if_(_WIN32_WINNT)_501
  7989. #if(_WIN32_WINNT >= 0x0501)
  7990. #define LB_MSGMAX 0x01B3
  7991. #elif(_WIN32_WCE >= 0x0400)
  7992. #define LB_MSGMAX 0x01B1
  7993. #elif(WINVER >= 0x0400)
  7994. #define LB_MSGMAX 0x01B0
  7995. #else
  7996. #define LB_MSGMAX 0x01A8
  7997. #endif
  7998. #endif /* !NOWINMESSAGES */
  7999. #ifndef NOWINSTYLES
  8000. ;begin_rwinuser
  8001. /*
  8002. * Listbox Styles
  8003. */
  8004. #define LBS_NOTIFY 0x0001L
  8005. #define LBS_SORT 0x0002L
  8006. #define LBS_NOREDRAW 0x0004L
  8007. #define LBS_MULTIPLESEL 0x0008L
  8008. #define LBS_OWNERDRAWFIXED 0x0010L
  8009. #define LBS_OWNERDRAWVARIABLE 0x0020L
  8010. #define LBS_HASSTRINGS 0x0040L
  8011. #define LBS_USETABSTOPS 0x0080L
  8012. #define LBS_NOINTEGRALHEIGHT 0x0100L
  8013. #define LBS_MULTICOLUMN 0x0200L
  8014. #define LBS_WANTKEYBOARDINPUT 0x0400L
  8015. #define LBS_EXTENDEDSEL 0x0800L
  8016. #define LBS_DISABLENOSCROLL 0x1000L
  8017. #define LBS_NODATA 0x2000L
  8018. ;begin_winver_400
  8019. #define LBS_NOSEL 0x4000L
  8020. ;end_winver_400
  8021. #define LBS_COMBOBOX 0x8000L
  8022. #define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
  8023. ;end_rwinuser
  8024. #endif /* !NOWINSTYLES */
  8025. /*
  8026. * Combo Box return Values
  8027. */
  8028. #define CB_OKAY 0
  8029. #define CB_ERR (-1)
  8030. #define CB_ERRSPACE (-2)
  8031. /*
  8032. * Combo Box Notification Codes
  8033. */
  8034. #define CBN_ERRSPACE (-1)
  8035. #define CBN_SELCHANGE 1
  8036. #define CBN_DBLCLK 2
  8037. #define CBN_SETFOCUS 3
  8038. #define CBN_KILLFOCUS 4
  8039. #define CBN_EDITCHANGE 5
  8040. #define CBN_EDITUPDATE 6
  8041. #define CBN_DROPDOWN 7
  8042. #define CBN_CLOSEUP 8
  8043. #define CBN_SELENDOK 9
  8044. #define CBN_SELENDCANCEL 10
  8045. #ifndef NOWINSTYLES
  8046. ;begin_rwinuser
  8047. /*
  8048. * Combo Box styles
  8049. */
  8050. #define CBS_SIMPLE 0x0001L
  8051. #define CBS_DROPDOWN 0x0002L
  8052. #define CBS_DROPDOWNLIST 0x0003L
  8053. #define CBS_OWNERDRAWFIXED 0x0010L
  8054. #define CBS_OWNERDRAWVARIABLE 0x0020L
  8055. #define CBS_AUTOHSCROLL 0x0040L
  8056. #define CBS_OEMCONVERT 0x0080L
  8057. #define CBS_SORT 0x0100L
  8058. #define CBS_HASSTRINGS 0x0200L
  8059. #define CBS_NOINTEGRALHEIGHT 0x0400L
  8060. #define CBS_DISABLENOSCROLL 0x0800L
  8061. ;begin_winver_400
  8062. #define CBS_UPPERCASE 0x2000L
  8063. #define CBS_LOWERCASE 0x4000L
  8064. ;end_winver_400
  8065. ;end_rwinuser
  8066. #endif /* !NOWINSTYLES */
  8067. /*
  8068. * Combo Box messages
  8069. */
  8070. #ifndef NOWINMESSAGES
  8071. #define CB_GETEDITSEL 0x0140
  8072. #define CB_LIMITTEXT 0x0141
  8073. #define CB_SETEDITSEL 0x0142
  8074. #define CB_ADDSTRING 0x0143
  8075. #define CB_DELETESTRING 0x0144
  8076. #define CB_DIR 0x0145
  8077. #define CB_GETCOUNT 0x0146
  8078. #define CB_GETCURSEL 0x0147
  8079. #define CB_GETLBTEXT 0x0148
  8080. #define CB_GETLBTEXTLEN 0x0149
  8081. #define CB_INSERTSTRING 0x014A
  8082. #define CB_RESETCONTENT 0x014B
  8083. #define CB_FINDSTRING 0x014C
  8084. #define CB_SELECTSTRING 0x014D
  8085. #define CB_SETCURSEL 0x014E
  8086. #define CB_SHOWDROPDOWN 0x014F
  8087. #define CB_GETITEMDATA 0x0150
  8088. #define CB_SETITEMDATA 0x0151
  8089. #define CB_GETDROPPEDCONTROLRECT 0x0152
  8090. #define CB_SETITEMHEIGHT 0x0153
  8091. #define CB_GETITEMHEIGHT 0x0154
  8092. #define CB_SETEXTENDEDUI 0x0155
  8093. #define CB_GETEXTENDEDUI 0x0156
  8094. #define CB_GETDROPPEDSTATE 0x0157
  8095. #define CB_FINDSTRINGEXACT 0x0158
  8096. #define CB_SETLOCALE 0x0159
  8097. #define CB_GETLOCALE 0x015A
  8098. ;begin_winver_400
  8099. #define CB_GETTOPINDEX 0x015b
  8100. #define CB_SETTOPINDEX 0x015c
  8101. #define CB_GETHORIZONTALEXTENT 0x015d
  8102. #define CB_SETHORIZONTALEXTENT 0x015e
  8103. #define CB_GETDROPPEDWIDTH 0x015f
  8104. #define CB_SETDROPPEDWIDTH 0x0160
  8105. #define CB_INITSTORAGE 0x0161
  8106. #if(_WIN32_WCE >= 0x0400)
  8107. #define CB_MULTIPLEADDSTRING 0x0163
  8108. #endif
  8109. ;end_winver_400
  8110. ;begin_if_(_WIN32_WINNT)_501
  8111. #define CB_GETCOMBOBOXINFO 0x0164
  8112. ;end_if_(_WIN32_WINNT)_501
  8113. #if(_WIN32_WINNT >= 0x0501)
  8114. #define CB_MSGMAX 0x0165
  8115. #elif(_WIN32_WCE >= 0x0400)
  8116. #define CB_MSGMAX 0x0163
  8117. #elif(WINVER >= 0x0400)
  8118. #define CB_MSGMAX 0x0162
  8119. #else
  8120. #define CB_MSGMAX 0x015B
  8121. #endif
  8122. #define CBEC_SETCOMBOFOCUS (CB_MSGMAX+1) ;internal_nt
  8123. #define CBEC_KILLCOMBOFOCUS (CB_MSGMAX+2) ;internal_nt
  8124. #endif /* !NOWINMESSAGES */
  8125. #ifndef NOWINSTYLES
  8126. ;begin_rwinuser
  8127. /*
  8128. * Scroll Bar Styles
  8129. */
  8130. #define SBS_HORZ 0x0000L
  8131. #define SBS_VERT 0x0001L
  8132. #define SBS_TOPALIGN 0x0002L
  8133. #define SBS_LEFTALIGN 0x0002L
  8134. #define SBS_BOTTOMALIGN 0x0004L
  8135. #define SBS_RIGHTALIGN 0x0004L
  8136. #define SBS_SIZEBOXTOPLEFTALIGN 0x0002L
  8137. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  8138. #define SBS_SIZEBOX 0x0008L
  8139. ;begin_winver_400
  8140. #define SBS_SIZEGRIP 0x0010L
  8141. ;end_winver_400
  8142. ;end_rwinuser
  8143. #endif /* !NOWINSTYLES */
  8144. /*
  8145. * Scroll bar messages
  8146. */
  8147. #ifndef NOWINMESSAGES
  8148. #define SBM_SETPOS 0x00E0 /*not in win3.1 */
  8149. #define SBM_GETPOS 0x00E1 /*not in win3.1 */
  8150. #define SBM_SETRANGE 0x00E2 /*not in win3.1 */
  8151. #define SBM_SETRANGEREDRAW 0x00E6 /*not in win3.1 */
  8152. #define SBM_GETRANGE 0x00E3 /*not in win3.1 */
  8153. #define SBM_ENABLE_ARROWS 0x00E4 /*not in win3.1 */
  8154. ;begin_winver_400
  8155. #define SBM_SETSCROLLINFO 0x00E9
  8156. #define SBM_GETSCROLLINFO 0x00EA
  8157. ;end_winver_400
  8158. ;begin_if_(_WIN32_WINNT)_501
  8159. #define SBM_GETSCROLLBARINFO 0x00EB
  8160. ;end_if_(_WIN32_WINNT)_501
  8161. ;begin_winver_400
  8162. #define SIF_RANGE 0x0001
  8163. #define SIF_PAGE 0x0002
  8164. #define SIF_POS 0x0004
  8165. #define SIF_DISABLENOSCROLL 0x0008
  8166. #define SIF_TRACKPOS 0x0010
  8167. #define SIF_ALL (SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)
  8168. #define SIF_RETURNOLDPOS 0x1000 ;internal
  8169. #define SIF_NOSCROLL 0x2000 ;internal
  8170. #define SIF_MASK 0x701F ;internal
  8171. typedef struct tagSCROLLINFO
  8172. {
  8173. UINT cbSize;
  8174. UINT fMask;
  8175. int nMin;
  8176. int nMax;
  8177. UINT nPage;
  8178. int nPos;
  8179. int nTrackPos;
  8180. } SCROLLINFO, FAR *LPSCROLLINFO;
  8181. typedef SCROLLINFO CONST FAR *LPCSCROLLINFO;
  8182. WINUSERAPI int WINAPI SetScrollInfo(IN HWND, IN int, IN LPCSCROLLINFO, IN BOOL);
  8183. WINUSERAPI BOOL WINAPI GetScrollInfo(IN HWND, IN int, IN OUT LPSCROLLINFO);
  8184. ;begin_internal_501
  8185. ;begin_if_(_WIN32_WINNT)_501
  8186. typedef BOOL (CALLBACK* GETSCROLLINFOPROC)(IN HWND, IN int, IN OUT LPSCROLLINFO);
  8187. typedef int (CALLBACK* SETSCROLLINFOPROC)(IN HWND, IN int, IN LPCSCROLLINFO, IN BOOL);
  8188. ;end_if_(_WIN32_WINNT)_501
  8189. ;end_internal_501
  8190. ;end_winver_400
  8191. #endif /* !NOWINMESSAGES */
  8192. #endif /* !NOCTLMGR */
  8193. #ifndef NOMDI
  8194. /*
  8195. * MDI client style bits
  8196. */
  8197. #define MDIS_ALLCHILDSTYLES 0x0001
  8198. /*
  8199. * wParam Flags for WM_MDITILE and WM_MDICASCADE messages.
  8200. */
  8201. #define MDITILE_VERTICAL 0x0000 /*not in win3.1 */
  8202. #define MDITILE_HORIZONTAL 0x0001 /*not in win3.1 */
  8203. #define MDITILE_SKIPDISABLED 0x0002 /*not in win3.1 */
  8204. ;begin_if_(_WIN32_WINNT)_500
  8205. #define MDITILE_ZORDER 0x0004
  8206. ;end_if_(_WIN32_WINNT)_500
  8207. typedef struct tagMDICREATESTRUCT% {
  8208. LPCTSTR% szClass;
  8209. LPCTSTR% szTitle;
  8210. HANDLE hOwner;
  8211. int x;
  8212. int y;
  8213. int cx;
  8214. int cy;
  8215. DWORD style;
  8216. LPARAM lParam; /* app-defined stuff */
  8217. } MDICREATESTRUCT%, *LPMDICREATESTRUCT%;
  8218. typedef struct tagCLIENTCREATESTRUCT {
  8219. HANDLE hWindowMenu;
  8220. UINT idFirstChild;
  8221. } CLIENTCREATESTRUCT, *LPCLIENTCREATESTRUCT;
  8222. WINUSERAPI
  8223. LRESULT
  8224. WINAPI
  8225. DefFrameProc%(
  8226. IN HWND hWnd,
  8227. IN HWND hWndMDIClient,
  8228. IN UINT uMsg,
  8229. IN WPARAM wParam,
  8230. IN LPARAM lParam);
  8231. WINUSERAPI
  8232. #ifndef _MAC
  8233. LRESULT
  8234. WINAPI
  8235. #else
  8236. LRESULT
  8237. CALLBACK
  8238. #endif
  8239. DefMDIChildProc%(
  8240. IN HWND hWnd,
  8241. IN UINT uMsg,
  8242. IN WPARAM wParam,
  8243. IN LPARAM lParam);
  8244. #ifndef NOMSG
  8245. WINUSERAPI
  8246. BOOL
  8247. WINAPI
  8248. TranslateMDISysAccel(
  8249. IN HWND hWndClient,
  8250. IN LPMSG lpMsg);
  8251. #endif /* !NOMSG */
  8252. WINUSERAPI
  8253. UINT
  8254. WINAPI
  8255. ArrangeIconicWindows(
  8256. IN HWND hWnd);
  8257. WINUSERAPI
  8258. HWND
  8259. WINAPI
  8260. CreateMDIWindow%(
  8261. IN LPCTSTR% lpClassName,
  8262. IN LPCTSTR% lpWindowName,
  8263. IN DWORD dwStyle,
  8264. IN int X,
  8265. IN int Y,
  8266. IN int nWidth,
  8267. IN int nHeight,
  8268. IN HWND hWndParent,
  8269. IN HINSTANCE hInstance,
  8270. IN LPARAM lParam
  8271. );
  8272. ;begin_winver_400
  8273. WINUSERAPI WORD WINAPI TileWindows( IN HWND hwndParent, IN UINT wHow, IN CONST RECT * lpRect, IN UINT cKids, IN const HWND FAR * lpKids);
  8274. WINUSERAPI WORD WINAPI CascadeWindows( IN HWND hwndParent, IN UINT wHow, IN CONST RECT * lpRect, IN UINT cKids, IN const HWND FAR * lpKids);
  8275. ;end_winver_400
  8276. #endif /* !NOMDI */
  8277. #endif /* !NOUSER */
  8278. /****** Help support ********************************************************/
  8279. #ifndef NOHELP
  8280. typedef DWORD HELPPOLY;
  8281. typedef struct tagMULTIKEYHELP% {
  8282. #ifndef _MAC
  8283. DWORD mkSize;
  8284. #else
  8285. WORD mkSize;
  8286. #endif
  8287. TCHAR% mkKeylist;
  8288. TCHAR% szKeyphrase[1];
  8289. } MULTIKEYHELP%, *PMULTIKEYHELP%, *LPMULTIKEYHELP%;
  8290. typedef struct tagHELPWININFO% {
  8291. int wStructSize;
  8292. int x;
  8293. int y;
  8294. int dx;
  8295. int dy;
  8296. int wMax;
  8297. TCHAR% rgchMember[2];
  8298. } HELPWININFO%, *PHELPWININFO%, *LPHELPWININFO%;
  8299. ;begin_rwinuser
  8300. /*
  8301. * Commands to pass to WinHelp()
  8302. */
  8303. #define HELP_CONTEXT 0x0001L /* Display topic in ulTopic */
  8304. #define HELP_QUIT 0x0002L /* Terminate help */
  8305. #define HELP_INDEX 0x0003L /* Display index */
  8306. #define HELP_CONTENTS 0x0003L
  8307. #define HELP_HELPONHELP 0x0004L /* Display help on using help */
  8308. #define HELP_SETINDEX 0x0005L /* Set current Index for multi index help */
  8309. #define HELP_SETCONTENTS 0x0005L
  8310. #define HELP_CONTEXTPOPUP 0x0008L
  8311. #define HELP_FORCEFILE 0x0009L
  8312. #define HELP_KEY 0x0101L /* Display topic for keyword in offabData */
  8313. #define HELP_COMMAND 0x0102L
  8314. #define HELP_PARTIALKEY 0x0105L
  8315. #define HELP_MULTIKEY 0x0201L
  8316. #define HELP_SETWINPOS 0x0203L
  8317. ;begin_winver_400
  8318. #define HELP_CONTEXTMENU 0x000a
  8319. #define HELP_FINDER 0x000b
  8320. #define HELP_WM_HELP 0x000c
  8321. #define HELP_SETPOPUP_POS 0x000d
  8322. #define HELP_TCARD 0x8000
  8323. #define HELP_TCARD_DATA 0x0010
  8324. #define HELP_TCARD_OTHER_CALLER 0x0011
  8325. // These are in winhelp.h in Win95.
  8326. #define IDH_NO_HELP 28440
  8327. #define IDH_MISSING_CONTEXT 28441 // Control doesn't have matching help context
  8328. #define IDH_GENERIC_HELP_BUTTON 28442 // Property sheet help button
  8329. #define IDH_OK 28443
  8330. #define IDH_CANCEL 28444
  8331. #define IDH_HELP 28445
  8332. ;end_winver_400
  8333. ;end_rwinuser
  8334. #define HELP_HB_NORMAL 0x0000L ;internal_NT
  8335. #define HELP_HB_STRING 0x0100L ;internal_NT
  8336. #define HELP_HB_STRUCT 0x0200L ;internal_NT
  8337. WINUSERAPI
  8338. BOOL
  8339. WINAPI
  8340. WinHelp%(
  8341. IN HWND hWndMain,
  8342. IN LPCTSTR% lpszHelp,
  8343. IN UINT uCommand,
  8344. IN ULONG_PTR dwData
  8345. );
  8346. #endif /* !NOHELP */
  8347. ;begin_winver_500
  8348. #define GR_GDIOBJECTS 0 /* Count of GDI objects */
  8349. #define GR_USEROBJECTS 1 /* Count of USER objects */
  8350. #define GR_MAXOBJECT 1 ;internal
  8351. WINUSERAPI
  8352. DWORD
  8353. WINAPI
  8354. GetGuiResources(
  8355. IN HANDLE hProcess,
  8356. IN DWORD uiFlags);
  8357. ;end_winver_500
  8358. ;begin_internal_if_(_WIN32_WINNT)_500
  8359. /*
  8360. * Query win32k statistics -internal
  8361. * QUERYUSER_CS Query critical section usage
  8362. * QUERYUSER_HANDLES Query user per-process user handle count
  8363. */
  8364. #define QUC_PID_TOTAL 0xffffffff
  8365. #define QUERYUSER_HANDLES 0x1
  8366. #if defined (USER_PERFORMANCE)
  8367. #define QUERYUSER_CS 0x2
  8368. /*
  8369. * The counters in CSSTATISTICS refer to the USER critical section:
  8370. * cExclusive counts how many times the CS was aquired exclusive
  8371. * cShared counts how many times the CS was aquired shared
  8372. * i64TimeExclusive counts the time (NtQueryPerformanceCounter() units)
  8373. * spent in the resource since the last query.
  8374. */
  8375. typedef struct _tagCSStatistics {
  8376. DWORD cExclusive;
  8377. DWORD cShared;
  8378. __int64 i64TimeExclusive;
  8379. } CSSTATISTICS;
  8380. #endif // USER_PERFORMANCE
  8381. BOOL
  8382. WINAPI
  8383. QueryUserCounters(
  8384. IN DWORD dwQueryType,
  8385. IN LPVOID pvIn,
  8386. IN DWORD dwInSize,
  8387. OUT LPVOID pvResult,
  8388. IN DWORD dwOutSize
  8389. );
  8390. ;end_internal_if_(_WIN32_WINNT)_500
  8391. #ifndef NOSYSPARAMSINFO
  8392. /*
  8393. * Parameter for SystemParametersInfo()
  8394. */
  8395. #define SPI_GETBEEP 0x0001
  8396. #define SPI_SETBEEP 0x0002
  8397. #define SPI_GETMOUSE 0x0003
  8398. #define SPI_SETMOUSE 0x0004
  8399. #define SPI_GETBORDER 0x0005
  8400. #define SPI_SETBORDER 0x0006
  8401. #define SPI_TIMEOUTS 0x0007 ;internal
  8402. #define SPI_KANJIMENU 0x0008 ;internal
  8403. #define SPI_GETKEYBOARDSPEED 0x000A
  8404. #define SPI_SETKEYBOARDSPEED 0x000B
  8405. #define SPI_LANGDRIVER 0x000C
  8406. #define SPI_ICONHORIZONTALSPACING 0x000D
  8407. #define SPI_GETSCREENSAVETIMEOUT 0x000E
  8408. #define SPI_SETSCREENSAVETIMEOUT 0x000F
  8409. #define SPI_GETSCREENSAVEACTIVE 0x0010
  8410. #define SPI_SETSCREENSAVEACTIVE 0x0011
  8411. #define SPI_GETGRIDGRANULARITY 0x0012
  8412. #define SPI_SETGRIDGRANULARITY 0x0013
  8413. #define SPI_SETDESKWALLPAPER 0x0014
  8414. #define SPI_SETDESKPATTERN 0x0015
  8415. #define SPI_GETKEYBOARDDELAY 0x0016
  8416. #define SPI_SETKEYBOARDDELAY 0x0017
  8417. #define SPI_ICONVERTICALSPACING 0x0018
  8418. #define SPI_GETICONTITLEWRAP 0x0019
  8419. #define SPI_SETICONTITLEWRAP 0x001A
  8420. #define SPI_GETMENUDROPALIGNMENT 0x001B
  8421. #define SPI_SETMENUDROPALIGNMENT 0x001C
  8422. #define SPI_SETDOUBLECLKWIDTH 0x001D
  8423. #define SPI_SETDOUBLECLKHEIGHT 0x001E
  8424. #define SPI_GETICONTITLELOGFONT 0x001F
  8425. #define SPI_SETDOUBLECLICKTIME 0x0020
  8426. #define SPI_SETMOUSEBUTTONSWAP 0x0021
  8427. #define SPI_SETICONTITLELOGFONT 0x0022
  8428. #define SPI_GETFASTTASKSWITCH 0x0023
  8429. #define SPI_SETFASTTASKSWITCH 0x0024
  8430. ;begin_winver_400
  8431. #define SPI_SETDRAGFULLWINDOWS 0x0025
  8432. #define SPI_GETDRAGFULLWINDOWS 0x0026
  8433. #define SPI_UNUSED39 0x0027 ;internal
  8434. #define SPI_UNUSED40 0x0028 ;internal
  8435. #define SPI_GETNONCLIENTMETRICS 0x0029
  8436. #define SPI_SETNONCLIENTMETRICS 0x002A
  8437. #define SPI_GETMINIMIZEDMETRICS 0x002B
  8438. #define SPI_SETMINIMIZEDMETRICS 0x002C
  8439. #define SPI_GETICONMETRICS 0x002D
  8440. #define SPI_SETICONMETRICS 0x002E
  8441. #define SPI_SETWORKAREA 0x002F
  8442. #define SPI_GETWORKAREA 0x0030
  8443. #define SPI_SETPENWINDOWS 0x0031
  8444. #define SPI_GETHIGHCONTRAST 0x0042
  8445. #define SPI_SETHIGHCONTRAST 0x0043
  8446. #define SPI_GETKEYBOARDPREF 0x0044
  8447. #define SPI_SETKEYBOARDPREF 0x0045
  8448. #define SPI_GETSCREENREADER 0x0046
  8449. #define SPI_SETSCREENREADER 0x0047
  8450. #define SPI_GETANIMATION 0x0048
  8451. #define SPI_SETANIMATION 0x0049
  8452. #define SPI_GETFONTSMOOTHING 0x004A
  8453. #define SPI_SETFONTSMOOTHING 0x004B
  8454. #define SPI_SETDRAGWIDTH 0x004C
  8455. #define SPI_SETDRAGHEIGHT 0x004D
  8456. #define SPI_SETHANDHELD 0x004E
  8457. #define SPI_GETLOWPOWERTIMEOUT 0x004F
  8458. #define SPI_GETPOWEROFFTIMEOUT 0x0050
  8459. #define SPI_SETLOWPOWERTIMEOUT 0x0051
  8460. #define SPI_SETPOWEROFFTIMEOUT 0x0052
  8461. #define SPI_GETLOWPOWERACTIVE 0x0053
  8462. #define SPI_GETPOWEROFFACTIVE 0x0054
  8463. #define SPI_SETLOWPOWERACTIVE 0x0055
  8464. #define SPI_SETPOWEROFFACTIVE 0x0056
  8465. #define SPI_SETCURSORS 0x0057
  8466. #define SPI_SETICONS 0x0058
  8467. #define SPI_GETDEFAULTINPUTLANG 0x0059
  8468. #define SPI_SETDEFAULTINPUTLANG 0x005A
  8469. #define SPI_SETLANGTOGGLE 0x005B
  8470. #define SPI_GETWINDOWSEXTENSION 0x005C
  8471. #define SPI_SETMOUSETRAILS 0x005D
  8472. #define SPI_GETMOUSETRAILS 0x005E
  8473. #define SPI_SETSCREENSAVERRUNNING 0x0061
  8474. #define SPI_SCREENSAVERRUNNING SPI_SETSCREENSAVERRUNNING
  8475. ;end_winver_400
  8476. #define SPI_GETFILTERKEYS 0x0032
  8477. #define SPI_SETFILTERKEYS 0x0033
  8478. #define SPI_GETTOGGLEKEYS 0x0034
  8479. #define SPI_SETTOGGLEKEYS 0x0035
  8480. #define SPI_GETMOUSEKEYS 0x0036
  8481. #define SPI_SETMOUSEKEYS 0x0037
  8482. #define SPI_GETSHOWSOUNDS 0x0038
  8483. #define SPI_SETSHOWSOUNDS 0x0039
  8484. #define SPI_GETSTICKYKEYS 0x003A
  8485. #define SPI_SETSTICKYKEYS 0x003B
  8486. #define SPI_GETACCESSTIMEOUT 0x003C
  8487. #define SPI_SETACCESSTIMEOUT 0x003D
  8488. ;begin_winver_400
  8489. #define SPI_GETSERIALKEYS 0x003E
  8490. #define SPI_SETSERIALKEYS 0x003F
  8491. ;end_winver_400
  8492. #define SPI_GETSOUNDSENTRY 0x0040
  8493. #define SPI_SETSOUNDSENTRY 0x0041
  8494. ;begin_if_(_WIN32_WINNT)_400
  8495. #define SPI_GETSNAPTODEFBUTTON 0x005F
  8496. #define SPI_SETSNAPTODEFBUTTON 0x0060
  8497. ;end_if_(_WIN32_WINNT)_400
  8498. #if (_WIN32_WINNT >= 0x0400) || (_WIN32_WINDOWS > 0x0400)
  8499. #define SPI_GETMOUSEHOVERWIDTH 0x0062
  8500. #define SPI_SETMOUSEHOVERWIDTH 0x0063
  8501. #define SPI_GETMOUSEHOVERHEIGHT 0x0064
  8502. #define SPI_SETMOUSEHOVERHEIGHT 0x0065
  8503. #define SPI_GETMOUSEHOVERTIME 0x0066
  8504. #define SPI_SETMOUSEHOVERTIME 0x0067
  8505. #define SPI_GETWHEELSCROLLLINES 0x0068
  8506. #define SPI_SETWHEELSCROLLLINES 0x0069
  8507. #define SPI_GETMENUSHOWDELAY 0x006A
  8508. #define SPI_SETMENUSHOWDELAY 0x006B
  8509. #define SPI_UNUSED108 0x006C ;internal
  8510. #define SPI_UNUSED109 0x006D ;internal
  8511. #define SPI_GETSHOWIMEUI 0x006E
  8512. #define SPI_SETSHOWIMEUI 0x006F
  8513. #endif
  8514. ;begin_winver_500
  8515. #define SPI_GETMOUSESPEED 0x0070
  8516. #define SPI_SETMOUSESPEED 0x0071
  8517. #define SPI_GETSCREENSAVERRUNNING 0x0072
  8518. #define SPI_GETDESKWALLPAPER 0x0073
  8519. ;end_winver_500
  8520. #define SPI_MAX 0x0074 ;internal
  8521. ;begin_internal_500
  8522. /*
  8523. * ADDING NEW SPI_* VALUES
  8524. * If the value is a BOOL, it should be added after SPI_STARTBOOLRANGE
  8525. * If the value is a DWORD, it should be added after SPI_STARTDWORDRANGE
  8526. * If the value is a structure or a string, go ahead and setup SPI_START*RANGE....
  8527. */
  8528. ;end_internal_500
  8529. ;begin_internal_500
  8530. /*
  8531. * If adding a new SPI value in the following ranges:
  8532. * -You must define both SPI_GET* and SPI_SET* using consecutive numbers
  8533. * -The low order bit of SPI_GET* must be 0
  8534. * -The low order bit of SPI_SET* must be 1
  8535. * -Properly update SPI_MAX*RANGE
  8536. * -Add the default value to kernel\globals.c in the proper *CPUserPreferences* variable
  8537. * -Add the default value to the proper registry hives.
  8538. * -If your value requires some special validation, do so in kernel\ntstubs.c
  8539. * -If you find something wrong in this documentation, FIX IT!.
  8540. */
  8541. #define SPIF_SET 0x0001
  8542. #define SPIF_BOOL 0x1000
  8543. #define SPIF_DWORD 0x2000
  8544. #define SPIF_RANGETYPEMASK 0x3000
  8545. /*
  8546. * BOOLeans range.
  8547. * For GET, pvParam is a pointer to a BOOL
  8548. * For SET, pvParam is the value
  8549. */
  8550. ;end_internal_500
  8551. ;begin_winver_500
  8552. #define SPI_STARTBOOLRANGE 0x1000 ;internal_500
  8553. #define SPI_GETACTIVEWINDOWTRACKING 0x1000
  8554. #define SPI_SETACTIVEWINDOWTRACKING 0x1001
  8555. #define SPI_GETMENUANIMATION 0x1002
  8556. #define SPI_SETMENUANIMATION 0x1003
  8557. #define SPI_GETCOMBOBOXANIMATION 0x1004
  8558. #define SPI_SETCOMBOBOXANIMATION 0x1005
  8559. #define SPI_GETLISTBOXSMOOTHSCROLLING 0x1006
  8560. #define SPI_SETLISTBOXSMOOTHSCROLLING 0x1007
  8561. #define SPI_GETGRADIENTCAPTIONS 0x1008
  8562. #define SPI_SETGRADIENTCAPTIONS 0x1009
  8563. #define SPI_GETKEYBOARDCUES 0x100A
  8564. #define SPI_SETKEYBOARDCUES 0x100B
  8565. #define SPI_GETMENUUNDERLINES SPI_GETKEYBOARDCUES
  8566. #define SPI_SETMENUUNDERLINES SPI_SETKEYBOARDCUES
  8567. #define SPI_GETACTIVEWNDTRKZORDER 0x100C
  8568. #define SPI_SETACTIVEWNDTRKZORDER 0x100D
  8569. #define SPI_GETHOTTRACKING 0x100E
  8570. #define SPI_SETHOTTRACKING 0x100F
  8571. #define SPI_UNUSED1010 0x1010 ;internal
  8572. #define SPI_UNUSED1011 0x1011 ;internal
  8573. #define SPI_GETMENUFADE 0x1012
  8574. #define SPI_SETMENUFADE 0x1013
  8575. #define SPI_GETSELECTIONFADE 0x1014
  8576. #define SPI_SETSELECTIONFADE 0x1015
  8577. #define SPI_GETTOOLTIPANIMATION 0x1016
  8578. #define SPI_SETTOOLTIPANIMATION 0x1017
  8579. #define SPI_GETTOOLTIPFADE 0x1018
  8580. #define SPI_SETTOOLTIPFADE 0x1019
  8581. #define SPI_GETCURSORSHADOW 0x101A
  8582. #define SPI_SETCURSORSHADOW 0x101B
  8583. ;begin_if_(_WIN32_WINNT)_501
  8584. #define SPI_GETMOUSESONAR 0x101C
  8585. #define SPI_SETMOUSESONAR 0x101D
  8586. #define SPI_GETMOUSECLICKLOCK 0x101E
  8587. #define SPI_SETMOUSECLICKLOCK 0x101F
  8588. #define SPI_GETMOUSEVANISH 0x1020
  8589. #define SPI_SETMOUSEVANISH 0x1021
  8590. #define SPI_GETFLATMENU 0x1022
  8591. #define SPI_SETFLATMENU 0x1023
  8592. #define SPI_GETDROPSHADOW 0x1024
  8593. #define SPI_SETDROPSHADOW 0x1025
  8594. #define SPI_GETBLOCKSENDINPUTRESETS 0x1026
  8595. #define SPI_SETBLOCKSENDINPUTRESETS 0x1027
  8596. ;end_if_(_WIN32_WINNT)_501
  8597. /* ;internal
  8598. * All SPI_s for UI effects must be < SPI_GETUIEFFECTS ;internal
  8599. */ ;internal
  8600. #define SPI_GETUIEFFECTS 0x103E
  8601. #define SPI_SETUIEFFECTS 0x103F
  8602. #define SPI_MAXBOOLRANGE 0x1040 ;internal_500
  8603. #define SPI_BOOLRANGECOUNT ((SPI_MAXBOOLRANGE - SPI_STARTBOOLRANGE) / 2) ;internal_500
  8604. #define SPI_BOOLMASKDWORDSIZE (((SPI_BOOLRANGECOUNT - 1) / 32) + 1) ;internal_500
  8605. ;begin_internal_500
  8606. /*
  8607. * DWORDs range.
  8608. * For GET, pvParam is a pointer to a DWORD
  8609. * For SET, pvParam is the value
  8610. */
  8611. ;end_internal_500
  8612. #define SPI_STARTDWORDRANGE 0x2000 ;internal_500
  8613. #define SPI_GETFOREGROUNDLOCKTIMEOUT 0x2000
  8614. #define SPI_SETFOREGROUNDLOCKTIMEOUT 0x2001
  8615. #define SPI_GETACTIVEWNDTRKTIMEOUT 0x2002
  8616. #define SPI_SETACTIVEWNDTRKTIMEOUT 0x2003
  8617. #define SPI_GETFOREGROUNDFLASHCOUNT 0x2004
  8618. #define SPI_SETFOREGROUNDFLASHCOUNT 0x2005
  8619. #define SPI_GETCARETWIDTH 0x2006
  8620. #define SPI_SETCARETWIDTH 0x2007
  8621. ;begin_if_(_WIN32_WINNT)_501
  8622. #define SPI_GETMOUSECLICKLOCKTIME 0x2008
  8623. #define SPI_SETMOUSECLICKLOCKTIME 0x2009
  8624. #define SPI_GETFONTSMOOTHINGTYPE 0x200A
  8625. #define SPI_SETFONTSMOOTHINGTYPE 0x200B
  8626. /* constants for SPI_GETFONTSMOOTHINGTYPE and SPI_SETFONTSMOOTHINGTYPE: */
  8627. #define FE_FONTSMOOTHINGSTANDARD 0x0001
  8628. #define FE_FONTSMOOTHINGCLEARTYPE 0x0002
  8629. #define FE_FONTSMOOTHINGDOCKING 0x8000
  8630. #define FE_FONTSMOOTHINGTYPE_VALID (FE_FONTSMOOTHINGSTANDARD | FE_FONTSMOOTHINGCLEARTYPE | FE_FONTSMOOTHINGDOCKING) ;internal_500
  8631. #define SPI_GETFONTSMOOTHINGCONTRAST 0x200C
  8632. #define SPI_SETFONTSMOOTHINGCONTRAST 0x200D
  8633. #define SPI_GETFOCUSBORDERWIDTH 0x200E
  8634. #define SPI_SETFOCUSBORDERWIDTH 0x200F
  8635. #define SPI_GETFOCUSBORDERHEIGHT 0x2010
  8636. #define SPI_SETFOCUSBORDERHEIGHT 0x2011
  8637. #define SPI_GETFONTSMOOTHINGORIENTATION 0x2012
  8638. #define SPI_SETFONTSMOOTHINGORIENTATION 0x2013
  8639. /* constants for SPI_GETFONTSMOOTHINGORIENTATION and SPI_SETFONTSMOOTHINGORIENTATION: */
  8640. #define FE_FONTSMOOTHINGORIENTATIONBGR 0x0000
  8641. #define FE_FONTSMOOTHINGORIENTATIONRGB 0x0001
  8642. #define FE_FONTSMOOTHINGORIENTATION_VALID (FE_FONTSMOOTHINGORIENTATIONRGB) ;internal_500
  8643. ;end_if_(_WIN32_WINNT)_501
  8644. #define SPI_MAXDWORDRANGE 0x2014 ;internal_501
  8645. #define SPI_DWORDRANGECOUNT ((SPI_MAXDWORDRANGE - SPI_STARTDWORDRANGE) / 2) ;internal_501
  8646. ;end_winver_500
  8647. /*
  8648. * Flags
  8649. */
  8650. #define SPIF_UPDATEINIFILE 0x0001
  8651. #define SPIF_SENDWININICHANGE 0x0002
  8652. #define SPIF_SENDCHANGE SPIF_SENDWININICHANGE
  8653. #define SPIF_VALID (SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE) ;internal
  8654. #define METRICS_USEDEFAULT -1
  8655. #ifdef _WINGDI_
  8656. #ifndef NOGDI
  8657. typedef struct tagNONCLIENTMETRICS%
  8658. {
  8659. UINT cbSize;
  8660. int iBorderWidth;
  8661. int iScrollWidth;
  8662. int iScrollHeight;
  8663. int iCaptionWidth;
  8664. int iCaptionHeight;
  8665. LOGFONT% lfCaptionFont;
  8666. int iSmCaptionWidth;
  8667. int iSmCaptionHeight;
  8668. LOGFONT% lfSmCaptionFont;
  8669. int iMenuWidth;
  8670. int iMenuHeight;
  8671. LOGFONT% lfMenuFont;
  8672. LOGFONT% lfStatusFont;
  8673. LOGFONT% lfMessageFont;
  8674. } NONCLIENTMETRICS%, *PNONCLIENTMETRICS%, FAR* LPNONCLIENTMETRICS%;
  8675. #endif /* NOGDI */
  8676. #endif /* _WINGDI_ */
  8677. #define ARW_BOTTOMLEFT 0x0000L
  8678. #define ARW_BOTTOMRIGHT 0x0001L
  8679. #define ARW_TOPLEFT 0x0002L
  8680. #define ARW_TOPRIGHT 0x0003L
  8681. #define ARW_STARTMASK 0x0003L
  8682. #define ARW_STARTRIGHT 0x0001L
  8683. #define ARW_STARTTOP 0x0002L
  8684. #define ARW_LEFT 0x0000L
  8685. #define ARW_RIGHT 0x0000L
  8686. #define ARW_UP 0x0004L
  8687. #define ARW_DOWN 0x0004L
  8688. #define ARW_HIDE 0x0008L
  8689. #define ARW_VALID 0x000FL ;internal
  8690. typedef struct tagMINIMIZEDMETRICS
  8691. {
  8692. UINT cbSize;
  8693. int iWidth;
  8694. int iHorzGap;
  8695. int iVertGap;
  8696. int iArrange;
  8697. } MINIMIZEDMETRICS, *PMINIMIZEDMETRICS, *LPMINIMIZEDMETRICS;
  8698. #ifdef _WINGDI_
  8699. #ifndef NOGDI
  8700. typedef struct tagICONMETRICS%
  8701. {
  8702. UINT cbSize;
  8703. int iHorzSpacing;
  8704. int iVertSpacing;
  8705. int iTitleWrap;
  8706. LOGFONT% lfFont;
  8707. } ICONMETRICS%, *PICONMETRICS%, *LPICONMETRICS%;
  8708. #endif /* NOGDI */
  8709. #endif /* _WINGDI_ */
  8710. typedef struct tagANIMATIONINFO
  8711. {
  8712. UINT cbSize;
  8713. int iMinAnimate;
  8714. } ANIMATIONINFO, *LPANIMATIONINFO;
  8715. typedef struct tagSERIALKEYS%
  8716. {
  8717. UINT cbSize;
  8718. DWORD dwFlags;
  8719. LPTSTR% lpszActivePort;
  8720. LPTSTR% lpszPort;
  8721. UINT iBaudRate;
  8722. UINT iPortState;
  8723. UINT iActive;
  8724. } SERIALKEYS%, *LPSERIALKEYS%;
  8725. /* flags for SERIALKEYS dwFlags field */
  8726. #define SERKF_SERIALKEYSON 0x00000001
  8727. #define SERKF_AVAILABLE 0x00000002
  8728. #define SERKF_INDICATOR 0x00000004
  8729. ;begin_internal_500
  8730. #define MAX_SCHEME_NAME_SIZE 128
  8731. ;end_internal_500
  8732. typedef struct tagHIGHCONTRAST%
  8733. {
  8734. UINT cbSize;
  8735. DWORD dwFlags;
  8736. LPTSTR% lpszDefaultScheme;
  8737. } HIGHCONTRAST%, *LPHIGHCONTRAST%;
  8738. /* flags for HIGHCONTRAST dwFlags field */
  8739. #define HCF_HIGHCONTRASTON 0x00000001
  8740. #define HCF_AVAILABLE 0x00000002
  8741. #define HCF_HOTKEYACTIVE 0x00000004
  8742. #define HCF_CONFIRMHOTKEY 0x00000008
  8743. #define HCF_HOTKEYSOUND 0x00000010
  8744. #define HCF_INDICATOR 0x00000020
  8745. #define HCF_HOTKEYAVAILABLE 0x00000040
  8746. /* Flags for ChangeDisplaySettings */
  8747. #define CDS_UPDATEREGISTRY 0x00000001
  8748. #define CDS_TEST 0x00000002
  8749. #define CDS_FULLSCREEN 0x00000004
  8750. #define CDS_GLOBAL 0x00000008
  8751. #define CDS_SET_PRIMARY 0x00000010
  8752. #define CDS_VIDEOPARAMETERS 0x00000020
  8753. #define CDS_RAWMODE 0x00000040 ;internal
  8754. #define CDS_TRYCLOSEST 0x00000080 ;internal
  8755. #define CDS_EXCLUSIVE 0x80000000 ;internal
  8756. #define CDS_RESET 0x40000000
  8757. #define CDS_NORESET 0x10000000
  8758. #define CDS_VALID 0xD00000FF ;internal
  8759. #include <tvout.h>
  8760. /* Return values for ChangeDisplaySettings */
  8761. #define DISP_CHANGE_SUCCESSFUL 0
  8762. #define DISP_CHANGE_RESTART 1
  8763. #define DISP_CHANGE_FAILED -1
  8764. #define DISP_CHANGE_BADMODE -2
  8765. #define DISP_CHANGE_NOTUPDATED -3
  8766. #define DISP_CHANGE_BADFLAGS -4
  8767. #define DISP_CHANGE_BADPARAM -5
  8768. ;begin_if_(_WIN32_WINNT)_501
  8769. #define DISP_CHANGE_BADDUALVIEW -6
  8770. ;end_if_(_WIN32_WINNT)_501
  8771. #ifdef _WINGDI_
  8772. #ifndef NOGDI
  8773. WINUSERAPI
  8774. LONG
  8775. WINAPI
  8776. ChangeDisplaySettings%(
  8777. IN LPDEVMODE% lpDevMode,
  8778. IN DWORD dwFlags);
  8779. WINUSERAPI
  8780. LONG
  8781. WINAPI
  8782. ChangeDisplaySettingsEx%(
  8783. IN LPCTSTR% lpszDeviceName,
  8784. IN LPDEVMODE% lpDevMode,
  8785. IN HWND hwnd,
  8786. IN DWORD dwflags,
  8787. IN LPVOID lParam);
  8788. #define ENUM_CURRENT_SETTINGS ((DWORD)-1)
  8789. #define ENUM_REGISTRY_SETTINGS ((DWORD)-2)
  8790. WINUSERAPI
  8791. BOOL
  8792. WINAPI
  8793. EnumDisplaySettings%(
  8794. IN LPCTSTR% lpszDeviceName,
  8795. IN DWORD iModeNum,
  8796. OUT LPDEVMODE% lpDevMode);
  8797. ;begin_winver_500
  8798. WINUSERAPI
  8799. BOOL
  8800. WINAPI
  8801. EnumDisplaySettingsEx%(
  8802. IN LPCTSTR% lpszDeviceName,
  8803. IN DWORD iModeNum,
  8804. OUT LPDEVMODE% lpDevMode,
  8805. IN DWORD dwFlags);
  8806. /* Flags for EnumDisplaySettingsEx */
  8807. #define EDS_SHOW_DUPLICATES 0x00000001 ;internal
  8808. #define EDS_SHOW_MONITOR_NOT_CAPABLE 0x00000002 ;internal
  8809. #define EDS_RAWMODE 0x00000002
  8810. WINUSERAPI
  8811. BOOL
  8812. WINAPI
  8813. EnumDisplayDevices%(
  8814. IN LPCTSTR% lpDevice,
  8815. IN DWORD iDevNum,
  8816. OUT PDISPLAY_DEVICE% lpDisplayDevice,
  8817. IN DWORD dwFlags);
  8818. ;end_winver_500
  8819. #endif /* NOGDI */
  8820. #endif /* _WINGDI_ */
  8821. VOID LoadRemoteFonts(VOID); ;internal
  8822. WINUSERAPI
  8823. BOOL
  8824. WINAPI
  8825. SystemParametersInfo%(
  8826. IN UINT uiAction,
  8827. IN UINT uiParam,
  8828. IN OUT PVOID pvParam,
  8829. IN UINT fWinIni);
  8830. ;begin_internal_501
  8831. ;begin_if_(_WIN32_WINNT)_501
  8832. typedef BOOL (CALLBACK* SYSTEMPARAMETERSINFO) (
  8833. IN UINT,
  8834. IN UINT,
  8835. IN OUT PVOID,
  8836. IN UINT);
  8837. ;end_if_(_WIN32_WINNT)_501
  8838. ;end_internal_501
  8839. #endif /* !NOSYSPARAMSINFO */
  8840. /*
  8841. * Accessibility support
  8842. */
  8843. typedef struct tagFILTERKEYS
  8844. {
  8845. UINT cbSize;
  8846. DWORD dwFlags;
  8847. DWORD iWaitMSec; // Acceptance Delay
  8848. DWORD iDelayMSec; // Delay Until Repeat
  8849. DWORD iRepeatMSec; // Repeat Rate
  8850. DWORD iBounceMSec; // Debounce Time
  8851. } FILTERKEYS, *LPFILTERKEYS;
  8852. /*
  8853. * FILTERKEYS dwFlags field
  8854. */
  8855. #define FKF_FILTERKEYSON 0x00000001
  8856. #define FKF_AVAILABLE 0x00000002
  8857. #define FKF_HOTKEYACTIVE 0x00000004
  8858. #define FKF_CONFIRMHOTKEY 0x00000008
  8859. #define FKF_HOTKEYSOUND 0x00000010
  8860. #define FKF_INDICATOR 0x00000020
  8861. #define FKF_CLICKON 0x00000040
  8862. #define FKF_VALID 0x0000007F ;internal
  8863. typedef struct tagSTICKYKEYS
  8864. {
  8865. UINT cbSize;
  8866. DWORD dwFlags;
  8867. } STICKYKEYS, *LPSTICKYKEYS;
  8868. /*
  8869. * STICKYKEYS dwFlags field
  8870. */
  8871. #define SKF_STICKYKEYSON 0x00000001
  8872. #define SKF_AVAILABLE 0x00000002
  8873. #define SKF_HOTKEYACTIVE 0x00000004
  8874. #define SKF_CONFIRMHOTKEY 0x00000008
  8875. #define SKF_HOTKEYSOUND 0x00000010
  8876. #define SKF_INDICATOR 0x00000020
  8877. #define SKF_AUDIBLEFEEDBACK 0x00000040
  8878. #define SKF_TRISTATE 0x00000080
  8879. #define SKF_TWOKEYSOFF 0x00000100
  8880. #define SKF_VALID 0x000001FF ; internal
  8881. ;begin_if_(_WIN32_WINNT)_500
  8882. #define SKF_LALTLATCHED 0x10000000
  8883. #define SKF_LCTLLATCHED 0x04000000
  8884. #define SKF_LSHIFTLATCHED 0x01000000
  8885. #define SKF_RALTLATCHED 0x20000000
  8886. #define SKF_RCTLLATCHED 0x08000000
  8887. #define SKF_RSHIFTLATCHED 0x02000000
  8888. #define SKF_LWINLATCHED 0x40000000
  8889. #define SKF_RWINLATCHED 0x80000000
  8890. #define SKF_LALTLOCKED 0x00100000
  8891. #define SKF_LCTLLOCKED 0x00040000
  8892. #define SKF_LSHIFTLOCKED 0x00010000
  8893. #define SKF_RALTLOCKED 0x00200000
  8894. #define SKF_RCTLLOCKED 0x00080000
  8895. #define SKF_RSHIFTLOCKED 0x00020000
  8896. #define SKF_LWINLOCKED 0x00400000
  8897. #define SKF_RWINLOCKED 0x00800000
  8898. #define SKF_STATEINFO 0xffff0000 ; internal
  8899. ;end_if_(_WIN32_WINNT)_500
  8900. typedef struct tagMOUSEKEYS
  8901. {
  8902. UINT cbSize;
  8903. DWORD dwFlags;
  8904. DWORD iMaxSpeed;
  8905. DWORD iTimeToMaxSpeed;
  8906. DWORD iCtrlSpeed;
  8907. DWORD dwReserved1;
  8908. DWORD dwReserved2;
  8909. } MOUSEKEYS, *LPMOUSEKEYS;
  8910. /*
  8911. * MOUSEKEYS dwFlags field
  8912. */
  8913. #define MKF_MOUSEKEYSON 0x00000001
  8914. #define MKF_AVAILABLE 0x00000002
  8915. #define MKF_HOTKEYACTIVE 0x00000004
  8916. #define MKF_CONFIRMHOTKEY 0x00000008
  8917. #define MKF_HOTKEYSOUND 0x00000010
  8918. #define MKF_INDICATOR 0x00000020
  8919. #define MKF_MODIFIERS 0x00000040
  8920. #define MKF_REPLACENUMBERS 0x00000080
  8921. #define MKF_VALID 0x000000FF ;internal
  8922. ;begin_if_(_WIN32_WINNT)_500
  8923. #define MKF_LEFTBUTTONSEL 0x10000000
  8924. #define MKF_RIGHTBUTTONSEL 0x20000000
  8925. #define MKF_LEFTBUTTONDOWN 0x01000000
  8926. #define MKF_RIGHTBUTTONDOWN 0x02000000
  8927. #define MKF_MOUSEMODE 0x80000000
  8928. #define MKF_STATEINFO 0xB3000000 ;internal
  8929. ;end_if_(_WIN32_WINNT)_500
  8930. typedef struct tagACCESSTIMEOUT
  8931. {
  8932. UINT cbSize;
  8933. DWORD dwFlags;
  8934. DWORD iTimeOutMSec;
  8935. } ACCESSTIMEOUT, *LPACCESSTIMEOUT;
  8936. /*
  8937. * ACCESSTIMEOUT dwFlags field
  8938. */
  8939. #define ATF_TIMEOUTON 0x00000001
  8940. #define ATF_ONOFFFEEDBACK 0x00000002
  8941. #define ATF_VALID 0x00000003 ;internal
  8942. /* values for SOUNDSENTRY iFSGrafEffect field */
  8943. #define SSGF_NONE 0
  8944. #define SSGF_DISPLAY 3
  8945. /* values for SOUNDSENTRY iFSTextEffect field */
  8946. #define SSTF_NONE 0
  8947. #define SSTF_CHARS 1
  8948. #define SSTF_BORDER 2
  8949. #define SSTF_DISPLAY 3
  8950. /* values for SOUNDSENTRY iWindowsEffect field */
  8951. #define SSWF_NONE 0
  8952. #define SSWF_TITLE 1
  8953. #define SSWF_WINDOW 2
  8954. #define SSWF_DISPLAY 3
  8955. #define SSWF_CUSTOM 4
  8956. typedef struct tagSOUNDSENTRY%
  8957. {
  8958. UINT cbSize;
  8959. DWORD dwFlags;
  8960. DWORD iFSTextEffect;
  8961. DWORD iFSTextEffectMSec;
  8962. DWORD iFSTextEffectColorBits;
  8963. DWORD iFSGrafEffect;
  8964. DWORD iFSGrafEffectMSec;
  8965. DWORD iFSGrafEffectColor;
  8966. DWORD iWindowsEffect;
  8967. DWORD iWindowsEffectMSec;
  8968. LPTSTR% lpszWindowsEffectDLL;
  8969. DWORD iWindowsEffectOrdinal;
  8970. } SOUNDSENTRY%, *LPSOUNDSENTRY%;
  8971. /*
  8972. * SOUNDSENTRY dwFlags field
  8973. */
  8974. #define SSF_SOUNDSENTRYON 0x00000001
  8975. #define SSF_AVAILABLE 0x00000002
  8976. #define SSF_INDICATOR 0x00000004
  8977. #define SSF_VALID 0x00000007 ;internal
  8978. typedef struct tagTOGGLEKEYS
  8979. {
  8980. UINT cbSize;
  8981. DWORD dwFlags;
  8982. } TOGGLEKEYS, *LPTOGGLEKEYS;
  8983. /*
  8984. * TOGGLEKEYS dwFlags field
  8985. */
  8986. #define TKF_TOGGLEKEYSON 0x00000001
  8987. #define TKF_AVAILABLE 0x00000002
  8988. #define TKF_HOTKEYACTIVE 0x00000004
  8989. #define TKF_CONFIRMHOTKEY 0x00000008
  8990. #define TKF_HOTKEYSOUND 0x00000010
  8991. #define TKF_INDICATOR 0x00000020
  8992. #define TKF_VALID 0x0000003F ;internal
  8993. ;begin_internal
  8994. WINUSERAPI VOID WINAPI RegisterNetworkCapabilities( IN DWORD dwBitsToSet, IN DWORD dwValues);
  8995. #define RNC_NETWORKS 0x00000001
  8996. #define RNC_LOGON 0x00000002
  8997. ;end_internal
  8998. ;begin_internal
  8999. #if !defined(WINNT) // Win95 version of EndTask
  9000. WINUSERAPI DWORD WINAPI EndTask( IN HWND hwnd, IN DWORD idProcess, IN LPSTR lpszCaption, IN DWORD dwFlags);
  9001. #define ET_ALLOWFORWAIT 0x00000001
  9002. #define ET_TRYTOKILLNICELY 0x00000002
  9003. #define ET_NOUI 0x00000004
  9004. #define ET_NOWAIT 0x00000008
  9005. #define ET_VALID (ET_ALLOWFORWAIT | ET_TRYTOKILLNICELY | ET_NOUI | ET_NOWAIT)
  9006. #endif
  9007. ;end_internal
  9008. /*
  9009. * Set debug level
  9010. */
  9011. WINUSERAPI
  9012. VOID
  9013. WINAPI
  9014. SetDebugErrorLevel(
  9015. IN DWORD dwLevel
  9016. );
  9017. /*
  9018. * SetLastErrorEx() types.
  9019. */
  9020. #define SLE_ERROR 0x00000001
  9021. #define SLE_MINORERROR 0x00000002
  9022. #define SLE_WARNING 0x00000003
  9023. WINUSERAPI
  9024. VOID
  9025. WINAPI
  9026. SetLastErrorEx(
  9027. IN DWORD dwErrCode,
  9028. IN DWORD dwType
  9029. );
  9030. WINUSERAPI
  9031. int
  9032. WINAPI
  9033. InternalGetWindowText(
  9034. IN HWND hWnd,
  9035. OUT LPWSTR lpString,
  9036. IN int nMaxCount);
  9037. #if defined(WINNT)
  9038. WINUSERAPI
  9039. BOOL
  9040. WINAPI
  9041. EndTask(
  9042. IN HWND hWnd,
  9043. IN BOOL fShutDown,
  9044. IN BOOL fForce);
  9045. #endif
  9046. ;begin_internal_NT
  9047. #define LOGON_LOGOFF 0
  9048. #define LOGON_INPUT_TIMEOUT 1
  9049. #define LOGON_RESTARTSHELL 2
  9050. #if (_WIN32_WINNT >= 0x0500)
  9051. #define LOGON_ACCESSNOTIFY 3
  9052. #define LOGON_POWERSTATE 4
  9053. #define LOGON_LOCKWORKSTATION 5
  9054. #define SESSION_RECONNECTED 6
  9055. #define SESSION_DISCONNECTED 7
  9056. #define SESSION_LOGOFF 8
  9057. #define LOGON_PLAYEVENTSOUND 9
  9058. ;begin_if_(_WIN32_WINNT)_501
  9059. #define LOGON_POWEREVENT 10
  9060. ;end_if_(_WIN32_WINNT)_501
  9061. #define LOGON_LOGOFFCANCELED 11
  9062. ;begin_if_(_WIN32_WINNT)_501
  9063. #define LOGON_SHOW_POWER_MESSAGE 12
  9064. #define LOGON_REMOVE_POWER_MESSAGE 13
  9065. #define SESSION_PRERECONNECT 14
  9066. #define SESSION_DISABLESCRNSAVER 15
  9067. #define SESSION_ENABLESCRNSAVER 16
  9068. #define SESSION_PRERECONNECTDESKTOPSWITCH 17
  9069. #define SESSION_HELPASSISTANTSHADOWSTART 18
  9070. #define SESSION_HELPASSISTANTSHADOWFINISH 19
  9071. #define SESSION_DISCONNECTPIPE 20
  9072. #define LOCK_NORMAL 0
  9073. #define LOCK_RESUMEHIBERNATE 1
  9074. ;end_if_(_WIN32_WINNT)_501
  9075. /*
  9076. * Notification codes for WM_DESKTOPNOTIFY
  9077. */
  9078. ;begin_internal_501
  9079. #define DESKTOP_RELOADWALLPAPER 0
  9080. ;end_internal_501
  9081. #define ACCESS_STICKYKEYS 0x0001
  9082. #define ACCESS_FILTERKEYS 0x0002
  9083. #define ACCESS_MOUSEKEYS 0x0003
  9084. #define ACCESS_TOGGLEKEYS 0x0004
  9085. #define ACCESS_HIGHCONTRAST 0x0005 // notification dlg
  9086. #define ACCESS_UTILITYMANAGER 0x0006
  9087. #define ACCESS_HIGHCONTRASTON 0x0008
  9088. #define ACCESS_HIGHCONTRASTOFF 0x0009
  9089. #define ACCESS_HIGHCONTRASTCHANGE 0x000A
  9090. #define ACCESS_HIGHCONTRASTONNOREG 0x000C
  9091. #define ACCESS_HIGHCONTRASTOFFNOREG 0x000D
  9092. #define ACCESS_HIGHCONTRASTCHANGENOREG 0x000E
  9093. #define ACCESS_HIGHCONTRASTNOREG 0x0004
  9094. #define USER_SOUND_DEFAULT 0 // default MB sound
  9095. #define USER_SOUND_SYSTEMHAND 1 // MB_ICONHAND shifted
  9096. #define USER_SOUND_SYSTEMQUESTION 2 // MB_ICONQUESTION shifted
  9097. #define USER_SOUND_SYSTEMEXCLAMATION 3 // MB_ICONEXCLAMATION shifted
  9098. #define USER_SOUND_SYSTEMASTERISK 4 // MB_ICONASTERISK shifted
  9099. #define USER_SOUND_MENUPOPUP 5
  9100. #define USER_SOUND_MENUCOMMAND 6
  9101. #define USER_SOUND_OPEN 7
  9102. #define USER_SOUND_CLOSE 8
  9103. #define USER_SOUND_RESTOREUP 9
  9104. #define USER_SOUND_RESTOREDOWN 10
  9105. #define USER_SOUND_MINIMIZE 11
  9106. #define USER_SOUND_MAXIMIZE 12
  9107. #define USER_SOUND_SNAPSHOT 13
  9108. #define USER_SOUND_MAX 14
  9109. #ifdef _NTPOAPI_
  9110. typedef struct tagPOWERSTATEPARAMS {
  9111. POWER_ACTION SystemAction;
  9112. SYSTEM_POWER_STATE MinSystemState;
  9113. ULONG Flags;
  9114. BOOL FullScreenMode;
  9115. } POWERSTATEPARAMS, *PPOWERSTATEPARAMS;
  9116. #endif
  9117. #endif
  9118. #define LOGON_FLG_MASK 0xF0000000
  9119. #define LOGON_FLG_SHIFT 28
  9120. #define STARTF_DESKTOPINHERIT 0x40000000
  9121. #define STARTF_SCREENSAVER 0x80000000
  9122. #define WSS_ERROR 0
  9123. #define WSS_BUSY 1
  9124. #define WSS_IDLE 2
  9125. #define DTF_CENTER 0x00 /* Center the bitmap (default) */
  9126. #define DTF_TILE 0x01 /* Tile the bitmap */
  9127. #define DTF_STRETCH 0x02 /* Stretch bitmap to cover screen. */
  9128. #if 0 /* the following have not been used anywhere in NT since at least 1992 */
  9129. #define DTF_NOPALETTE 0x04 /* Realize palette, otherwise match to default. */
  9130. #define DTF_RETAIN 0x08 /* Retain bitmap, ignore win.ini changes */
  9131. #define DTF_FIT 0x10 /* Fit the bitmap to the screen (scaled). */
  9132. #endif
  9133. #ifdef _INC_DDEMLH
  9134. BOOL DdeIsDataHandleReadOnly(
  9135. IN HDDEDATA hData);
  9136. int DdeGetDataHandleFormat(
  9137. IN HDDEDATA hData);
  9138. DWORD DdeGetCallbackInstance(VOID);
  9139. #endif /* defined _INC_DDEMLH */
  9140. #define LPK_TABBED_TEXT_OUT 0
  9141. #define LPK_PSM_TEXT_OUT 1
  9142. #define LPK_DRAW_TEXT_EX 2
  9143. #define LPK_EDIT_CONTROL 3
  9144. VOID
  9145. WINAPI
  9146. InitializeLpkHooks(
  9147. IN CONST FARPROC *lpfpLpkHooks
  9148. );
  9149. WINUSERAPI
  9150. HWND
  9151. WINAPI
  9152. WOWFindWindow(
  9153. IN LPCSTR lpClassName,
  9154. IN LPCSTR lpWindowName);
  9155. int
  9156. WINAPI
  9157. InternalDoEndTaskDlg(
  9158. IN TCHAR* pszTitle);
  9159. DWORD
  9160. WINAPI
  9161. InternalWaitCancel(
  9162. IN HANDLE handle,
  9163. IN DWORD dwMilliseconds);
  9164. HANDLE
  9165. WINAPI
  9166. InternalCreateCallbackThread(
  9167. IN HANDLE hProcess,
  9168. IN ULONG_PTR lpfn,
  9169. IN ULONG_PTR dwData);
  9170. WINUSERAPI
  9171. UINT
  9172. WINAPI
  9173. GetInternalWindowPos(
  9174. IN HWND hWnd,
  9175. OUT LPRECT lpRect,
  9176. IN LPPOINT lpPoint);
  9177. WINUSERAPI
  9178. BOOL
  9179. WINAPI
  9180. SetInternalWindowPos(
  9181. IN HWND hWnd,
  9182. IN UINT cmdShow,
  9183. IN LPRECT lpRect,
  9184. IN LPPOINT lpPoint);
  9185. WINUSERAPI
  9186. BOOL
  9187. WINAPI
  9188. CalcChildScroll(
  9189. IN HWND hWnd,
  9190. IN UINT sb);
  9191. WINUSERAPI
  9192. BOOL
  9193. WINAPI
  9194. RegisterTasklist(
  9195. IN HWND hWndTasklist);
  9196. WINUSERAPI
  9197. BOOL
  9198. WINAPI
  9199. CascadeChildWindows(
  9200. IN HWND hWndParent,
  9201. IN UINT flags);
  9202. WINUSERAPI
  9203. BOOL
  9204. WINAPI
  9205. TileChildWindows(
  9206. IN HWND hWndParent,
  9207. IN UINT flags);
  9208. /*
  9209. * Services support routines
  9210. */
  9211. WINUSERAPI
  9212. BOOL
  9213. WINAPI
  9214. RegisterServicesProcess(
  9215. IN DWORD dwProcessId);
  9216. /*
  9217. * Logon support routines
  9218. */
  9219. WINUSERAPI
  9220. BOOL
  9221. WINAPI
  9222. RegisterLogonProcess(
  9223. IN DWORD dwProcessId,
  9224. IN BOOL fSecure);
  9225. WINUSERAPI
  9226. UINT
  9227. WINAPI
  9228. LockWindowStation(
  9229. IN HWINSTA hWindowStation);
  9230. WINUSERAPI
  9231. BOOL
  9232. WINAPI
  9233. UnlockWindowStation(
  9234. IN HWINSTA hWindowStation);
  9235. WINUSERAPI
  9236. BOOL
  9237. WINAPI
  9238. SetWindowStationUser(
  9239. IN HWINSTA hWindowStation,
  9240. IN PLUID pLuidUser,
  9241. IN PSID pSidUser,
  9242. IN DWORD cbSidUser);
  9243. WINUSERAPI
  9244. BOOL
  9245. WINAPI
  9246. SetDesktopBitmap(
  9247. IN HDESK hdesk,
  9248. IN HBITMAP hbmWallpaper,
  9249. IN DWORD dwStyle);
  9250. WINUSERAPI
  9251. BOOL
  9252. WINAPI
  9253. SetLogonNotifyWindow(
  9254. IN HWND hWndNotify);
  9255. WINUSERAPI
  9256. UINT
  9257. WINAPI
  9258. GetIconId(
  9259. IN HANDLE hRes,
  9260. IN LPSTR lpszType);
  9261. WINUSERAPI
  9262. int
  9263. WINAPI
  9264. CriticalNullCall(
  9265. VOID);
  9266. WINUSERAPI
  9267. int
  9268. WINAPI
  9269. NullCall(
  9270. VOID);
  9271. WINUSERAPI
  9272. VOID
  9273. WINAPI
  9274. UserNotifyConsoleApplication(
  9275. IN DWORD dwProcessId);
  9276. ;begin_internal_501
  9277. WINUSERAPI
  9278. BOOL
  9279. WINAPI
  9280. EnterReaderModeHelper(
  9281. HWND hwnd);
  9282. ;end_internal_501
  9283. /*
  9284. * Reserved console space.
  9285. *
  9286. * This was moved from the console code so that we can localize it
  9287. * in one place. This was necessary for dealing with the background
  9288. * color, which we need to have for the hungapp drawing. These are
  9289. * stored in the extra-window-bytes of each console.
  9290. */
  9291. #define GWL_CONSOLE_WNDALLOC (3 * sizeof(DWORD))
  9292. #define GWL_CONSOLE_PID 0
  9293. #define GWL_CONSOLE_TID 4
  9294. #define GWL_CONSOLE_BKCOLOR 8
  9295. VOID vFontSweep();
  9296. VOID vLoadLocalT1Fonts();
  9297. VOID vLoadRemoteT1Fonts();
  9298. #ifndef NOMSG
  9299. #define TM_INMENUMODE 0x0001 ;internal_NT
  9300. #define TM_POSTCHARBREAKS 0x0002
  9301. WINUSERAPI
  9302. BOOL
  9303. WINAPI
  9304. TranslateMessageEx(
  9305. IN CONST MSG *lpMsg,
  9306. IN UINT flags);
  9307. #endif /* !NOMSG */
  9308. /*
  9309. * Those values can be specified as nAnsiChar for MBToWCSEx
  9310. * USER_AWCONV_COUNTSTRING: Count the length of the string including trailing \0
  9311. * USER_AWCONV_COUNTSTRINGSZ: Count the length of the string excluding trailing \0
  9312. *
  9313. * Note: The result includes trailing \0 if USER_AWCONV_COUNTSTRING is specified.
  9314. * USER_AWCONV_COUNTSTRINGSZ will not null-terminate the restult string. It may return
  9315. * 0 if the source strlen() == 0.
  9316. */
  9317. #define USER_AWCONV_COUNTSTRING (-1)
  9318. #define USER_AWCONV_COUNTSTRINGSZ (-2)
  9319. WINUSERAPI
  9320. int
  9321. WINAPI
  9322. WCSToMBEx(
  9323. IN WORD wCodePage,
  9324. IN LPCWSTR pUnicodeString,
  9325. IN int cbUnicodeChar,
  9326. OUT LPSTR *ppAnsiString,
  9327. IN int nAnsiChar,
  9328. IN BOOL bAllocateMem);
  9329. WINUSERAPI
  9330. int
  9331. WINAPI
  9332. MBToWCSEx(
  9333. IN WORD wCodePage,
  9334. IN LPCSTR pAnsiString,
  9335. IN int nAnsiChar,
  9336. OUT LPWSTR *ppUnicodeString,
  9337. IN int cbUnicodeChar,
  9338. IN BOOL bAllocateMem);
  9339. #define UPUSP_USERLOGGEDON 0x00000001
  9340. #define UPUSP_POLICYCHANGE 0x00000002
  9341. #define UPUSP_REMOTESETTINGS 0x00000004
  9342. #define UPUSP_USERLOGGEDON 0x00000001
  9343. #define UPUSP_POLICYCHANGE 0x00000002
  9344. #define UPUSP_REMOTESETTINGS 0x00000004
  9345. WINUSERAPI
  9346. BOOL
  9347. WINAPI
  9348. UpdatePerUserSystemParameters(
  9349. IN HANDLE hToken,
  9350. IN DWORD dwFlags);
  9351. typedef VOID (APIENTRY *PFNW32ET)(VOID);
  9352. WINUSERAPI
  9353. BOOL
  9354. WINAPI
  9355. RegisterUserHungAppHandlers(
  9356. IN PFNW32ET pfnW32EndTask,
  9357. IN HANDLE hEventWowExec);
  9358. WINUSERAPI
  9359. ATOM
  9360. WINAPI
  9361. RegisterClassWOWA(
  9362. IN PVOID lpWndClass,
  9363. IN LPDWORD pdwWOWstuff);
  9364. WINUSERAPI
  9365. LONG
  9366. WINAPI
  9367. GetClassWOWWords(
  9368. IN HINSTANCE hInstance,
  9369. OUT LPCTSTR pString);
  9370. WINUSERAPI
  9371. DWORD
  9372. WINAPI
  9373. CurrentTaskLock(
  9374. IN DWORD hlck);
  9375. WINUSERAPI
  9376. HDESK
  9377. WINAPI
  9378. GetInputDesktop(
  9379. VOID);
  9380. #define WINDOWED 0
  9381. #define FULLSCREEN 1
  9382. #define GDIFULLSCREEN 2
  9383. #define FULLSCREENMIN 4
  9384. #define WCSToMB(pUnicodeString, cbUnicodeChar, ppAnsiString, nAnsiChar,\
  9385. bAllocateMem)\
  9386. WCSToMBEx(0, pUnicodeString, cbUnicodeChar, ppAnsiString, nAnsiChar, bAllocateMem)
  9387. #define MBToWCS(pAnsiString, nAnsiChar, ppUnicodeString, cbUnicodeChar,\
  9388. bAllocateMem)\
  9389. MBToWCSEx(0, pAnsiString, nAnsiChar, ppUnicodeString, cbUnicodeChar, bAllocateMem)
  9390. #define ID(string) (((ULONG_PTR)string & ~0x0000ffff) == 0)
  9391. /*
  9392. * For setting RIT timers and such. GDI uses this for the cursor-restore
  9393. * timer.
  9394. */
  9395. #define TMRF_READY 0x0001
  9396. #define TMRF_SYSTEM 0x0002
  9397. #define TMRF_RIT 0x0004
  9398. #define TMRF_INIT 0x0008
  9399. #define TMRF_ONESHOT 0x0010
  9400. #define TMRF_WAITING 0x0020
  9401. #define TMRF_PTIWINDOW 0x0040
  9402. /*
  9403. * For GDI SetAbortProc support.
  9404. */
  9405. WINUSERAPI
  9406. int
  9407. WINAPI
  9408. CsDrawText%(
  9409. IN HDC hDC,
  9410. IN LPCTSTR% lpString,
  9411. IN int nCount,
  9412. IN LPRECT lpRect,
  9413. IN UINT uFormat);
  9414. WINUSERAPI
  9415. LONG
  9416. WINAPI
  9417. CsTabbedTextOut%(
  9418. IN HDC hDC,
  9419. IN int X,
  9420. IN int Y,
  9421. IN LPCTSTR% lpString,
  9422. IN int nCount,
  9423. IN int nTabPositions,
  9424. IN LPINT lpnTabStopPositions,
  9425. IN int nTabOrigin);
  9426. WINUSERAPI
  9427. int
  9428. WINAPI
  9429. CsFrameRect(
  9430. IN HDC hDC,
  9431. IN CONST RECT *lprc,
  9432. IN HBRUSH hbr);
  9433. #ifdef UNICODE
  9434. #define CsDrawText CsDrawTextW
  9435. #define CsTabbedTextOut CsTabbedTextOutW
  9436. #else /* !UNICODE */
  9437. #define CsDrawText CsDrawTextA
  9438. #define CsTabbedTextOut CsTabbedTextOutA
  9439. #endif /* !UNICODE */
  9440. /*
  9441. * Custom Cursor action.
  9442. */
  9443. WINUSERAPI
  9444. HCURSOR
  9445. WINAPI
  9446. GetCursorFrameInfo( // Obsolete? - IanJa
  9447. IN HCURSOR hcur,
  9448. OUT LPWSTR id,
  9449. IN int iFrame,
  9450. OUT LPDWORD pjifRate,
  9451. OUT LPINT pccur);
  9452. /*
  9453. * WOW: replace cursor/icon handle
  9454. */
  9455. WINUSERAPI
  9456. BOOL
  9457. WINAPI
  9458. SetCursorContents( IN HCURSOR hCursor, IN HCURSOR hCursorNew);
  9459. #ifdef WX86
  9460. /*
  9461. * Wx86
  9462. * export from wx86.dll to convert an x86 hook proc to risc address.
  9463. */
  9464. typedef
  9465. PVOID
  9466. (*PFNWX86HOOKCALLBACK)(
  9467. SHORT HookType,
  9468. PVOID HookProc
  9469. );
  9470. typedef
  9471. HMODULE
  9472. (*PFNWX86LOADX86DLL)(
  9473. LPCWSTR lpLibFileName,
  9474. DWORD dwFlags
  9475. );
  9476. typedef
  9477. BOOL
  9478. (*PFNWX86FREEX86DLL)(
  9479. HMODULE hMod
  9480. );
  9481. #endif
  9482. typedef struct _TAG {
  9483. DWORD type;
  9484. DWORD style;
  9485. DWORD len;
  9486. } TAG, *PTAG;
  9487. #define MAKETAG(a, b, c, d) (DWORD)(a | (b<<8) | ((DWORD)c<<16) | ((DWORD)d<<24))
  9488. /* Valid TAG types. */
  9489. /* 'ASDF' (CONT) - Advanced Systems Data Format */
  9490. #define TAGT_ASDF MAKETAG('A', 'S', 'D', 'F')
  9491. /* 'RAD ' (CONT) - ?R Animation ?Definition (an aggregate type) */
  9492. #define TAGT_RAD MAKETAG('R', 'A', 'D', ' ')
  9493. /* 'ANIH' (DATA) - ANImation Header */
  9494. /* Contains an ANIHEADER structure. */
  9495. #define TAGT_ANIH MAKETAG('A', 'N', 'I', 'H')
  9496. /*
  9497. * 'RATE' (DATA) - RATE table (array of jiffies)
  9498. * Contains an array of JIFs. Each JIF specifies how long the corresponding
  9499. * animation frame is to be displayed before advancing to the next frame.
  9500. * If the AF_SEQUENCE flag is set then the count of JIFs == anih.cSteps,
  9501. * otherwise the count == anih.cFrames.
  9502. */
  9503. #define TAGT_RATE MAKETAG('R', 'A', 'T', 'E')
  9504. /*
  9505. * 'SEQ ' (DATA) - SEQuence table (array of frame index values)
  9506. * Countains an array of DWORD frame indices. anih.cSteps specifies how
  9507. * many.
  9508. */
  9509. #define TAGT_SEQ MAKETAG('S', 'E', 'Q', ' ')
  9510. /* 'ICON' (DATA) - Windows ICON format image (replaces MPTR) */
  9511. #define TAGT_ICON MAKETAG('I', 'C', 'O', 'N')
  9512. /* 'TITL' (DATA) - TITLe string (can be inside or outside aggregates) */
  9513. /* Contains a single ASCIIZ string that titles the file. */
  9514. #define TAGT_TITL MAKETAG('T', 'I', 'T', 'L')
  9515. /* 'AUTH' (DATA) - AUTHor string (can be inside or outside aggregates) */
  9516. /* Contains a single ASCIIZ string that indicates the author of the file. */
  9517. #define TAGT_AUTH MAKETAG('A', 'U', 'T', 'H')
  9518. #define TAGT_AXOR MAKETAG('A', 'X', 'O', 'R')
  9519. /* Valid TAG styles. */
  9520. /* 'CONT' - CONTainer chunk (contains other DATA and CONT chunks) */
  9521. #define TAGS_CONT MAKETAG('C', 'O', 'N', 'T')
  9522. /* 'DATA' - DATA chunk */
  9523. #define TAGS_DATA MAKETAG('D', 'A', 'T', 'A')
  9524. typedef DWORD JIF, *PJIF;
  9525. typedef struct _ANIHEADER { /* anih */
  9526. DWORD cbSizeof;
  9527. DWORD cFrames;
  9528. DWORD cSteps;
  9529. DWORD cx, cy;
  9530. DWORD cBitCount, cPlanes;
  9531. JIF jifRate;
  9532. DWORD fl;
  9533. } ANIHEADER, *PANIHEADER;
  9534. /* If the AF_ICON flag is specified the fields cx, cy, cBitCount, and */
  9535. /* cPlanes are all unused. Each frame will be of type ICON and will */
  9536. /* contain its own dimensional information. */
  9537. #define AF_ICON 0x0001L /* Windows format icon/cursor animation */
  9538. #define AF_SEQUENCE 0x0002L /* Animation is sequenced */
  9539. ;end_internal_NT
  9540. ;begin_winver_500
  9541. /*
  9542. * Multimonitor API.
  9543. */
  9544. #define MONITOR_DEFAULTTONULL 0x00000000
  9545. #define MONITOR_DEFAULTTOPRIMARY 0x00000001
  9546. #define MONITOR_DEFAULTTONEAREST 0x00000002
  9547. WINUSERAPI
  9548. HMONITOR
  9549. WINAPI
  9550. MonitorFromPoint(
  9551. IN POINT pt,
  9552. IN DWORD dwFlags);
  9553. WINUSERAPI
  9554. HMONITOR
  9555. WINAPI
  9556. MonitorFromRect(
  9557. IN LPCRECT lprc,
  9558. IN DWORD dwFlags);
  9559. WINUSERAPI
  9560. HMONITOR
  9561. WINAPI
  9562. MonitorFromWindow( IN HWND hwnd, IN DWORD dwFlags);
  9563. #define MONITORINFOF_PRIMARY 0x00000001
  9564. #ifndef CCHDEVICENAME
  9565. #define CCHDEVICENAME 32
  9566. #endif
  9567. typedef struct tagMONITORINFO
  9568. {
  9569. DWORD cbSize;
  9570. RECT rcMonitor;
  9571. RECT rcWork;
  9572. DWORD dwFlags;
  9573. } MONITORINFO, *LPMONITORINFO;
  9574. #ifdef __cplusplus
  9575. typedef struct tagMONITORINFOEX% : public tagMONITORINFO
  9576. {
  9577. TCHAR% szDevice[CCHDEVICENAME];
  9578. } MONITORINFOEX%, *LPMONITORINFOEX%;
  9579. #else // ndef __cplusplus
  9580. typedef struct tagMONITORINFOEX%
  9581. {
  9582. MONITORINFO;
  9583. TCHAR% szDevice[CCHDEVICENAME];
  9584. } MONITORINFOEX%, *LPMONITORINFOEX%;
  9585. #endif
  9586. WINUSERAPI BOOL WINAPI GetMonitorInfo%( IN HMONITOR hMonitor, OUT LPMONITORINFO lpmi);
  9587. typedef BOOL (CALLBACK* MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM);
  9588. WINUSERAPI
  9589. BOOL
  9590. WINAPI
  9591. EnumDisplayMonitors(
  9592. IN HDC hdc,
  9593. IN LPCRECT lprcClip,
  9594. IN MONITORENUMPROC lpfnEnum,
  9595. IN LPARAM dwData);
  9596. #ifndef NOWINABLE
  9597. /*
  9598. * WinEvents - Active Accessibility hooks
  9599. */
  9600. WINUSERAPI
  9601. VOID
  9602. WINAPI
  9603. NotifyWinEvent(
  9604. IN DWORD event,
  9605. IN HWND hwnd,
  9606. IN LONG idObject,
  9607. IN LONG idChild);
  9608. typedef VOID (CALLBACK* WINEVENTPROC)(
  9609. HWINEVENTHOOK hWinEventHook,
  9610. DWORD event,
  9611. HWND hwnd,
  9612. LONG idObject,
  9613. LONG idChild,
  9614. DWORD idEventThread,
  9615. DWORD dwmsEventTime);
  9616. WINUSERAPI
  9617. HWINEVENTHOOK
  9618. WINAPI
  9619. SetWinEventHook(
  9620. IN DWORD eventMin,
  9621. IN DWORD eventMax,
  9622. IN HMODULE hmodWinEventProc,
  9623. IN WINEVENTPROC pfnWinEventProc,
  9624. IN DWORD idProcess,
  9625. IN DWORD idThread,
  9626. IN DWORD dwFlags);
  9627. ;begin_if_(_WIN32_WINNT)_501
  9628. WINUSERAPI
  9629. BOOL
  9630. WINAPI
  9631. IsWinEventHookInstalled(
  9632. IN DWORD event);
  9633. ;end_if_(_WIN32_WINNT)_501
  9634. /*
  9635. * dwFlags for SetWinEventHook
  9636. */
  9637. #define WINEVENT_OUTOFCONTEXT 0x0000 // Events are ASYNC
  9638. #define WINEVENT_SKIPOWNTHREAD 0x0001 // Don't call back for events on installer's thread
  9639. #define WINEVENT_SKIPOWNPROCESS 0x0002 // Don't call back for events on installer's process
  9640. #define WINEVENT_INCONTEXT 0x0004 // Events are SYNC, this causes your dll to be injected into every process
  9641. #define WINEVENT_32BITCALLER 0x8000 // - unused in NT ;Internal
  9642. #define WINEVENT_VALID 0x0007 // ;Internal
  9643. WINUSERAPI
  9644. BOOL
  9645. WINAPI
  9646. UnhookWinEvent(
  9647. IN HWINEVENTHOOK hWinEventHook);
  9648. /*
  9649. * idObject values for WinEventProc and NotifyWinEvent
  9650. */
  9651. /*
  9652. * hwnd + idObject can be used with OLEACC.DLL's OleGetObjectFromWindow()
  9653. * to get an interface pointer to the container. indexChild is the item
  9654. * within the container in question. Setup a VARIANT with vt VT_I4 and
  9655. * lVal the indexChild and pass that in to all methods. Then you
  9656. * are raring to go.
  9657. */
  9658. /*
  9659. * Common object IDs (cookies, only for sending WM_GETOBJECT to get at the
  9660. * thing in question). Positive IDs are reserved for apps (app specific),
  9661. * negative IDs are system things and are global, 0 means "just little old
  9662. * me".
  9663. */
  9664. #define CHILDID_SELF 0
  9665. #define INDEXID_OBJECT 0
  9666. #define INDEXID_CONTAINER 0
  9667. /*
  9668. * Reserved IDs for system objects
  9669. */
  9670. #define OBJID_WINDOW ((LONG)0x00000000)
  9671. #define OBJID_SYSMENU ((LONG)0xFFFFFFFF)
  9672. #define OBJID_TITLEBAR ((LONG)0xFFFFFFFE)
  9673. #define OBJID_MENU ((LONG)0xFFFFFFFD)
  9674. #define OBJID_CLIENT ((LONG)0xFFFFFFFC)
  9675. #define OBJID_VSCROLL ((LONG)0xFFFFFFFB)
  9676. #define OBJID_HSCROLL ((LONG)0xFFFFFFFA)
  9677. #define OBJID_SIZEGRIP ((LONG)0xFFFFFFF9)
  9678. #define OBJID_CARET ((LONG)0xFFFFFFF8)
  9679. #define OBJID_CURSOR ((LONG)0xFFFFFFF7)
  9680. #define OBJID_ALERT ((LONG)0xFFFFFFF6)
  9681. #define OBJID_SOUND ((LONG)0xFFFFFFF5)
  9682. #define OBJID_QUERYCLASSNAMEIDX ((LONG)0xFFFFFFF4)
  9683. #define OBJID_NATIVEOM ((LONG)0xFFFFFFF0)
  9684. /*
  9685. * EVENT DEFINITION
  9686. */
  9687. #define EVENT_MIN 0x00000001
  9688. #define EVENT_MAX 0x7FFFFFFF
  9689. /*
  9690. * EVENT_SYSTEM_SOUND
  9691. * Sent when a sound is played. Currently nothing is generating this, we
  9692. * this event when a system sound (for menus, etc) is played. Apps
  9693. * generate this, if accessible, when a private sound is played. For
  9694. * example, if Mail plays a "New Mail" sound.
  9695. *
  9696. * System Sounds:
  9697. * (Generated by PlaySoundEvent in USER itself)
  9698. * hwnd is NULL
  9699. * idObject is OBJID_SOUND
  9700. * idChild is sound child ID if one
  9701. * App Sounds:
  9702. * (PlaySoundEvent won't generate notification; up to app)
  9703. * hwnd + idObject gets interface pointer to Sound object
  9704. * idChild identifies the sound in question
  9705. * are going to be cleaning up the SOUNDSENTRY feature in the control panel
  9706. * and will use this at that time. Applications implementing WinEvents
  9707. * are perfectly welcome to use it. Clients of IAccessible* will simply
  9708. * turn around and get back a non-visual object that describes the sound.
  9709. */
  9710. #define EVENT_SYSTEM_SOUND 0x0001
  9711. /*
  9712. * EVENT_SYSTEM_ALERT
  9713. * System Alerts:
  9714. * (Generated by MessageBox() calls for example)
  9715. * hwnd is hwndMessageBox
  9716. * idObject is OBJID_ALERT
  9717. * App Alerts:
  9718. * (Generated whenever)
  9719. * hwnd+idObject gets interface pointer to Alert
  9720. */
  9721. #define EVENT_SYSTEM_ALERT 0x0002
  9722. /*
  9723. * EVENT_SYSTEM_FOREGROUND
  9724. * Sent when the foreground (active) window changes, even if it is changing
  9725. * to another window in the same thread as the previous one.
  9726. * hwnd is hwndNewForeground
  9727. * idObject is OBJID_WINDOW
  9728. * idChild is INDEXID_OBJECT
  9729. */
  9730. #define EVENT_SYSTEM_FOREGROUND 0x0003
  9731. /*
  9732. * Menu
  9733. * hwnd is window (top level window or popup menu window)
  9734. * idObject is ID of control (OBJID_MENU, OBJID_SYSMENU, OBJID_SELF for popup)
  9735. * idChild is CHILDID_SELF
  9736. *
  9737. * EVENT_SYSTEM_MENUSTART
  9738. * EVENT_SYSTEM_MENUEND
  9739. * For MENUSTART, hwnd+idObject+idChild refers to the control with the menu bar,
  9740. * or the control bringing up the context menu.
  9741. *
  9742. * Sent when entering into and leaving from menu mode (system, app bar, and
  9743. * track popups).
  9744. */
  9745. #define EVENT_SYSTEM_MENUSTART 0x0004
  9746. #define EVENT_SYSTEM_MENUEND 0x0005
  9747. /*
  9748. * EVENT_SYSTEM_MENUPOPUPSTART
  9749. * EVENT_SYSTEM_MENUPOPUPEND
  9750. * Sent when a menu popup comes up and just before it is taken down. Note
  9751. * that for a call to TrackPopupMenu(), a client will see EVENT_SYSTEM_MENUSTART
  9752. * followed almost immediately by EVENT_SYSTEM_MENUPOPUPSTART for the popup
  9753. * being shown.
  9754. *
  9755. * For MENUPOPUP, hwnd+idObject+idChild refers to the NEW popup coming up, not the
  9756. * parent item which is hierarchical. You can get the parent menu/popup by
  9757. * asking for the accParent object.
  9758. */
  9759. #define EVENT_SYSTEM_MENUPOPUPSTART 0x0006
  9760. #define EVENT_SYSTEM_MENUPOPUPEND 0x0007
  9761. /*
  9762. * EVENT_SYSTEM_CAPTURESTART
  9763. * EVENT_SYSTEM_CAPTUREEND
  9764. * Sent when a window takes the capture and releases the capture.
  9765. */
  9766. #define EVENT_SYSTEM_CAPTURESTART 0x0008
  9767. #define EVENT_SYSTEM_CAPTUREEND 0x0009
  9768. /*
  9769. * Move Size
  9770. * EVENT_SYSTEM_MOVESIZESTART
  9771. * EVENT_SYSTEM_MOVESIZEEND
  9772. * Sent when a window enters and leaves move-size dragging mode.
  9773. */
  9774. #define EVENT_SYSTEM_MOVESIZESTART 0x000A
  9775. #define EVENT_SYSTEM_MOVESIZEEND 0x000B
  9776. /*
  9777. * Context Help
  9778. * EVENT_SYSTEM_CONTEXTHELPSTART
  9779. * EVENT_SYSTEM_CONTEXTHELPEND
  9780. * Sent when a window enters and leaves context sensitive help mode.
  9781. */
  9782. #define EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
  9783. #define EVENT_SYSTEM_CONTEXTHELPEND 0x000D
  9784. /*
  9785. * Drag & Drop
  9786. * EVENT_SYSTEM_DRAGDROPSTART
  9787. * EVENT_SYSTEM_DRAGDROPEND
  9788. * Send the START notification just before going into drag&drop loop. Send
  9789. * the END notification just after canceling out.
  9790. * Note that it is up to apps and OLE to generate this, since the system
  9791. * doesn't know. Like EVENT_SYSTEM_SOUND, it will be a while before this
  9792. * is prevalent.
  9793. */
  9794. #define EVENT_SYSTEM_DRAGDROPSTART 0x000E
  9795. #define EVENT_SYSTEM_DRAGDROPEND 0x000F
  9796. /*
  9797. * Dialog
  9798. * Send the START notification right after the dialog is completely
  9799. * initialized and visible. Send the END right before the dialog
  9800. * is hidden and goes away.
  9801. * EVENT_SYSTEM_DIALOGSTART
  9802. * EVENT_SYSTEM_DIALOGEND
  9803. */
  9804. #define EVENT_SYSTEM_DIALOGSTART 0x0010
  9805. #define EVENT_SYSTEM_DIALOGEND 0x0011
  9806. /*
  9807. * EVENT_SYSTEM_SCROLLING
  9808. * EVENT_SYSTEM_SCROLLINGSTART
  9809. * EVENT_SYSTEM_SCROLLINGEND
  9810. * Sent when beginning and ending the tracking of a scrollbar in a window,
  9811. * and also for scrollbar controls.
  9812. */
  9813. #define EVENT_SYSTEM_SCROLLINGSTART 0x0012
  9814. #define EVENT_SYSTEM_SCROLLINGEND 0x0013
  9815. /*
  9816. * Alt-Tab Window
  9817. * Send the START notification right after the switch window is initialized
  9818. * and visible. Send the END right before it is hidden and goes away.
  9819. * EVENT_SYSTEM_SWITCHSTART
  9820. * EVENT_SYSTEM_SWITCHEND
  9821. */
  9822. #define EVENT_SYSTEM_SWITCHSTART 0x0014
  9823. #define EVENT_SYSTEM_SWITCHEND 0x0015
  9824. /*
  9825. * EVENT_SYSTEM_MINIMIZESTART
  9826. * EVENT_SYSTEM_MINIMIZEEND
  9827. * Sent when a window minimizes and just before it restores.
  9828. */
  9829. #define EVENT_SYSTEM_MINIMIZESTART 0x0016
  9830. #define EVENT_SYSTEM_MINIMIZEEND 0x0017
  9831. ;begin_internal_501
  9832. #ifdef REDIRECTION
  9833. #define EVENT_SYSTEM_REDIRECTEDPAINT 0x0018
  9834. #endif // REDIRECTION
  9835. ;end_internal_501
  9836. ;begin_if_(_WIN32_WINNT)_501
  9837. #define EVENT_CONSOLE_CARET 0x4001
  9838. #define EVENT_CONSOLE_UPDATE_REGION 0x4002
  9839. #define EVENT_CONSOLE_UPDATE_SIMPLE 0x4003
  9840. #define EVENT_CONSOLE_UPDATE_SCROLL 0x4004
  9841. #define EVENT_CONSOLE_LAYOUT 0x4005
  9842. #define EVENT_CONSOLE_START_APPLICATION 0x4006
  9843. #define EVENT_CONSOLE_END_APPLICATION 0x4007
  9844. /*
  9845. * Flags for EVENT_CONSOLE_START/END_APPLICATION.
  9846. */
  9847. #define CONSOLE_APPLICATION_16BIT 0x0001
  9848. /*
  9849. * Flags for EVENT_CONSOLE_CARET
  9850. */
  9851. #define CONSOLE_CARET_SELECTION 0x0001
  9852. #define CONSOLE_CARET_VISIBLE 0x0002
  9853. ;end_if_(_WIN32_WINNT)_501
  9854. /*
  9855. * Object events
  9856. *
  9857. * The system AND apps generate these. The system generates these for
  9858. * real windows. Apps generate these for objects within their window which
  9859. * act like a separate control, e.g. an item in a list view.
  9860. *
  9861. * When the system generate them, dwParam2 is always WMOBJID_SELF. When
  9862. * apps generate them, apps put the has-meaning-to-the-app-only ID value
  9863. * in dwParam2.
  9864. * For all events, if you want detailed accessibility information, callers
  9865. * should
  9866. * * Call AccessibleObjectFromWindow() with the hwnd, idObject parameters
  9867. * of the event, and IID_IAccessible as the REFIID, to get back an
  9868. * IAccessible* to talk to
  9869. * * Initialize and fill in a VARIANT as VT_I4 with lVal the idChild
  9870. * parameter of the event.
  9871. * * If idChild isn't zero, call get_accChild() in the container to see
  9872. * if the child is an object in its own right. If so, you will get
  9873. * back an IDispatch* object for the child. You should release the
  9874. * parent, and call QueryInterface() on the child object to get its
  9875. * IAccessible*. Then you talk directly to the child. Otherwise,
  9876. * if get_accChild() returns you nothing, you should continue to
  9877. * use the child VARIANT. You will ask the container for the properties
  9878. * of the child identified by the VARIANT. In other words, the
  9879. * child in this case is accessible but not a full-blown object.
  9880. * Like a button on a titlebar which is 'small' and has no children.
  9881. */
  9882. /*
  9883. * For all EVENT_OBJECT events,
  9884. * hwnd is the dude to Send the WM_GETOBJECT message to (unless NULL,
  9885. * see above for system things)
  9886. * idObject is the ID of the object that can resolve any queries a
  9887. * client might have. It's a way to deal with windowless controls,
  9888. * controls that are just drawn on the screen in some larger parent
  9889. * window (like SDM), or standard frame elements of a window.
  9890. * idChild is the piece inside of the object that is affected. This
  9891. * allows clients to access things that are too small to have full
  9892. * blown objects in their own right. Like the thumb of a scrollbar.
  9893. * The hwnd/idObject pair gets you to the container, the dude you
  9894. * probably want to talk to most of the time anyway. The idChild
  9895. * can then be passed into the acc properties to get the name/value
  9896. * of it as needed.
  9897. *
  9898. * Example #1:
  9899. * System propagating a listbox selection change
  9900. * EVENT_OBJECT_SELECTION
  9901. * hwnd == listbox hwnd
  9902. * idObject == OBJID_WINDOW
  9903. * idChild == new selected item, or CHILDID_SELF if
  9904. * nothing now selected within container.
  9905. * Word '97 propagating a listbox selection change
  9906. * hwnd == SDM window
  9907. * idObject == SDM ID to get at listbox 'control'
  9908. * idChild == new selected item, or CHILDID_SELF if
  9909. * nothing
  9910. *
  9911. * Example #2:
  9912. * System propagating a menu item selection on the menu bar
  9913. * EVENT_OBJECT_SELECTION
  9914. * hwnd == top level window
  9915. * idObject == OBJID_MENU
  9916. * idChild == ID of child menu bar item selected
  9917. *
  9918. * Example #3:
  9919. * System propagating a dropdown coming off of said menu bar item
  9920. * EVENT_OBJECT_CREATE
  9921. * hwnd == popup item
  9922. * idObject == OBJID_WINDOW
  9923. * idChild == CHILDID_SELF
  9924. *
  9925. * Example #4:
  9926. *
  9927. * For EVENT_OBJECT_REORDER, the object referred to by hwnd/idObject is the
  9928. * PARENT container in which the zorder is occurring. This is because if
  9929. * one child is zordering, all of them are changing their relative zorder.
  9930. */
  9931. #define EVENT_OBJECT_CREATE 0x8000 // hwnd + ID + idChild is created item
  9932. #define EVENT_OBJECT_DESTROY 0x8001 // hwnd + ID + idChild is destroyed item
  9933. #define EVENT_OBJECT_SHOW 0x8002 // hwnd + ID + idChild is shown item
  9934. #define EVENT_OBJECT_HIDE 0x8003 // hwnd + ID + idChild is hidden item
  9935. #define EVENT_OBJECT_REORDER 0x8004 // hwnd + ID + idChild is parent of zordering children
  9936. /*
  9937. * NOTE:
  9938. * Minimize the number of notifications!
  9939. *
  9940. * When you are hiding a parent object, obviously all child objects are no
  9941. * longer visible on screen. They still have the same "visible" status,
  9942. * but are not truly visible. Hence do not send HIDE notifications for the
  9943. * children also. One implies all. The same goes for SHOW.
  9944. */
  9945. #define EVENT_OBJECT_FOCUS 0x8005 // hwnd + ID + idChild is focused item
  9946. #define EVENT_OBJECT_SELECTION 0x8006 // hwnd + ID + idChild is selected item (if only one), or idChild is OBJID_WINDOW if complex
  9947. #define EVENT_OBJECT_SELECTIONADD 0x8007 // hwnd + ID + idChild is item added
  9948. #define EVENT_OBJECT_SELECTIONREMOVE 0x8008 // hwnd + ID + idChild is item removed
  9949. #define EVENT_OBJECT_SELECTIONWITHIN 0x8009 // hwnd + ID + idChild is parent of changed selected items
  9950. /*
  9951. * NOTES:
  9952. * There is only one "focused" child item in a parent. This is the place
  9953. * keystrokes are going at a given moment. Hence only send a notification
  9954. * about where the NEW focus is going. A NEW item getting the focus already
  9955. * implies that the OLD item is losing it.
  9956. *
  9957. * SELECTION however can be multiple. Hence the different SELECTION
  9958. * notifications. Here's when to use each:
  9959. *
  9960. * (1) Send a SELECTION notification in the simple single selection
  9961. * case (like the focus) when the item with the selection is
  9962. * merely moving to a different item within a container. hwnd + ID
  9963. * is the container control, idChildItem is the new child with the
  9964. * selection.
  9965. *
  9966. * (2) Send a SELECTIONADD notification when a new item has simply been added
  9967. * to the selection within a container. This is appropriate when the
  9968. * number of newly selected items is very small. hwnd + ID is the
  9969. * container control, idChildItem is the new child added to the selection.
  9970. *
  9971. * (3) Send a SELECTIONREMOVE notification when a new item has simply been
  9972. * removed from the selection within a container. This is appropriate
  9973. * when the number of newly selected items is very small, just like
  9974. * SELECTIONADD. hwnd + ID is the container control, idChildItem is the
  9975. * new child removed from the selection.
  9976. *
  9977. * (4) Send a SELECTIONWITHIN notification when the selected items within a
  9978. * control have changed substantially. Rather than propagate a large
  9979. * number of changes to reflect removal for some items, addition of
  9980. * others, just tell somebody who cares that a lot happened. It will
  9981. * be faster an easier for somebody watching to just turn around and
  9982. * query the container control what the new bunch of selected items
  9983. * are.
  9984. */
  9985. #define EVENT_OBJECT_STATECHANGE 0x800A // hwnd + ID + idChild is item w/ state change
  9986. /*
  9987. * Examples of when to send an EVENT_OBJECT_STATECHANGE include
  9988. * * It is being enabled/disabled (USER does for windows)
  9989. * * It is being pressed/released (USER does for buttons)
  9990. * * It is being checked/unchecked (USER does for radio/check buttons)
  9991. */
  9992. #define EVENT_OBJECT_LOCATIONCHANGE 0x800B // hwnd + ID + idChild is moved/sized item
  9993. /*
  9994. * Note:
  9995. * A LOCATIONCHANGE is not sent for every child object when the parent
  9996. * changes shape/moves. Send one notification for the topmost object
  9997. * that is changing. For example, if the user resizes a top level window,
  9998. * USER will generate a LOCATIONCHANGE for it, but not for the menu bar,
  9999. * title bar, scrollbars, etc. that are also changing shape/moving.
  10000. *
  10001. * In other words, it only generates LOCATIONCHANGE notifications for
  10002. * real windows that are moving/sizing. It will not generate a LOCATIONCHANGE
  10003. * for every non-floating child window when the parent moves (the children are
  10004. * logically moving also on screen, but not relative to the parent).
  10005. *
  10006. * Now, if the app itself resizes child windows as a result of being
  10007. * sized, USER will generate LOCATIONCHANGEs for those dudes also because
  10008. * it doesn't know better.
  10009. *
  10010. * Note also that USER will generate LOCATIONCHANGE notifications for two
  10011. * non-window sys objects:
  10012. * (1) System caret
  10013. * (2) Cursor
  10014. */
  10015. #define EVENT_OBJECT_NAMECHANGE 0x800C // hwnd + ID + idChild is item w/ name change
  10016. #define EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D // hwnd + ID + idChild is item w/ desc change
  10017. #define EVENT_OBJECT_VALUECHANGE 0x800E // hwnd + ID + idChild is item w/ value change
  10018. #define EVENT_OBJECT_PARENTCHANGE 0x800F // hwnd + ID + idChild is item w/ new parent
  10019. #define EVENT_OBJECT_HELPCHANGE 0x8010 // hwnd + ID + idChild is item w/ help change
  10020. #define EVENT_OBJECT_DEFACTIONCHANGE 0x8011 // hwnd + ID + idChild is item w/ def action change
  10021. #define EVENT_OBJECT_ACCELERATORCHANGE 0x8012 // hwnd + ID + idChild is item w/ keybd accel change
  10022. /*
  10023. * Child IDs
  10024. */
  10025. /*
  10026. * System Sounds (idChild of system SOUND notification)
  10027. */
  10028. #define SOUND_SYSTEM_STARTUP 1
  10029. #define SOUND_SYSTEM_SHUTDOWN 2
  10030. #define SOUND_SYSTEM_BEEP 3
  10031. #define SOUND_SYSTEM_ERROR 4
  10032. #define SOUND_SYSTEM_QUESTION 5
  10033. #define SOUND_SYSTEM_WARNING 6
  10034. #define SOUND_SYSTEM_INFORMATION 7
  10035. #define SOUND_SYSTEM_MAXIMIZE 8
  10036. #define SOUND_SYSTEM_MINIMIZE 9
  10037. #define SOUND_SYSTEM_RESTOREUP 10
  10038. #define SOUND_SYSTEM_RESTOREDOWN 11
  10039. #define SOUND_SYSTEM_APPSTART 12
  10040. #define SOUND_SYSTEM_FAULT 13
  10041. #define SOUND_SYSTEM_APPEND 14
  10042. #define SOUND_SYSTEM_MENUCOMMAND 15
  10043. #define SOUND_SYSTEM_MENUPOPUP 16
  10044. #define CSOUND_SYSTEM 16
  10045. /*
  10046. * System Alerts (indexChild of system ALERT notification)
  10047. */
  10048. #define ALERT_SYSTEM_INFORMATIONAL 1 // MB_INFORMATION
  10049. #define ALERT_SYSTEM_WARNING 2 // MB_WARNING
  10050. #define ALERT_SYSTEM_ERROR 3 // MB_ERROR
  10051. #define ALERT_SYSTEM_QUERY 4 // MB_QUESTION
  10052. #define ALERT_SYSTEM_CRITICAL 5 // HardSysErrBox
  10053. #define CALERT_SYSTEM 6
  10054. typedef struct tagGUITHREADINFO
  10055. {
  10056. DWORD cbSize;
  10057. DWORD flags;
  10058. HWND hwndActive;
  10059. HWND hwndFocus;
  10060. HWND hwndCapture;
  10061. HWND hwndMenuOwner;
  10062. HWND hwndMoveSize;
  10063. HWND hwndCaret;
  10064. RECT rcCaret;
  10065. } GUITHREADINFO, *PGUITHREADINFO, FAR * LPGUITHREADINFO;
  10066. #define GUI_CARETBLINKING 0x00000001
  10067. #define GUI_INMOVESIZE 0x00000002
  10068. #define GUI_INMENUMODE 0x00000004
  10069. #define GUI_SYSTEMMENUMODE 0x00000008
  10070. #define GUI_POPUPMENUMODE 0x00000010
  10071. ;begin_if_(_WIN32_WINNT)_501
  10072. #define GUI_16BITTASK 0x00000020
  10073. ;end_if_(_WIN32_WINNT)_501
  10074. WINUSERAPI
  10075. BOOL
  10076. WINAPI
  10077. GetGUIThreadInfo(
  10078. IN DWORD idThread,
  10079. OUT PGUITHREADINFO pgui);
  10080. ;begin_internal
  10081. WINUSERAPI
  10082. BOOL
  10083. WINAPI
  10084. IsProcess16Bit(
  10085. VOID);
  10086. ;end_internal
  10087. WINUSERAPI
  10088. UINT
  10089. WINAPI
  10090. GetWindowModuleFileName%(
  10091. IN HWND hwnd,
  10092. OUT LPTSTR% pszFileName,
  10093. IN UINT cchFileNameMax);
  10094. // Output from DISPID_ACC_STATE (IanJa: taken from oleacc.h) ;internal_NT
  10095. #ifndef NO_STATE_FLAGS
  10096. #define STATE_SYSTEM_UNAVAILABLE 0x00000001 // Disabled
  10097. #define STATE_SYSTEM_SELECTED 0x00000002
  10098. #define STATE_SYSTEM_FOCUSED 0x00000004
  10099. #define STATE_SYSTEM_PRESSED 0x00000008
  10100. #define STATE_SYSTEM_CHECKED 0x00000010
  10101. #define STATE_SYSTEM_MIXED 0x00000020 // 3-state checkbox or toolbar button
  10102. #define STATE_SYSTEM_INDETERMINATE STATE_SYSTEM_MIXED
  10103. #define STATE_SYSTEM_READONLY 0x00000040
  10104. #define STATE_SYSTEM_HOTTRACKED 0x00000080
  10105. #define STATE_SYSTEM_DEFAULT 0x00000100
  10106. #define STATE_SYSTEM_EXPANDED 0x00000200
  10107. #define STATE_SYSTEM_COLLAPSED 0x00000400
  10108. #define STATE_SYSTEM_BUSY 0x00000800
  10109. #define STATE_SYSTEM_FLOATING 0x00001000 // Children "owned" not "contained" by parent
  10110. #define STATE_SYSTEM_MARQUEED 0x00002000
  10111. #define STATE_SYSTEM_ANIMATED 0x00004000
  10112. #define STATE_SYSTEM_INVISIBLE 0x00008000
  10113. #define STATE_SYSTEM_OFFSCREEN 0x00010000
  10114. #define STATE_SYSTEM_SIZEABLE 0x00020000
  10115. #define STATE_SYSTEM_MOVEABLE 0x00040000
  10116. #define STATE_SYSTEM_SELFVOICING 0x00080000
  10117. #define STATE_SYSTEM_FOCUSABLE 0x00100000
  10118. #define STATE_SYSTEM_SELECTABLE 0x00200000
  10119. #define STATE_SYSTEM_LINKED 0x00400000
  10120. #define STATE_SYSTEM_TRAVERSED 0x00800000
  10121. #define STATE_SYSTEM_MULTISELECTABLE 0x01000000 // Supports multiple selection
  10122. #define STATE_SYSTEM_EXTSELECTABLE 0x02000000 // Supports extended selection
  10123. #define STATE_SYSTEM_ALERT_LOW 0x04000000 // This information is of low priority
  10124. #define STATE_SYSTEM_ALERT_MEDIUM 0x08000000 // This information is of medium priority
  10125. #define STATE_SYSTEM_ALERT_HIGH 0x10000000 // This information is of high priority
  10126. #define STATE_SYSTEM_PROTECTED 0x20000000 // access to this is restricted
  10127. #define STATE_SYSTEM_VALID 0x3FFFFFFF
  10128. #endif
  10129. ;begin_internal
  10130. /*
  10131. * CONSTANTS
  10132. */
  10133. /*
  10134. * Object constants (these are NOT public). OBJID are public IDs for
  10135. * standard frame elements. But the indeces for their elements are not.
  10136. */
  10137. // TITLEBAR
  10138. #define INDEX_TITLEBAR_SELF 0
  10139. #define INDEX_TITLEBAR_IMEBUTTON 1
  10140. #define INDEX_TITLEBAR_MINBUTTON 2
  10141. #define INDEX_TITLEBAR_MAXBUTTON 3
  10142. #define INDEX_TITLEBAR_HELPBUTTON 4
  10143. #define INDEX_TITLEBAR_CLOSEBUTTON 5
  10144. #define INDEX_TITLEBAR_MIC 1
  10145. #define INDEX_TITLEBAR_MAC 5
  10146. ;end_internal
  10147. #define CCHILDREN_TITLEBAR 5
  10148. ;begin_internal
  10149. #define INDEX_TITLEBAR_RESTOREBUTTON 6 // The min/max buttons turn into this
  10150. // SCROLLBAR
  10151. #define INDEX_SCROLLBAR_SELF 0
  10152. #define INDEX_SCROLLBAR_UP 1
  10153. #define INDEX_SCROLLBAR_UPPAGE 2
  10154. #define INDEX_SCROLLBAR_THUMB 3
  10155. #define INDEX_SCROLLBAR_DOWNPAGE 4
  10156. #define INDEX_SCROLLBAR_DOWN 5
  10157. #define INDEX_SCROLLBAR_MIC 1
  10158. #define INDEX_SCROLLBAR_MAC 5
  10159. ;end_internal
  10160. #define CCHILDREN_SCROLLBAR 5
  10161. ;begin_internal
  10162. #define INDEX_SCROLLBAR_LEFT 7
  10163. #define INDEX_SCROLLBAR_LEFTPAGE 8
  10164. #define INDEX_SCROLLBAR_HORZTHUMB 9
  10165. #define INDEX_SCROLLBAR_RIGHTPAGE 10
  10166. #define INDEX_SCROLLBAR_RIGHT 11
  10167. #define INDEX_SCROLLBAR_HORIZONTAL 6
  10168. #define INDEX_SCROLLBAR_GRIP 12
  10169. // COMBOBOXES
  10170. #define INDEX_COMBOBOX 0
  10171. #define INDEX_COMBOBOX_ITEM 1
  10172. #define INDEX_COMBOBOX_BUTTON 2
  10173. #define INDEX_COMBOBOX_LIST 3
  10174. #define CCHILDREN_COMBOBOX 3
  10175. #define CBLISTBOXID 1000
  10176. #define CBEDITID 1001
  10177. #define CBBUTTONID 1002
  10178. // CURSORS
  10179. #define CURSOR_SYSTEM_NOTHING -1
  10180. #define CURSOR_SYSTEM_UNKNOWN 0
  10181. #define CURSOR_SYSTEM_ARROW 1
  10182. #define CURSOR_SYSTEM_IBEAM 2
  10183. #define CURSOR_SYSTEM_WAIT 3
  10184. #define CURSOR_SYSTEM_CROSS 4
  10185. #define CURSOR_SYSTEM_UPARROW 5
  10186. #define CURSOR_SYSTEM_SIZENWSE 6
  10187. #define CURSOR_SYSTEM_SIZENESW 7
  10188. #define CURSOR_SYSTEM_SIZEWE 8
  10189. #define CURSOR_SYSTEM_SIZENS 9
  10190. #define CURSOR_SYSTEM_SIZEALL 10
  10191. #define CURSOR_SYSTEM_NO 11
  10192. #define CURSOR_SYSTEM_APPSTARTING 12
  10193. #define CURSOR_SYSTEM_HELP 13
  10194. #define CURSOR_SYSTEM_NWPEN 14
  10195. #define CURSOR_SYSTEM_HAND 15
  10196. #define CCURSOR_SYSTEM 15
  10197. ;end_internal
  10198. /*
  10199. * Information about the global cursor.
  10200. */
  10201. typedef struct tagCURSORINFO
  10202. {
  10203. DWORD cbSize;
  10204. DWORD flags;
  10205. HCURSOR hCursor;
  10206. POINT ptScreenPos;
  10207. } CURSORINFO, *PCURSORINFO, *LPCURSORINFO;
  10208. #define CURSOR_SHOWING 0x00000001
  10209. WINUSERAPI
  10210. BOOL
  10211. WINAPI
  10212. GetCursorInfo(
  10213. OUT PCURSORINFO pci
  10214. );
  10215. /*
  10216. * Window information snapshot
  10217. */
  10218. typedef struct tagWINDOWINFO
  10219. {
  10220. DWORD cbSize;
  10221. RECT rcWindow;
  10222. RECT rcClient;
  10223. DWORD dwStyle;
  10224. DWORD dwExStyle;
  10225. DWORD dwWindowStatus;
  10226. UINT cxWindowBorders;
  10227. UINT cyWindowBorders;
  10228. ATOM atomWindowType;
  10229. WORD wCreatorVersion;
  10230. } WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
  10231. #define WS_ACTIVECAPTION 0x0001
  10232. WINUSERAPI
  10233. BOOL
  10234. WINAPI
  10235. GetWindowInfo(
  10236. IN HWND hwnd,
  10237. OUT PWINDOWINFO pwi
  10238. );
  10239. /*
  10240. * Titlebar information.
  10241. */
  10242. typedef struct tagTITLEBARINFO
  10243. {
  10244. DWORD cbSize;
  10245. RECT rcTitleBar;
  10246. DWORD rgstate[CCHILDREN_TITLEBAR+1];
  10247. } TITLEBARINFO, *PTITLEBARINFO, *LPTITLEBARINFO;
  10248. WINUSERAPI
  10249. BOOL
  10250. WINAPI
  10251. GetTitleBarInfo(
  10252. IN HWND hwnd,
  10253. OUT PTITLEBARINFO pti
  10254. );
  10255. /*
  10256. * Menubar information
  10257. */
  10258. typedef struct tagMENUBARINFO
  10259. {
  10260. DWORD cbSize;
  10261. RECT rcBar; // rect of bar, popup, item
  10262. HMENU hMenu; // real menu handle of bar, popup
  10263. HWND hwndMenu; // hwnd of item submenu if one
  10264. BOOL fBarFocused:1; // bar, popup has the focus
  10265. BOOL fFocused:1; // item has the focus
  10266. } MENUBARINFO, *PMENUBARINFO, *LPMENUBARINFO;
  10267. WINUSERAPI
  10268. BOOL
  10269. WINAPI
  10270. GetMenuBarInfo(
  10271. IN HWND hwnd,
  10272. IN LONG idObject,
  10273. IN LONG idItem,
  10274. OUT PMENUBARINFO pmbi
  10275. );
  10276. /*
  10277. * Scrollbar information
  10278. */
  10279. typedef struct tagSCROLLBARINFO
  10280. {
  10281. DWORD cbSize;
  10282. RECT rcScrollBar;
  10283. int dxyLineButton;
  10284. int xyThumbTop;
  10285. int xyThumbBottom;
  10286. int reserved;
  10287. DWORD rgstate[CCHILDREN_SCROLLBAR+1];
  10288. } SCROLLBARINFO, *PSCROLLBARINFO, *LPSCROLLBARINFO;
  10289. WINUSERAPI
  10290. BOOL
  10291. WINAPI
  10292. GetScrollBarInfo(
  10293. IN HWND hwnd,
  10294. IN LONG idObject,
  10295. OUT PSCROLLBARINFO psbi
  10296. );
  10297. /*
  10298. * Combobox information
  10299. */
  10300. typedef struct tagCOMBOBOXINFO
  10301. {
  10302. DWORD cbSize;
  10303. RECT rcItem;
  10304. RECT rcButton;
  10305. DWORD stateButton;
  10306. HWND hwndCombo;
  10307. HWND hwndItem;
  10308. HWND hwndList;
  10309. } COMBOBOXINFO, *PCOMBOBOXINFO, *LPCOMBOBOXINFO;
  10310. WINUSERAPI
  10311. BOOL
  10312. WINAPI
  10313. GetComboBoxInfo(
  10314. IN HWND hwndCombo,
  10315. OUT PCOMBOBOXINFO pcbi
  10316. );
  10317. /*
  10318. * The "real" ancestor window
  10319. */
  10320. #define GA_MIN 1 ;internal_NT
  10321. #define GA_PARENT 1
  10322. #define GA_ROOT 2
  10323. #define GA_ROOTOWNER 3
  10324. #define GA_MAX 3 ;internal_NT
  10325. WINUSERAPI
  10326. HWND
  10327. WINAPI
  10328. GetAncestor(
  10329. IN HWND hwnd,
  10330. IN UINT gaFlags
  10331. );
  10332. /*
  10333. * This gets the REAL child window at the point. If it is in the dead
  10334. * space of a group box, it will try a sibling behind it. But static
  10335. * fields will get returned. In other words, it is kind of a cross between
  10336. * ChildWindowFromPointEx and WindowFromPoint.
  10337. */
  10338. WINUSERAPI
  10339. HWND
  10340. WINAPI
  10341. RealChildWindowFromPoint(
  10342. IN HWND hwndParent,
  10343. IN POINT ptParentClientCoords
  10344. );
  10345. /*
  10346. * This gets the name of the window TYPE, not class. This allows us to
  10347. * recognize ThunderButton32 et al.
  10348. */
  10349. WINUSERAPI
  10350. UINT
  10351. WINAPI
  10352. RealGetWindowClass%(
  10353. IN HWND hwnd,
  10354. OUT LPTSTR% pszType,
  10355. IN UINT cchType
  10356. );
  10357. /*
  10358. * Alt-Tab Switch window information.
  10359. */
  10360. typedef struct tagALTTABINFO
  10361. {
  10362. DWORD cbSize;
  10363. int cItems;
  10364. int cColumns;
  10365. int cRows;
  10366. int iColFocus;
  10367. int iRowFocus;
  10368. int cxItem;
  10369. int cyItem;
  10370. POINT ptStart;
  10371. } ALTTABINFO, *PALTTABINFO, *LPALTTABINFO;
  10372. WINUSERAPI
  10373. BOOL
  10374. WINAPI
  10375. GetAltTabInfo%(
  10376. IN HWND hwnd,
  10377. IN int iItem,
  10378. OUT PALTTABINFO pati,
  10379. OUT LPTSTR% pszItemText,
  10380. IN UINT cchItemText
  10381. );
  10382. /*
  10383. * Listbox information.
  10384. * Returns the number of items per row.
  10385. */
  10386. WINUSERAPI
  10387. DWORD
  10388. WINAPI
  10389. GetListBoxInfo(
  10390. IN HWND hwnd
  10391. );
  10392. #endif /* NOWINABLE */
  10393. ;end_winver_500
  10394. ;begin_internal_if_(_WIN32_WINNT)_500
  10395. /*
  10396. * The max number of tags to fail that can be
  10397. * specified to Win32PoolAllocationStats. If tagsCount is more than
  10398. * this value then all the pool allocations will fail.
  10399. */
  10400. #define MAX_TAGS_TO_FAIL 256
  10401. BOOL
  10402. WINAPI
  10403. Win32PoolAllocationStats(
  10404. IN LPDWORD parrTags,
  10405. IN SIZE_T tagCount,
  10406. OUT SIZE_T* lpdwMaxMem,
  10407. OUT SIZE_T* lpdwCrtMem,
  10408. OUT LPDWORD lpdwMaxAlloc,
  10409. OUT LPDWORD lpdwCrtAlloc);
  10410. #define WHF_DESKTOP 0x00000001
  10411. #define WHF_SHAREDHEAP 0x00000002
  10412. #define WHF_CSRSS 0x00000004
  10413. #define WHF_ALL (WHF_DESKTOP | WHF_SHAREDHEAP | WHF_CSRSS)
  10414. #define WHF_VALID WHF_ALL
  10415. VOID
  10416. WINAPI
  10417. DbgWin32HeapFail(
  10418. DWORD dwFlags,
  10419. BOOL bFail
  10420. );
  10421. typedef struct tagDBGHEAPSTAT {
  10422. DWORD dwTag;
  10423. DWORD dwSize;
  10424. DWORD dwCount;
  10425. } DBGHEAPSTAT, *PDBGHEAPSTAT;
  10426. DWORD
  10427. WINAPI
  10428. DbgWin32HeapStat(
  10429. PDBGHEAPSTAT phs,
  10430. DWORD dwLen,
  10431. DWORD dwFlags
  10432. );
  10433. #define WPROTOCOLNAME_LENGTH 10
  10434. #define WAUDIONAME_LENGTH 10
  10435. typedef struct tagWSINFO {
  10436. WCHAR ProtocolName[WPROTOCOLNAME_LENGTH];
  10437. WCHAR AudioDriverName[WAUDIONAME_LENGTH];
  10438. } WSINFO, *PWSINFO;
  10439. BOOL
  10440. GetWinStationInfo(
  10441. WSINFO* pWsInfo);
  10442. ;end_internal_if_(_WIN32_WINNT)_500
  10443. ;begin_if_(_WIN32_WINNT)_500
  10444. WINUSERAPI
  10445. BOOL
  10446. WINAPI
  10447. LockWorkStation(
  10448. VOID);
  10449. ;end_if_(_WIN32_WINNT)_500
  10450. ;begin_if_(_WIN32_WINNT)_500
  10451. WINUSERAPI
  10452. BOOL
  10453. WINAPI
  10454. UserHandleGrantAccess(
  10455. HANDLE hUserHandle,
  10456. HANDLE hJob,
  10457. BOOL bGrant);
  10458. ;end_if_(_WIN32_WINNT)_500
  10459. ;begin_if_(_WIN32_WINNT)_501
  10460. /*
  10461. * Raw Input Messages.
  10462. */
  10463. DECLARE_HANDLE(HRAWINPUT);
  10464. /*
  10465. * WM_INPUT wParam
  10466. */
  10467. /*
  10468. * Use this macro to get the input code from wParam.
  10469. */
  10470. #define GET_RAWINPUT_CODE_WPARAM(wParam) ((wParam) & 0xff)
  10471. /*
  10472. * The input is in the regular message flow,
  10473. * the app is required to call DefWindowProc
  10474. * so that the system can perform clean ups.
  10475. */
  10476. #define RIM_INPUT 0
  10477. /*
  10478. * The input is sink only. The app is expected
  10479. * to behave nicely.
  10480. */
  10481. #define RIM_INPUTSINK 1
  10482. /*
  10483. * Raw Input data header
  10484. */
  10485. typedef struct tagRAWINPUTHEADER {
  10486. DWORD dwType;
  10487. DWORD dwSize;
  10488. HANDLE hDevice;
  10489. WPARAM wParam;
  10490. } RAWINPUTHEADER, *PRAWINPUTHEADER, *LPRAWINPUTHEADER;
  10491. /*
  10492. * Type of the raw input
  10493. */
  10494. #define RIM_TYPEMOUSE 0
  10495. #define RIM_TYPEKEYBOARD 1
  10496. #define RIM_TYPEHID 2
  10497. /*
  10498. * Raw format of the mouse input
  10499. */
  10500. typedef struct tagRAWMOUSE {
  10501. /*
  10502. * Indicator flags.
  10503. */
  10504. USHORT usFlags;
  10505. /*
  10506. * The transition state of the mouse buttons.
  10507. */
  10508. union {
  10509. ULONG ulButtons;
  10510. struct {
  10511. USHORT usButtonFlags;
  10512. USHORT usButtonData;
  10513. };
  10514. };
  10515. /*
  10516. * The raw state of the mouse buttons.
  10517. */
  10518. ULONG ulRawButtons;
  10519. /*
  10520. * The signed relative or absolute motion in the X direction.
  10521. */
  10522. LONG lLastX;
  10523. /*
  10524. * The signed relative or absolute motion in the Y direction.
  10525. */
  10526. LONG lLastY;
  10527. /*
  10528. * Device-specific additional information for the event.
  10529. */
  10530. ULONG ulExtraInformation;
  10531. } RAWMOUSE, *PRAWMOUSE, *LPRAWMOUSE;
  10532. /*
  10533. * Define the mouse button state indicators.
  10534. */
  10535. #define RI_MOUSE_LEFT_BUTTON_DOWN 0x0001 // Left Button changed to down.
  10536. #define RI_MOUSE_LEFT_BUTTON_UP 0x0002 // Left Button changed to up.
  10537. #define RI_MOUSE_RIGHT_BUTTON_DOWN 0x0004 // Right Button changed to down.
  10538. #define RI_MOUSE_RIGHT_BUTTON_UP 0x0008 // Right Button changed to up.
  10539. #define RI_MOUSE_MIDDLE_BUTTON_DOWN 0x0010 // Middle Button changed to down.
  10540. #define RI_MOUSE_MIDDLE_BUTTON_UP 0x0020 // Middle Button changed to up.
  10541. #define RI_MOUSE_BUTTON_1_DOWN RI_MOUSE_LEFT_BUTTON_DOWN
  10542. #define RI_MOUSE_BUTTON_1_UP RI_MOUSE_LEFT_BUTTON_UP
  10543. #define RI_MOUSE_BUTTON_2_DOWN RI_MOUSE_RIGHT_BUTTON_DOWN
  10544. #define RI_MOUSE_BUTTON_2_UP RI_MOUSE_RIGHT_BUTTON_UP
  10545. #define RI_MOUSE_BUTTON_3_DOWN RI_MOUSE_MIDDLE_BUTTON_DOWN
  10546. #define RI_MOUSE_BUTTON_3_UP RI_MOUSE_MIDDLE_BUTTON_UP
  10547. #define RI_MOUSE_BUTTON_4_DOWN 0x0040
  10548. #define RI_MOUSE_BUTTON_4_UP 0x0080
  10549. #define RI_MOUSE_BUTTON_5_DOWN 0x0100
  10550. #define RI_MOUSE_BUTTON_5_UP 0x0200
  10551. /*
  10552. * If usButtonFlags has RI_MOUSE_WHEEL, the wheel delta is stored in usButtonData.
  10553. * Take it as a signed value.
  10554. */
  10555. #define RI_MOUSE_WHEEL 0x0400
  10556. /*
  10557. * Define the mouse indicator flags.
  10558. */
  10559. #define MOUSE_MOVE_RELATIVE 0
  10560. #define MOUSE_MOVE_ABSOLUTE 1
  10561. #define MOUSE_VIRTUAL_DESKTOP 0x02 // the coordinates are mapped to the virtual desktop
  10562. #define MOUSE_ATTRIBUTES_CHANGED 0x04 // requery for mouse attributes
  10563. /*
  10564. * Raw format of the keyboard input
  10565. */
  10566. typedef struct tagRAWKEYBOARD {
  10567. /*
  10568. * The "make" scan code (key depression).
  10569. */
  10570. USHORT MakeCode;
  10571. /*
  10572. * The flags field indicates a "break" (key release) and other
  10573. * miscellaneous scan code information defined in ntddkbd.h.
  10574. */
  10575. USHORT Flags;
  10576. USHORT Reserved;
  10577. /*
  10578. * Windows message compatible information
  10579. */
  10580. USHORT VKey;
  10581. UINT Message;
  10582. /*
  10583. * Device-specific additional information for the event.
  10584. */
  10585. ULONG ExtraInformation;
  10586. } RAWKEYBOARD, *PRAWKEYBOARD, *LPRAWKEYBOARD;
  10587. /*
  10588. * Define the keyboard overrun MakeCode.
  10589. */
  10590. #define KEYBOARD_OVERRUN_MAKE_CODE 0xFF
  10591. /*
  10592. * Define the keyboard input data Flags.
  10593. */
  10594. #define RI_KEY_MAKE 0
  10595. #define RI_KEY_BREAK 1
  10596. #define RI_KEY_E0 2
  10597. #define RI_KEY_E1 4
  10598. #define RI_KEY_TERMSRV_SET_LED 8
  10599. #define RI_KEY_TERMSRV_SHADOW 0x10
  10600. /*
  10601. * Raw format of the input from Human Input Devices
  10602. */
  10603. typedef struct tagRAWHID {
  10604. DWORD dwSizeHid; // byte size of each report
  10605. DWORD dwCount; // number of input packed
  10606. BYTE bRawData[1];
  10607. } RAWHID, *PRAWHID, *LPRAWHID;
  10608. /*
  10609. * RAWINPUT data structure.
  10610. */
  10611. ;begin_internal_501
  10612. /*
  10613. * The handle to this structure is passed in the lParam
  10614. * of WM_INPUT message.
  10615. * The application can call GetRawInputData API to
  10616. * get the detailed information, including the header
  10617. * and all the content of the Raw Input.
  10618. *
  10619. * For the bulk read the RawInput in the message loop,
  10620. * the application may call GetRawInputBuffer API.
  10621. *
  10622. * For the device specific information,
  10623. * the application may call GetRawInputDeviceInfo API.
  10624. *
  10625. * Raw Input is available only when the application
  10626. * calls SetRawInputDevices with valid device
  10627. * specifications.
  10628. */
  10629. ;end_internal_501
  10630. typedef struct tagRAWINPUT {
  10631. RAWINPUTHEADER header;
  10632. union {
  10633. RAWMOUSE mouse;
  10634. RAWKEYBOARD keyboard;
  10635. RAWHID hid;
  10636. } data;
  10637. } RAWINPUT, *PRAWINPUT, *LPRAWINPUT;
  10638. #ifdef _WIN64
  10639. #define RAWINPUT_ALIGN(x) (((x) + sizeof(QWORD) - 1) & ~(sizeof(QWORD) - 1))
  10640. #else // _WIN64
  10641. #define RAWINPUT_ALIGN(x) (((x) + sizeof(DWORD) - 1) & ~(sizeof(DWORD) - 1))
  10642. #endif // _WIN64
  10643. #define NEXTRAWINPUTBLOCK(ptr) ((PRAWINPUT)RAWINPUT_ALIGN((ULONG_PTR)((PBYTE)(ptr) + (ptr)->header.dwSize)))
  10644. /*
  10645. * Flags for GetRawInputData
  10646. */
  10647. ;begin_internal
  10648. #define RID_GETTYPE_INPUT 0x10000000
  10649. #define RID_GETTYPE_DEVICE 0x20000000
  10650. #define RID_GETTYPE_MASK 0xf0000000
  10651. ;end_internal
  10652. #define RID_INPUT 0x10000003
  10653. #define RID_HEADER 0x10000005
  10654. WINUSERAPI
  10655. UINT
  10656. WINAPI
  10657. GetRawInputData(
  10658. IN HRAWINPUT hRawInput,
  10659. IN UINT uiCommand,
  10660. OUT LPVOID pData,
  10661. IN OUT PUINT pcbSize,
  10662. IN UINT cbSizeHeader);
  10663. /*
  10664. * Raw Input Device Information
  10665. */
  10666. #define RIDI_PREPARSEDDATA 0x20000005
  10667. #define RIDI_DEVICENAME 0x20000007 // the return valus is the character length, not the byte size
  10668. #define RIDI_DEVICEINFO 0x2000000b
  10669. typedef struct tagRID_DEVICE_INFO_MOUSE {
  10670. DWORD dwId;
  10671. DWORD dwNumberOfButtons;
  10672. DWORD dwSampleRate;
  10673. } RID_DEVICE_INFO_MOUSE, *PRID_DEVICE_INFO_MOUSE;
  10674. typedef struct tagRID_DEVICE_INFO_KEYBOARD {
  10675. DWORD dwType;
  10676. DWORD dwSubType;
  10677. DWORD dwKeyboardMode;
  10678. DWORD dwNumberOfFunctionKeys;
  10679. DWORD dwNumberOfIndicators;
  10680. DWORD dwNumberOfKeysTotal;
  10681. } RID_DEVICE_INFO_KEYBOARD, *PRID_DEVICE_INFO_KEYBOARD;
  10682. typedef struct tagRID_DEVICE_INFO_HID {
  10683. DWORD dwVendorId;
  10684. DWORD dwProductId;
  10685. DWORD dwVersionNumber;
  10686. /*
  10687. * Top level collection UsagePage and Usage
  10688. */
  10689. USHORT usUsagePage;
  10690. USHORT usUsage;
  10691. } RID_DEVICE_INFO_HID, *PRID_DEVICE_INFO_HID;
  10692. typedef struct tagRID_DEVICE_INFO {
  10693. DWORD cbSize;
  10694. DWORD dwType;
  10695. union {
  10696. RID_DEVICE_INFO_MOUSE mouse;
  10697. RID_DEVICE_INFO_KEYBOARD keyboard;
  10698. RID_DEVICE_INFO_HID hid;
  10699. };
  10700. } RID_DEVICE_INFO, *PRID_DEVICE_INFO, *LPRID_DEVICE_INFO;
  10701. WINUSERAPI
  10702. UINT
  10703. WINAPI
  10704. GetRawInputDeviceInfo%(
  10705. IN HANDLE hDevice,
  10706. IN UINT uiCommand,
  10707. OUT LPVOID pData,
  10708. IN OUT PUINT pcbSize);
  10709. /*
  10710. * Raw Input Bulk Read: GetRawInputBuffer
  10711. */
  10712. WINUSERAPI
  10713. UINT
  10714. WINAPI
  10715. GetRawInputBuffer(
  10716. OUT PRAWINPUT pData,
  10717. IN OUT PUINT pcbSize,
  10718. IN UINT cbSizeHeader);
  10719. /*
  10720. * Raw Input request APIs
  10721. */
  10722. typedef struct tagRAWINPUTDEVICE {
  10723. USHORT usUsagePage; // Toplevel collection UsagePage
  10724. USHORT usUsage; // Toplevel collection Usage
  10725. DWORD dwFlags;
  10726. HWND hwndTarget; // Target hwnd. NULL = follows keyboard focus
  10727. } RAWINPUTDEVICE, *PRAWINPUTDEVICE, *LPRAWINPUTDEVICE;
  10728. typedef CONST RAWINPUTDEVICE* PCRAWINPUTDEVICE;
  10729. #define RIDEV_ADD_OR_MODIFY 0x00000000 ;internal
  10730. #define RIDEV_REMOVE 0x00000001
  10731. #define RIDEV_MODEMASK 0x00000001 ;internal
  10732. #define RIDEV_INCLUDE 0x00000000 ;internal
  10733. #define RIDEV_EXCLUDE 0x00000010
  10734. #define RIDEV_PAGEONLY 0x00000020
  10735. #define RIDEV_NOLEGACY 0x00000030
  10736. #define RIDEV_INPUTSINK 0x00000100
  10737. #define RIDEV_CAPTUREMOUSE 0x00000200 // effective when mouse nolegacy is specified, otherwise it would be an error
  10738. #define RIDEV_NOHOTKEYS 0x00000200 // effective for keyboard.
  10739. #define RIDEV_APPKEYS 0x00000400 // effective for keyboard.
  10740. #define RIDEV_VALID 0x00000731 ;internal
  10741. #define RIDEV_EXMODEMASK 0x000000F0
  10742. #define RIDEV_EXMODE(mode) ((mode) & RIDEV_EXMODEMASK)
  10743. WINUSERAPI
  10744. BOOL
  10745. WINAPI
  10746. RegisterRawInputDevices(
  10747. IN PCRAWINPUTDEVICE pRawInputDevices,
  10748. IN UINT uiNumDevices,
  10749. IN UINT cbSize);
  10750. WINUSERAPI
  10751. UINT
  10752. WINAPI
  10753. GetRegisteredRawInputDevices(
  10754. OUT PRAWINPUTDEVICE pRawInputDevices,
  10755. IN OUT PUINT puiNumDevices,
  10756. IN UINT cbSize);
  10757. typedef struct tagRAWINPUTDEVICELIST {
  10758. HANDLE hDevice;
  10759. DWORD dwType;
  10760. } RAWINPUTDEVICELIST, *PRAWINPUTDEVICELIST;
  10761. WINUSERAPI
  10762. UINT
  10763. WINAPI
  10764. GetRawInputDeviceList(
  10765. OUT PRAWINPUTDEVICELIST pRawInputDeviceList,
  10766. IN OUT PUINT puiNumDevices,
  10767. IN UINT cbSize);
  10768. WINUSERAPI
  10769. LRESULT
  10770. WINAPI
  10771. DefRawInputProc(
  10772. IN PRAWINPUT* paRawInput,
  10773. IN INT nInput,
  10774. IN UINT cbSizeHeader);
  10775. ;end_if_(_WIN32_WINNT)_501
  10776. ;begin_internal
  10777. /*
  10778. * vkey table counts, macros, etc. input synchonized key state tables have
  10779. * 2 bits per vkey: fDown, fToggled. Async key state tables have 3 bits:
  10780. * fDown, fToggled, fDownSinceLastRead.
  10781. *
  10782. * Important! The array gafAsyncKeyState matches the bit positions of the
  10783. * afKeyState array in each thread info block. The fDownSinceLastRead bit
  10784. * for the async state is stored in a separate bit array, called
  10785. * gafAsyncKeyStateRecentDown.
  10786. *
  10787. * It is important that the bit positions of gafAsyncKeyState and
  10788. * pti->afKeyState match because we copy from one to the other to maintain
  10789. * key state synchronization between threads.
  10790. *
  10791. * These macros below MUST be used when setting / querying key state.
  10792. */
  10793. #define CVKKEYSTATE 256
  10794. #define CBKEYSTATE (CVKKEYSTATE >> 2)
  10795. #define CBKEYSTATERECENTDOWN (CVKKEYSTATE >> 3)
  10796. #define KEYSTATE_TOGGLE_BYTEMASK 0xAA // 10101010
  10797. #define KEYSTATE_DOWN_BYTEMASK 0x55 // 01010101
  10798. /*
  10799. * Two bits per VK (down & toggle) so we can pack 4 VK keystates into 1 byte:
  10800. *
  10801. * Byte 0 Byte 1
  10802. * .---.---.---.---.---.---.---.---. .---.---.---.---.---.---.---.---. .-- -
  10803. * | T | D | T | D | T | D | T | D | | T | D | T | D | T | D | T | D | |
  10804. * `---'---'---'---'---'---'---'---' `---'---'---'---'---'---'---'---' `-- -
  10805. * : VK 3 : VK 2 : VK 1 : VK 0 : : VK 7 : VK 6 : VK 5 : VK 4 : :
  10806. *
  10807. * KEY_BYTE(pb, vk) identifies the byte containing the VK's state
  10808. * KEY_DOWN_BIT(vk) identifies the VK's down bit within a byte
  10809. * KEY_TOGGLE_BIT(vk) identifies the VK's toggle bit within a byte
  10810. */
  10811. #define KEY_BYTE(pb, vk) pb[((BYTE)(vk)) >> 2]
  10812. #define KEY_DOWN_BIT(vk) (1 << ((((BYTE)(vk)) & 3) << 1))
  10813. #define KEY_TOGGLE_BIT(vk) (1 << (((((BYTE)(vk)) & 3) << 1) + 1))
  10814. #define TestKeyDownBit(pb, vk) (KEY_BYTE(pb,vk) & KEY_DOWN_BIT(vk))
  10815. #define SetKeyDownBit(pb, vk) (KEY_BYTE(pb,vk) |= KEY_DOWN_BIT(vk))
  10816. #define ClearKeyDownBit(pb, vk) (KEY_BYTE(pb,vk) &= ~KEY_DOWN_BIT(vk))
  10817. #define TestKeyToggleBit(pb, vk) (KEY_BYTE(pb,vk) & KEY_TOGGLE_BIT(vk))
  10818. #define SetKeyToggleBit(pb, vk) (KEY_BYTE(pb,vk) |= KEY_TOGGLE_BIT(vk))
  10819. #define ClearKeyToggleBit(pb, vk) (KEY_BYTE(pb,vk) &= ~KEY_TOGGLE_BIT(vk))
  10820. #define ToggleKeyToggleBit(pb, vk) (KEY_BYTE(pb,vk) ^= KEY_TOGGLE_BIT(vk))
  10821. /*
  10822. * Similar to the above, but here we need only one bit per VK (down)
  10823. * so we can pack 8 VK down states into 1 byte.
  10824. */
  10825. #define RKEY_BYTE(pb, vk) pb[((BYTE)(vk)) >> 3]
  10826. #define RKEY_BIT(vk) (1 << ((BYTE)(vk) & 7))
  10827. #define TestKeyRecentDownBit(pb, vk) (RKEY_BYTE(pb,vk) & RKEY_BIT(vk))
  10828. #define SetKeyRecentDownBit(pb, vk) (RKEY_BYTE(pb,vk) |= RKEY_BIT(vk))
  10829. #define ClearKeyRecentDownBit(pb, vk) (RKEY_BYTE(pb,vk) &= ~RKEY_BIT(vk))
  10830. #define TestKeyStateDown(pq, vk)\
  10831. TestKeyDownBit(pq->afKeyState, vk)
  10832. #define SetKeyStateDown(pq, vk)\
  10833. SetKeyDownBit(pq->afKeyState, vk)
  10834. #define ClearKeyStateDown(pq, vk)\
  10835. ClearKeyDownBit(pq->afKeyState, vk)
  10836. #define TestKeyStateToggle(pq, vk)\
  10837. TestKeyToggleBit(pq->afKeyState, vk)
  10838. #define SetKeyStateToggle(pq, vk)\
  10839. SetKeyToggleBit(pq->afKeyState, vk)
  10840. #define ClearKeyStateToggle(pq, vk)\
  10841. ClearKeyToggleBit(pq->afKeyState, vk)
  10842. #define TestAsyncKeyStateDown(vk)\
  10843. TestKeyDownBit(gafAsyncKeyState, vk)
  10844. #define SetAsyncKeyStateDown(vk)\
  10845. SetKeyDownBit(gafAsyncKeyState, vk)
  10846. #define ClearAsyncKeyStateDown(vk)\
  10847. ClearKeyDownBit(gafAsyncKeyState, vk)
  10848. #define TestAsyncKeyStateToggle(vk)\
  10849. TestKeyToggleBit(gafAsyncKeyState, vk)
  10850. #define SetAsyncKeyStateToggle(vk)\
  10851. SetKeyToggleBit(gafAsyncKeyState, vk)
  10852. #define ClearAsyncKeyStateToggle(vk)\
  10853. ClearKeyToggleBit(gafAsyncKeyState, vk)
  10854. #define TestAsyncKeyStateRecentDown(vk)\
  10855. TestKeyRecentDownBit(gafAsyncKeyStateRecentDown, vk)
  10856. #define SetAsyncKeyStateRecentDown(vk)\
  10857. SetKeyRecentDownBit(gafAsyncKeyStateRecentDown, vk)
  10858. #define ClearAsyncKeyStateRecentDown(vk)\
  10859. ClearKeyRecentDownBit(gafAsyncKeyStateRecentDown, vk)
  10860. ;end_internal
  10861. ;begin_internal_501
  10862. ;begin_if_(_WIN32_WINNT)_501
  10863. #ifndef NOUSER
  10864. #ifndef NOSCROLL
  10865. #ifndef NOSYSMETRICS
  10866. #ifndef NOSYSPARAMSINFO
  10867. typedef BOOL (CALLBACK* OVERRIDEWNDPROC)(HWND, UINT, WPARAM, LPARAM, LRESULT*, void**);
  10868. typedef BOOL (CALLBACK* FORCERESETUSERAPIHOOK)(HMODULE hmod);
  10869. typedef VOID (CALLBACK* MDIREDRAWFRAMEPROC)(HWND hwndChild, BOOL fAdd);
  10870. /*
  10871. * Flags passed to UAH DLL's indicating current status of UAH.
  10872. *
  10873. * UIAH_INITIALIZE : UAH are being initialized for current process and DLL has just been loaded.
  10874. * UIAH_UNINITIALIZE : UAH are being uninitialized for current process and DLL is about to be unloaded.
  10875. * UIAH_UNHOOK : UAH have been unregistered system-wide but DLL can't be unloaded due to outstanding
  10876. * API calls into it. Table of function pointers (guah) has been reset to native
  10877. * user32 functions to prevent further calls.
  10878. */
  10879. #define UIAH_INITIALIZE 0
  10880. #define UIAH_UNINITIALIZE 1
  10881. #define UIAH_UNHOOK 2
  10882. typedef struct tagMSGMASK {
  10883. BYTE * rgb;
  10884. DWORD cb;
  10885. } MSGMASK, *PMSGMASK;
  10886. typedef struct tagUSEROWPINFO {
  10887. OVERRIDEWNDPROC pfnBeforeOWP;
  10888. OVERRIDEWNDPROC pfnAfterOWP;
  10889. MSGMASK mm;
  10890. } USEROWPINFO, *PUSEROWPINFO;
  10891. typedef struct tagUSERAPIHOOK {
  10892. DWORD cbSize;
  10893. WNDPROC pfnDefWindowProcA;
  10894. WNDPROC pfnDefWindowProcW;
  10895. MSGMASK mmDWP;
  10896. GETSCROLLINFOPROC pfnGetScrollInfo;
  10897. SETSCROLLINFOPROC pfnSetScrollInfo;
  10898. ENABLESCROLLBARPROC pfnEnableScrollBar;
  10899. ADJUSTWINDOWRECTEXPROC pfnAdjustWindowRectEx;
  10900. SETWINDOWRGNPROC pfnSetWindowRgn;
  10901. USEROWPINFO uoiWnd;
  10902. USEROWPINFO uoiDlg;
  10903. GETSYSTEMMETRICSPROC pfnGetSystemMetrics;
  10904. SYSTEMPARAMETERSINFO pfnSystemParametersInfoA;
  10905. SYSTEMPARAMETERSINFO pfnSystemParametersInfoW;
  10906. FORCERESETUSERAPIHOOK pfnForceResetUserApiHook;
  10907. DRAWFRAMECONTROLPROC pfnDrawFrameControl;
  10908. DRAWCAPTIONPROC pfnDrawCaption;
  10909. MDIREDRAWFRAMEPROC pfnMDIRedrawFrame;
  10910. } USERAPIHOOK, *PUSERAPIHOOK;
  10911. typedef BOOL (CALLBACK* INITUSERAPIHOOK)(DWORD dwCmd, void* pvParam);
  10912. WINUSERAPI
  10913. BOOL
  10914. WINAPI
  10915. RegisterUserApiHook(
  10916. IN HINSTANCE hmod,
  10917. IN INITUSERAPIHOOK pfnUserApiHook);
  10918. WINUSERAPI
  10919. BOOL
  10920. WINAPI
  10921. UnregisterUserApiHook(VOID);
  10922. #endif /*!NOSYSPARAMSINFO*/
  10923. #endif /*!NOSYSMETRICS*/
  10924. #endif /* NOSCROLL */
  10925. /*
  10926. * Message Hook
  10927. */
  10928. #ifndef NOMSG
  10929. typedef struct tagMESSAGEPUMPHOOK {
  10930. DWORD cbSize;
  10931. INTERNALGETMESSAGEPROC
  10932. pfnInternalGetMessage;
  10933. WAITMESSAGEEXPROC pfnWaitMessageEx;
  10934. GETQUEUESTATUSPROC pfnGetQueueStatus;
  10935. MSGWAITFORMULTIPLEOBJECTSEXPROC
  10936. pfnMsgWaitForMultipleObjectsEx;
  10937. } MESSAGEPUMPHOOK;
  10938. typedef BOOL (CALLBACK* INITMESSAGEPUMPHOOK)(DWORD dwCmd, void* pvParam);
  10939. WINUSERAPI
  10940. BOOL
  10941. WINAPI
  10942. RegisterMessagePumpHook(
  10943. IN INITMESSAGEPUMPHOOK pfnInitMPH);
  10944. WINUSERAPI
  10945. BOOL
  10946. WINAPI
  10947. UnregisterMessagePumpHook();
  10948. #endif /* NOMSG */
  10949. #endif /* NOUSER */
  10950. ;end_if_(_WIN32_WINNT)_501
  10951. #ifdef REDIRECTION
  10952. WINUSERAPI
  10953. BOOL
  10954. WINAPI
  10955. SetProcessRedirectionMode(
  10956. IN HANDLE hProcess,
  10957. IN BOOL bRedirectionMode);
  10958. WINUSERAPI
  10959. BOOL
  10960. WINAPI
  10961. GetProcessRedirectionMode(
  10962. IN HANDLE hProcess,
  10963. OUT PBOOL pbRedirectionMode);
  10964. WINUSERAPI
  10965. BOOL
  10966. WINAPI
  10967. SetDesktopRedirectionMode(
  10968. IN HANDLE hProcess,
  10969. IN BOOL bRedirectionMode);
  10970. WINUSERAPI
  10971. BOOL
  10972. WINAPI
  10973. GetDesktopRedirectionMode(
  10974. IN HANDLE hProcess,
  10975. OUT PBOOL pbRedirectionMode);
  10976. #endif // REDIRECTION
  10977. ;end_internal_501
  10978. ;begin_internal
  10979. /*
  10980. * We set this bit in GetDeviceChangeInfo to signify that the drive letter
  10981. * represents a new drive.
  10982. */
  10983. #define HMCE_ARRIVAL 0x80000000
  10984. ;end_internal
  10985. ;begin_internal
  10986. /*
  10987. * Shutdown reason code
  10988. */
  10989. #include <reason.h>
  10990. typedef struct _REASON_INITIALISER {
  10991. DWORD dwCode;
  10992. DWORD dwNameId;
  10993. DWORD dwDescId;
  10994. } REASON_INITIALISER;
  10995. typedef struct _REASON
  10996. {
  10997. DWORD dwCode;
  10998. WCHAR szName[MAX_REASON_NAME_LEN];
  10999. WCHAR szDesc[MAX_REASON_DESC_LEN];
  11000. } REASON, *PREASON;
  11001. typedef struct _REASONDATA
  11002. {
  11003. REASON** rgReasons;
  11004. int cReasons;
  11005. int cReasonCapacity;
  11006. DWORD dwReasonSelect;
  11007. WCHAR szComment[MAX_REASON_COMMENT_LEN];
  11008. WCHAR szBugID[MAX_REASON_BUGID_LEN];
  11009. int cCommentLen;
  11010. int cBugIDLen;
  11011. } REASONDATA, *PREASONDATA;
  11012. BOOL ReasonCodeNeedsComment(DWORD dwCode);
  11013. BOOL ReasonCodeNeedsBugID(DWORD dwCode);
  11014. BOOL BuildReasonArray(REASONDATA *pdata, BOOL forCleanUI, BOOL forDirtyUI);
  11015. VOID DestroyReasons(REASONDATA *pdata);
  11016. BOOL GetReasonTitleFromReasonCode(DWORD code, WCHAR *title, DWORD dwTitleLen);
  11017. BOOL IsSETEnabled();
  11018. // Reason Titles
  11019. #define IDS_REASON_UNPLANNED_HARDWARE_MAINTENANCE_TITLE 8250
  11020. #define IDS_REASON_PLANNED_HARDWARE_MAINTENANCE_TITLE 8251
  11021. #define IDS_REASON_UNPLANNED_HARDWARE_INSTALLATION_TITLE 8252
  11022. #define IDS_REASON_PLANNED_HARDWARE_INSTALLATION_TITLE 8253
  11023. //#define IDS_REASON_UNPLANNED_OPERATINGSYSTEM_UPGRADE_TITLE 8254
  11024. #define IDS_REASON_PLANNED_OPERATINGSYSTEM_UPGRADE_TITLE 8255
  11025. #define IDS_REASON_UNPLANNED_OPERATINGSYSTEM_RECONFIG_TITLE 8256
  11026. #define IDS_REASON_PLANNED_OPERATINGSYSTEM_RECONFIG_TITLE 8257
  11027. #define IDS_REASON_APPLICATION_HUNG_TITLE 8258
  11028. #define IDS_REASON_APPLICATION_UNSTABLE_TITLE 8259
  11029. #define IDS_REASON_APPLICATION_MAINTENANCE_TITLE 8260
  11030. #define IDS_REASON_UNPLANNED_OTHER_TITLE 8261
  11031. #define IDS_REASON_PLANNED_OTHER_TITLE 8262
  11032. #define IDS_REASON_SYSTEMFAILURE_BLUESCREEN_TITLE 8263
  11033. #define IDS_REASON_POWERFAILURE_CORDUNPLUGGED_TITLE 8264
  11034. #define IDS_REASON_POWERFAILURE_ENVIRONMENT_TITLE 8265
  11035. #define IDS_REASON_OTHERFAILURE_HUNG_TITLE 8266
  11036. #define IDS_REASON_OTHERFAILURE_TITLE 8267
  11037. #define IDS_REASON_APPLICATION_PM_TITLE 8268
  11038. // Default reason title returned by GetReasonTitleFromReasonCode
  11039. #define IDS_REASON_DEFAULT_TITLE 8269
  11040. #define IDS_REASON_LEGACY_API_TITLE 8270
  11041. // Reason Descriptions
  11042. #define IDS_REASON_HARDWARE_MAINTENANCE_DESCRIPTION 8275
  11043. #define IDS_REASON_HARDWARE_INSTALLATION_DESCRIPTION 8276
  11044. #define IDS_REASON_OPERATINGSYSTEM_UPGRADE_DESCRIPTION 8277
  11045. #define IDS_REASON_OPERATINGSYSTEM_RECONFIG_DESCRIPTION 8278
  11046. #define IDS_REASON_APPLICATION_HUNG_DESCRIPTION 8279
  11047. #define IDS_REASON_APPLICATION_UNSTABLE_DESCRIPTION 8280
  11048. #define IDS_REASON_APPLICATION_MAINTENANCE_DESCRIPTION 8281
  11049. #define IDS_REASON_OTHER_DESCRIPTION 8282
  11050. #define IDS_REASON_SYSTEMFAILURE_BLUESCREEN_DESCRIPTION 8283
  11051. #define IDS_REASON_POWERFAILURE_CORDUNPLUGGED_DESCRIPTION 8284
  11052. #define IDS_REASON_POWERFAILURE_ENVIRONMENT_DESCRIPTION 8285
  11053. #define IDS_REASON_OTHERFAILURE_HUNG_DESCRIPTION 8286
  11054. #define IDS_REASON_APPLICATION_PM_DESCRIPTION 8287
  11055. #define IDS_REASON_PLANNED_OPERATINGSYSTEM_SERVICEPACK_TITLE 8288
  11056. #define IDS_REASON_PLANNED_OPERATINGSYSTEM_HOTFIX_TITLE 8289
  11057. #define IDS_REASON_UNPLANNED_OPERATINGSYSTEM_HOTFIX_TITLE 8290
  11058. #define IDS_REASON_PLANNED_OPERATINGSYSTEM_SECURITYFIX_TITLE 8291
  11059. #define IDS_REASON_UNPLANNED_OPERATINGSYSTEM_SECURITYFIX_TITLE 8292
  11060. #define IDS_REASON_PLANNED_APPLICATION_INSTALLATION_TITLE 8293
  11061. #define IDS_REASON_SECURITY_ISSUE_TITLE 8300
  11062. #define IDS_REASON_LOSS_OF_NETWORK_TITLE 8301
  11063. #define IDS_REASON_OPERATINGSYSTEM_SERVICEPACK_DESCRIPTION 8294
  11064. #define IDS_REASON_OPERATINGSYSTEM_HOTFIX_DESCRIPTION 8295
  11065. #define IDS_REASON_OPERATINGSYSTEM_SECURITYFIX_DESCRIPTION 8296
  11066. #define IDS_REASON_APPLICATION_INSTALLATION_DESCRIPTION 8297
  11067. #define IDS_REASON_LEGACY_API_DESCRIPTION 8298
  11068. #define IDS_REASON_SECURITY_ISSUE_DESCRIPTION 8310
  11069. #define IDS_REASON_LOSS_OF_NETWORK_DESCRIPTION 8311
  11070. ;end_internal
  11071. ;begin_internal_501
  11072. #define WC_HARDERRORHANDLER "HardErrorHandler"
  11073. #define COPYDATA_HARDERROR "HardError"
  11074. typedef struct _tagHardErrorData
  11075. {
  11076. DWORD dwSize; // Size of this structure
  11077. DWORD dwError; // Hard Error
  11078. DWORD dwFlags; // Hard Error flags
  11079. UINT uOffsetTitleW; // Offset to UNICODE Title
  11080. UINT uOffsetTextW; // Offset to UNICODE Text
  11081. } HARDERRORDATA, *PHARDERRORDATA;
  11082. ;end_internal_501
  11083. ;begin_both
  11084. #ifdef __cplusplus
  11085. }
  11086. #endif /* __cplusplus */
  11087. ;end_both
  11088. #endif /* !_WINUSERP_ */ ;internal_NT
  11089. #endif /* !_WINUSER_ */
  11090. ;begin_pbt_only
  11091. #endif // _INC_PBT
  11092. ;end_pbt_only
  11093. /*#!perl
  11094. # CreateWindowA and CreateWindowW are macros.
  11095. ActivateAroundFunctionCall("CreateWindowA");
  11096. ActivateAroundFunctionCall("CreateWindowW");
  11097. ActivateAroundFunctionCall("CreateWindowExA");
  11098. ActivateAroundFunctionCall("CreateWindowExW");
  11099. ActivateAroundFunctionCall("GetClassInfoA");
  11100. ActivateAroundFunctionCall("GetClassInfoW");
  11101. ActivateAroundFunctionCall("GetClassInfoExA");
  11102. ActivateAroundFunctionCall("GetClassInfoExW");
  11103. ActivateAroundFunctionCall("RegisterClassA");
  11104. ActivateAroundFunctionCall("RegisterClassW");
  11105. ActivateAroundFunctionCall("RegisterClassExA");
  11106. ActivateAroundFunctionCall("RegisterClassExW");
  11107. ActivateAroundFunctionCall("UnregisterClassA");
  11108. ActivateAroundFunctionCall("UnregisterClassW");
  11109. ActivateAroundFunctionCall("CreateDialogParamA");
  11110. ActivateAroundFunctionCall("CreateDialogParamW");
  11111. ActivateAroundFunctionCall("CreateDialogIndirectParamA");
  11112. ActivateAroundFunctionCall("CreateDialogIndirectParamW");
  11113. ActivateAroundFunctionCall("DialogBoxParamA");
  11114. ActivateAroundFunctionCall("DialogBoxParamW");
  11115. ActivateAroundFunctionCall("DialogBoxIndirectParamA");
  11116. ActivateAroundFunctionCall("DialogBoxIndirectParamW");
  11117. ActivateAroundFunctionCall("MessageBoxA");
  11118. ActivateAroundFunctionCall("MessageBoxW");
  11119. ActivateAroundFunctionCall("MessageBoxExA");
  11120. ActivateAroundFunctionCall("MessageBoxExW");
  11121. ActivateAroundFunctionCall("MessageBoxIndirectA");
  11122. ActivateAroundFunctionCall("MessageBoxIndirectW");
  11123. // These are member functions in MFC/ATL.
  11124. NoMacro("MessageBoxA");
  11125. NoMacro("MessageBoxW");
  11126. NoMacro("GetClassInfoA");
  11127. NoMacro("GetClassInfoW");
  11128. DeclareFunctionErrorValue("DialogBoxParamA", -1);
  11129. DeclareFunctionErrorValue("DialogBoxParamW", -1);
  11130. DeclareFunctionErrorValue("DialogBoxIndirectParamA", -1);
  11131. DeclareFunctionErrorValue("DialogBoxIndirectParamW", -1);
  11132. DeclareFunctionErrorValue("MessageBoxA", 0);
  11133. DeclareFunctionErrorValue("MessageBoxW", 0);
  11134. DeclareFunctionErrorValue("MessageBoxExA", 0);
  11135. DeclareFunctionErrorValue("MessageBoxExW", 0);
  11136. DeclareFunctionErrorValue("MessageBoxIndirectA", 0);
  11137. DeclareFunctionErrorValue("MessageBoxIndirectW", 0);
  11138. */