source: trunk/Include/api_window.sbp@ 497

Last change on this file since 497 was 497, checked in by イグトランス (egtra), 17 years ago

インクルードガードとその他不要な前処理定義などの削除

File size: 101.6 KB
Line 
1' api_window.sbp - Window Control API
2
3'-------------
4' Window API Function Names
5#ifdef UNICODE
6Const _FuncName_CallWindowProc = "CallWindowProcW"
7Const _FuncName_CharLower = "CharLowerW"
8Const _FuncName_CharNext = "CharNextW"
9Const _FuncName_CharPrev = "CharPrevW"
10Const _FuncName_CharUpper = "CharUpperW"
11Const _FuncName_CreateAcceleratorTable = "CreateAcceleratorTableW"
12Const _FuncName_CreateWindowEx = "CreateWindowExW"
13Const _FuncName_DefDlgProc = "DefDlgProcW"
14Const _FuncName_DefWindowProc = "DefWindowProcW"
15Const _FuncName_DialogBoxIndirectParam = "DialogBoxIndirectParamW"
16Const _FuncName_DispatchMessage = "DispatchMessageW"
17Const _FuncName_DlgDirList = "DlgDirListW"
18Const _FuncName_DlgDirListComboBox = "DlgDirListComboBoxW"
19Const _FuncName_DlgDirSelectComboBoxEx = "DlgDirSelectComboBoxExW"
20Const _FuncName_DlgDirSelectEx = "DlgDirSelectExW"
21Const _FuncName_DrawText = "DrawTextW"
22Const _FuncName_DrawTextEx = "DrawTextExW"
23Const _FuncName_FindWindow = "FindWindowW"
24Const _FuncName_FindWindowEx = "FindWindowExW"
25Const _FuncName_GetClassInfoEx = "GetClassInfoExW"
26Const _FuncName_GetClassLong = "GetClassLongW"
27Const _FuncName_GetClassLongPtr = "GetClassLongPtrW"
28Const _FuncName_GetClassName = "GetClassNameW"
29Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameW"
30Const _FuncName_GetDlgItemText = "GetDlgItemTextW"
31Const _FuncName_GetMonitorInfo = "GetMonitorInfoW"
32Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoW"
33Const _FuncName_GetMessage = "GetMessageW"
34Const _FuncName_GetProp = "GetPropW"
35Const _FuncName_GetWindowLong = "GetWindowLongW"
36Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrW"
37Const _FuncName_GetWindowText = "GetWindowTextW"
38Const _FuncName_GetWindowTextLength = "GetWindowTextLengthW"
39Const _FuncName_GetWindowModuleFileName = "GetWindowModuleFileNameW"
40Const _FuncName_InsertMenuItem = "InsertMenuItemW"
41Const _FuncName_IsCharAlpha = "IsCharAlphaW"
42Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericW"
43Const _FuncName_IsCharLower = "IsCharLowerW"
44Const _FuncName_IsCharUpper = "IsCharUpperW"
45Const _FuncName_IsDialogMessage = "IsDialogMessageW"
46Const _FuncName_LoadBitmap = "LoadBitmapW"
47Const _FuncName_LoadCursor = "LoadCursorW"
48Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileW"
49Const _FuncName_LoadIcon = "LoadIconW"
50Const _FuncName_LoadImage = "LoadImageW"
51Const _FuncName_LoadString = "LoadStringW"
52Const _FuncName_MapVirtualKey = "MapVirtualKeyW"
53Const _FuncName_PeekMessage = "PeekMessageW"
54Const _FuncName_PostMessage = "PostMessageW"
55Const _FuncName_PostThreadMessage = "PostThreadMessageW"
56Const _FuncName_RegisterClassEx = "RegisterClassExW"
57Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatW"
58Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageW"
59Const _FuncName_RemoveProp = "RemovePropW"
60Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageW"
61Const _FuncName_SendMessage = "SendMessageW"
62Const _FuncName_SendNotifyMessage = "SendNotifyMessageW"
63Const _FuncName_SetDlgItemText = "SetDlgItemTextW"
64Const _FuncName_SetClassLong = "SetClassLongW"
65Const _FuncName_SetClassLongPtr = "SetClassLongPtrW"
66Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoW"
67Const _FuncName_SetProp = "SetPropW"
68Const _FuncName_SetWindowLong = "SetWindowLongW"
69Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrW"
70Const _FuncName_SetWindowText = "SetWindowTextW"
71Const _FuncName_SetWindowsHookEx = "SetWindowsHookExW"
72Const _FuncName_SystemParametersInfo = "SystemParametersInfoW"
73Const _FuncName_TranslateAccelerator = "TranslateAcceleratorW"
74Const _FuncName_UnregisterClass = "UnregisterClassW"
75Const _FuncName_wsprintf = "wsprintfW"
76Const _FuncName_wvsprintf = "wvsprintfW"
77Const _FuncName_ChangeDisplaySettings = "ChangeDisplaySettingsW"
78Const _FuncName_ChangeDisplaySettingsEx= "ChangeDisplaySettingsExW"
79Const _FuncName_EnumDisplaySettings= "EnumDisplaySettingsW"
80Const _FuncName_EnumDisplaySettingsEx= "EnumDisplaySettingsExW"
81Const _FuncName_EnumDisplayDevices= "EnumDisplayDevicesW"
82#else
83Const _FuncName_CallWindowProc = "CallWindowProcA"
84Const _FuncName_CharLower = "CharLowerA"
85Const _FuncName_CharNext = "CharNextA"
86Const _FuncName_CharPrev = "CharPrevA"
87Const _FuncName_CharUpper = "CharUpperA"
88Const _FuncName_CreateAcceleratorTable = "CreateAcceleratorTableA"
89Const _FuncName_CreateWindowEx = "CreateWindowExA"
90Const _FuncName_DefDlgProc = "DefDlgProcA"
91Const _FuncName_DefWindowProc = "DefWindowProcA"
92Const _FuncName_DialogBoxIndirectParam = "DialogBoxIndirectParamA"
93Const _FuncName_DispatchMessage = "DispatchMessageA"
94Const _FuncName_DlgDirList = "DlgDirListA"
95Const _FuncName_DlgDirListComboBox = "DlgDirListComboBoxA"
96Const _FuncName_DlgDirSelectComboBoxEx = "DlgDirSelectComboBoxExA"
97Const _FuncName_DlgDirSelectEx = "DlgDirSelectExA"
98Const _FuncName_DrawText = "DrawTextA"
99Const _FuncName_DrawTextEx = "DrawTextExA"
100Const _FuncName_FindWindow = "FindWindowA"
101Const _FuncName_FindWindowEx = "FindWindowExA"
102Const _FuncName_GetClassInfoEx = "GetClassInfoExA"
103Const _FuncName_GetClassLong = "GetClassLongA"
104Const _FuncName_GetClassLongPtr = "GetClassLongPtrA"
105Const _FuncName_GetClassName = "GetClassNameA"
106Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameA"
107Const _FuncName_GetDlgItemText = "GetDlgItemTextA"
108Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoA"
109Const _FuncName_GetMessage = "GetMessageA"
110Const _FuncName_GetMonitorInfo = "GetMonitorInfoA"
111Const _FuncName_GetProp = "GetPropA"
112Const _FuncName_GetWindowLong = "GetWindowLongA"
113Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrA"
114Const _FuncName_GetWindowText = "GetWindowTextA"
115Const _FuncName_GetWindowTextLength = "GetWindowTextLengthA"
116Const _FuncName_GetWindowModuleFileName = "GetWindowModuleFileNameA"
117Const _FuncName_InsertMenuItem = "InsertMenuItemA"
118Const _FuncName_IsCharAlpha = "IsCharAlphaA"
119Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericA"
120Const _FuncName_IsCharLower = "IsCharLowerA"
121Const _FuncName_IsCharUpper = "IsCharUpperA"
122Const _FuncName_IsDialogMessage = "IsDialogMessageA"
123Const _FuncName_LoadBitmap = "LoadBitmapA"
124Const _FuncName_LoadCursor = "LoadCursorA"
125Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileA"
126Const _FuncName_LoadIcon = "LoadIconA"
127Const _FuncName_LoadImage = "LoadImageA"
128Const _FuncName_LoadString = "LoadStringA"
129Const _FuncName_MapVirtualKey = "MapVirtualKeyA"
130Const _FuncName_PeekMessage = "PeekMessageA"
131Const _FuncName_PostMessage = "PostMessageA"
132Const _FuncName_PostThreadMessage = "PostThreadMessageA"
133Const _FuncName_RegisterClassEx = "RegisterClassExA"
134Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatA"
135Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageA"
136Const _FuncName_RemoveProp = "RemovePropA"
137Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageA"
138Const _FuncName_SendMessage = "SendMessageA"
139Const _FuncName_SendNotifyMessage = "SendNotifyMessageA"
140Const _FuncName_SetDlgItemText = "SetDlgItemTextA"
141Const _FuncName_SetClassLong = "SetClassLongA"
142Const _FuncName_SetClassLongPtr = "SetClassLongPtrA"
143Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoA"
144Const _FuncName_SetProp = "SetPropA"
145Const _FuncName_SetWindowLong = "SetWindowLongA"
146Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrA"
147Const _FuncName_SetWindowsHookEx = "SetWindowsHookExA"
148Const _FuncName_SetWindowText = "SetWindowTextA"
149Const _FuncName_SystemParametersInfo = "SystemParametersInfoA"
150Const _FuncName_TranslateAccelerator = "TranslateAcceleratorA"
151Const _FuncName_UnregisterClass = "UnregisterClassA"
152Const _FuncName_wsprintf = "wsprintfA"
153Const _FuncName_wvsprintf = "wvsprintfA"
154Const _FuncName_ChangeDisplaySettings = "ChangeDisplaySettingsA"
155Const _FuncName_ChangeDisplaySettingsEx= "ChangeDisplaySettingsExA"
156Const _FuncName_EnumDisplaySettings= "EnumDisplaySettingsA"
157Const _FuncName_EnumDisplaySettingsEx= "EnumDisplaySettingsExA"
158Const _FuncName_EnumDisplayDevices= "EnumDisplayDevicesA"
159#endif
160
161Type _System_DeclareHandle_HDWP:unused As DWord:End Type
162TypeDef HDWP = *_System_DeclareHandle_HDWP
163
164TypeDef WNDPROC = *Function(hwnd As HWND, msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
165TypeDef DLGPROC = *Function(hwnd As HWND, msg As DWord, wParam As WPARAM, lParam As LPARAM) As LONG_PTR
166
167Type MSG
168 hwnd As HWND
169 message As DWord
170 wParam As WPARAM
171 lParam As LPARAM
172 time As DWord
173 pt As POINTAPI
174End Type
175
176Const IS_INTRESOURCE(_r) = ((((_r) As ULONG_PTR) >> 16) = 0)
177Const MAKEINTRESOURCEW(i) = ((((i) As Word) As ULONG_PTR) As PCWSTR)
178Const MAKEINTRESOURCEA(i) = ((((i) As Word) As ULONG_PTR) As PCSTR)
179Const MAKEINTRESOURCE(i) = ((((i) As Word) As ULONG_PTR) As PCTSTR)
180
181Const RT_CURSOR = MAKEINTRESOURCE(1)
182Const RT_BITMAP = MAKEINTRESOURCE(2)
183Const RT_ICON = MAKEINTRESOURCE(3)
184Const RT_MENU = MAKEINTRESOURCE(4)
185Const RT_DIALOG = MAKEINTRESOURCE(5)
186Const RT_STRING = MAKEINTRESOURCE(6)
187Const RT_FONTDIR = MAKEINTRESOURCE(7)
188Const RT_FONT = MAKEINTRESOURCE(8)
189Const RT_ACCELERATOR = MAKEINTRESOURCE(9)
190Const RT_RCDATA = MAKEINTRESOURCE(10)
191Const RT_MESSAGETABLE = MAKEINTRESOURCE(11)
192
193Const DIFFERENCE = 11
194Const RT_GROUP_CURSOR = MAKEINTRESOURCE((RT_CURSOR) As ULONG_PTR + DIFFERENCE)
195Const RT_GROUP_ICON = MAKEINTRESOURCE((RT_ICON) As ULONG_PTR + DIFFERENCE)
196Const RT_VERSION = MAKEINTRESOURCE(16)
197Const RT_DLGINCLUDE = MAKEINTRESOURCE(17)
198Const RT_PLUGPLAY = MAKEINTRESOURCE(19)
199Const RT_VXD = MAKEINTRESOURCE(20)
200Const RT_ANICURSOR = MAKEINTRESOURCE(21)
201Const RT_ANIICON = MAKEINTRESOURCE(22)
202Const RT_HTML = MAKEINTRESOURCE(23)
203Const RT_MANIFEST = MAKEINTRESOURCE(24)
204Const CREATEPROCESS_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(1)
205Const ISOLATIONAWARE_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(2)
206Const ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(3)
207Const MINIMUM_RESERVED_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(1)
208Const MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(16)
209
210TypeDef WNDENUMPROC = *Function(hwnd As HWND, lParam As LPARAM) As BOOL
211TypeDef HOOKPROC = *Function(code As Long, wParam As WPARAM, lParam As LPARAM) As LRESULT
212TypeDef MONITORENUMPROC = *Function(hm As HMONITOR, hdc As HDC, ByRef rc As RECT, dwData As LPARAM) As BOOL
213
214Const CS_VREDRAW = &H0001
215Const CS_HREDRAW = &H0002
216Const CS_DBLCLKS = &H0008
217Const CS_OWNDC = &H0020
218Const CS_CLASSDC = &H0040
219Const CS_PARENTDC = &H0080
220Const CS_NOCLOSE = &H0200
221Const CS_SAVEBITS = &H0800
222Const CS_BYTEALIGNCLIENT = &H1000
223Const CS_BYTEALIGNWINDOW = &H2000
224Const CS_GLOBALCLASS = &H4000
225Type WNDCLASSEXA
226 cbSize As DWord
227 style As DWord
228 lpfnWndProc As WNDPROC
229 cbClsExtra As Long
230 cbWndExtra As Long
231 hInstance As HINSTANCE
232 hIcon As HICON
233 hCursor As HCURSOR
234 hbrBackground As HBRUSH
235 lpszMenuName As LPCSTR
236 lpszClassName As LPCSTR
237 hIconSm As HICON
238End Type
239Type WNDCLASSEXW
240 cbSize As DWord
241 style As DWord
242 lpfnWndProc As WNDPROC
243 cbClsExtra As Long
244 cbWndExtra As Long
245 hInstance As HINSTANCE
246 hIcon As HICON
247 hCursor As HCURSOR
248 hbrBackground As HBRUSH
249 lpszMenuName As LPCWSTR
250 lpszClassName As LPCWSTR
251 hIconSm As HICON
252End Type
253#ifdef UNICODE
254TypeDef WNDCLASSEX = WNDCLASSEXW
255#else
256TypeDef WNDCLASSEX = WNDCLASSEXA
257#endif
258
259'------------------------
260' Dialog Box Command IDs
261Const IDOK = 1
262Const IDCANCEL = 2
263Const IDABORT = 3
264Const IDRETRY = 4
265Const IDIGNORE = 5
266Const IDYES = 6
267Const IDNO = 7
268Const IDCLOSE = 8
269Const IDHELP = 9
270
271
272'------------------------
273' Menu flags and structs
274Const MF_INSERT = &H00000000
275Const MF_CHANGE = &H00000080
276Const MF_APPEND = &H00000100
277Const MF_DELETE = &H00000200
278Const MF_REMOVE = &H00001000
279Const MF_BYCOMMAND = &H00000000
280Const MF_BYPOSITION = &H00000400
281Const MF_SEPARATOR = &H00000800
282Const MF_ENABLED = &H00000000
283Const MF_GRAYED = &H00000001
284Const MF_DISABLED = &H00000002
285Const MF_UNCHECKED = &H00000000
286Const MF_CHECKED = &H00000008
287Const MF_USECHECKBITMAPS = &H00000200
288Const MF_STRING = &H00000000
289Const MF_BITMAP = &H00000004
290Const MF_OWNERDRAW = &H00000100
291Const MF_POPUP = &H00000010
292Const MF_MENUBARBREAK = &H00000020
293Const MF_MENUBREAK = &H00000040
294Const MF_UNHILITE = &H00000000
295Const MF_HILITE = &H00000080
296Const MF_DEFAULT = &H00001000
297Const MF_SYSMENU = &H00002000
298Const MF_HELP = &H00004000
299Const MF_RIGHTJUSTIFY = &H00004000
300Const MF_MOUSESELECT = &H00008000
301
302Const MFS_GRAYED = &H00000003
303Const MFS_DISABLED = MFS_GRAYED
304Const MFS_CHECKED = MF_CHECKED
305Const MFS_HILITE = MF_HILITE
306Const MFS_ENABLED = MF_ENABLED
307Const MFS_UNCHECKED = MF_UNCHECKED
308Const MFS_UNHILITE = MF_UNHILITE
309Const MFS_DEFAULT = MF_DEFAULT
310Const MFS_MASK = &H0000108B
311Const MFS_HOTTRACKDRAWN = &H10000000
312Const MFS_CACHEDBMP = &H20000000
313Const MFS_BOTTOMGAPDROP = &H40000000
314Const MFS_TOPGAPDROP = &H80000000
315Const MFS_GAPDROP = &HC0000000
316
317Const MIIM_STATE = &H00000001
318Const MIIM_ID = &H00000002
319Const MIIM_SUBMENU = &H00000004
320Const MIIM_CHECKMARKS = &H00000008
321Const MIIM_TYPE = &H00000010
322Const MIIM_DATA = &H00000020
323Const MIIM_STRING = &H00000040
324Const MIIM_BITMAP = &H00000080
325Const MIIM_FTYPE = &H00000100
326Const MFT_STRING = MF_STRING
327Const MFT_BITMAP = MF_BITMAP
328Const MFT_MENUBARBREAK = MF_MENUBARBREAK
329Const MFT_MENUBREAK = MF_MENUBREAK
330Const MFT_OWNERDRAW = MF_OWNERDRAW
331Const MFT_RADIOCHECK = &H00000200
332Const MFT_SEPARATOR = MF_SEPARATOR
333Const MFT_RIGHTORDER = &H00002000
334Const MFT_RIGHTJUSTIFY = MF_RIGHTJUSTIFY
335
336Type MENUITEMINFOW
337 cbSize As DWord
338 fMask As DWord
339 fType As DWord
340 fState As DWord
341 wID As DWord
342 hSubMenu As HMENU
343 hbmpChecked As HBITMAP
344 hbmpUnchecked As HBITMAP
345 dwItemData As ULONG_PTR
346 dwTypeData As LPWSTR
347 cch As DWord
348End Type
349Type MENUITEMINFOA
350 cbSize As DWord
351 fMask As DWord
352 fType As DWord
353 fState As DWord
354 wID As DWord
355 hSubMenu As HMENU
356 hbmpChecked As HBITMAP
357 hbmpUnchecked As HBITMAP
358 dwItemData As ULONG_PTR
359 dwTypeData As LPSTR
360 cch As DWord
361End Type
362#ifdef UNICODE
363TypeDef MENUITEMINFO = MENUITEMINFOW
364#else
365TypeDef MENUITEMINFO = MENUITEMINFOA
366#endif
367
368'------------
369' Scroll Bar
370Const SB_HORZ = 0
371Const SB_VERT = 1
372Const SB_CTL = 2
373Const SB_BOTH = 3
374
375' SCROLLINFO struct
376Const SIF_RANGE = &H0001
377Const SIF_PAGE = &H0002
378Const SIF_POS = &H0004
379Const SIF_DISABLENOSCROLL = &H0008
380Const SIF_TRACKPOS = &H0010
381Const SIF_ALL = SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS
382Type SCROLLINFO
383 cbSize As DWord
384 fMask As DWord
385 nMin As Long
386 nMax As Long
387 nPage As DWord
388 nPos As Long
389 nTrackPos As Long
390End Type
391
392
393' combo box
394Const CB_ERR = -1
395Const CB_ERRSPACE = -2
396
397
398' Clipboard Formats
399Const CF_TEXT = 1
400Const CF_BITMAP = 2
401Const CF_METAFILEPICT = 3
402Const CF_SYLK = 4
403Const CF_DIF = 5
404Const CF_TIFF = 6
405Const CF_OEMTEXT = 7
406Const CF_DIB = 8
407Const CF_PALETTE = 9
408Const CF_PENDATA = 10
409Const CF_RIFF = 11
410Const CF_WAVE = 12
411Const CF_UNICODETEXT = 13
412Const CF_ENHMETAFILE = 14
413Const CF_HDROP = 15
414Const CF_LOCALE = 16
415Const CF_MAX = 17
416Const CF_OWNERDISPLAY = &H0080
417Const CF_DSPTEXT = &H0081
418Const CF_DSPBITMAP = &H0082
419Const CF_DSPMETAFILEPICT = &H0083
420Const CF_DSPENHMETAFILE = &H008E
421Const CF_PRIVATEFIRST = &H0200
422Const CF_PRIVATELAST = &H02FF
423Const CF_GDIOBJFIRST = &H0300
424Const CF_GDIOBJLAST = &H03FF
425
426'-------------
427' Window API
428
429Declare Function AdjustWindowRect Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL) As BOOL
430Declare Function AdjustWindowRectEx Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL, dwExStyle As DWord) As BOOL
431Declare Function AnyPopup Lib "user32" () As BOOL
432Declare Function ArrangeIconicWindows Lib "user32" (hWnd As HWND) As DWord
433
434Type PAINTSTRUCT
435 hdc As HDC
436 fErase As BOOL
437 rcPaint As RECT
438 fRestore As BOOL
439 fIncUpdate As BOOL
440 rgbReserved[ELM(32)] As Byte
441End Type
442Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef Paint As PAINTSTRUCT) As HDC
443Declare Function BringWindowToTop Lib "user32" (hWnd As HWND) As Long
444
445Declare Function CallNextHookEx Lib "user32" (hHook As HHOOK, nCode As Long, wParam As WPARAM, lParam As LPARAM) As LRESULT
446Function DefHookProc(ByVal nCode As Long, ByVal wParam As WPARAM, ByVal lParam As LPARAM, ByVal phhk As *HHOOK) As LRESULT
447 Return CallNextHookEx(phhk[0], nCode, wParam, lParam)
448End Function
449
450Declare Function CallWindowProc Lib "user32" Alias _FuncName_CallWindowProc (lpPrevWndFunc As WNDPROC, hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
451Declare Function ChangeClipboardChain Lib "user32" (hwndRemove As HWND, hwndNewNext As HWND) As BOOL
452Declare Function CharLower Lib "user32" Alias _FuncName_CharLower (psz As PTSTR) As DWord
453Declare Function CharNext Lib "user32" Alias _FuncName_CharNext (lpszCurrent As LPCTSTR) As LPTSTR
454Declare Function CharNextExA Lib "user32" (CodePage As Word, lpCurrentChar As LPCSTR, dwFlags As DWord) As LPSTR
455Declare Function CharPrev Lib "user32" Alias _FuncName_CharPrev (lpszStart As LPCTSTR, lpszCurrent As LPCTSTR) As LPTSTR
456Declare Function CharPrevExA Lib "user32" (CodePage As Word, lpStart As LPCSTR, lpCurrentChar As LPCSTR, dwFlags As DWord) As LPSTR
457Declare Function CharUpper Lib "user32" Alias _FuncName_CharUpper (psz As PTSTR) As DWord
458Declare Function CheckMenuItem Lib "user32" (hMenu As HMENU, uIDCheckItem As DWord, uCheck As DWord) As DWord
459Declare Function CheckMenuRadioItem Lib "user32" (hMenu As HMENU, idFirst As DWord, idLast As DWord, idCheck As DWord, uFlags As DWord) As BOOL
460Declare Function CheckDlgButton Lib "user32" (hDlg As HWND, nIDButton As Long, uCheck As DWord) As BOOL
461Declare Function CheckRadioButton Lib "user32" (hDlg As HWND, nIDFirstButton As Long, nIDLastButton As Long, nIDCheckButton As Long) As BOOL
462Declare Function ChildWindowFromPoint Lib "user32" (hWndParent As HWND, x As Long, y As Long) As HWND
463Const CWP_ALL = &H0000
464Const CWP_SKIPINVISIBLE = &H0001
465Const CWP_SKIPDISABLED = &H0002
466Const CWP_SKIPTRANSPARENT = &H0004
467Declare Function ChildWindowFromPointEx Lib "user32" (hWndParent As HWND, x As Long, y As Long, uFlags As DWord) As HWND
468
469Declare Function ClientToScreen Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
470Declare Function ClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
471Declare Function CloseClipboard Lib "user32" () As BOOL
472Declare Function CloseWindow Lib "user32" (hWnd As HWND) As BOOL
473Declare Function CopyImage Lib "user32" (hImage As HANDLE, uType As DWord, cxDesired As Long, cyDesired As Long, fuFlags As DWord) As HANDLE
474Declare Function CountClipboardFormats Lib "user32" () As Long
475Const FVIRTKEY = &H01
476Const FNOINVERT = &H02
477Const FSHIFT = &H04
478Const FCONTROL = &H08
479Const FALT = &H10
480Type ACCEL
481 fVirt As Byte
482 key As Word
483 cmd As Word
484End Type
485Declare Function CreateAcceleratorTable Lib "user32" Alias _FuncName_CreateAcceleratorTable (ByRef acl As ACCEL, i As Long) As HACCEL
486Declare Function CreateCaret Lib "user32" (hWnd As HWND, hBitmap As HBITMAP, nWidth As Long, nHeight As Long) As BOOL
487Declare Function CreateCursor Lib "user32" (hInst As HINSTANCE, xHotSpot As Long, yHotSpot As Long, nWidth As Long, nHeight As Long, pvANDPlane As VoidPtr, pvXORPlane As VoidPtr) As HCURSOR
488Declare Function CreateIcon Lib "user32" (hInst As HINSTANCE, nWidth As Long, nHeight As Long, cPlanes As Byte, cBitsPixel As Byte, lpbANDbits As VoidPtr, lpbXORbits As VoidPtr) As HICON
489Declare Function LookupIconIdFromDirectory Lib "user32" (ByVal presbits As *BYTE, ByVal fIcon As BOOL) As Long
490Declare Function LookupIconIdFromDirectoryEx Lib "user32" (ByVal presbits As *BYTE, ByVal fIcon As BOOL, ByVal cxDesired As Long, ByVal cyDesired As Long, ByVal Flags As DWord) As Long
491
492Type ICONINFO
493 fIcon As BOOL
494 xHotspot As DWord
495 yHotspot As DWord
496 hbmMask As HBITMAP
497 hbmColor As HBITMAP
498End Type
499Declare Function CreateIconIndirect Lib "user32" (ByRef pIconInfo As ICONINFO) As HICON
500
501Declare Function CreateMenu Lib "user32" () As HMENU
502Declare Function CreatePopupMenu Lib "user32" () As HMENU
503
504Const CW_USEDEFAULT = &H80000000
505Declare Function CreateWindowEx Lib "user32" Alias _FuncName_CreateWindowEx (dwExStyle As DWord, pClassName As PCTSTR, lpWindowName As PCTSTR, dwStyle As DWord, x As Long, y As Long, nWidth As Long, nHeight As Long, hwndParent As HWND, hmenu As HMENU, hInstance As HINSTANCE, pParm As VoidPtr) As HWND
506
507Declare Function CreateMDIWindowA Lib "user32" (ByVal lpClassName As LPCSTR, ByVal lpWindowName As LPCSTR, ByVal dwStyle As DWord, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As HWND, ByVal hInstance As HINSTANCE, ByVal lParam As LPARAM) As HWND
508Declare Function CreateMDIWindowW Lib "user32" (ByVal lpClassName As LPCWSTR, ByVal lpWindowName As LPCWSTR, ByVal dwStyle As DWord, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As HWND, ByVal hInstance As HINSTANCE, ByVal lParam As LPARAM) As HWND
509#ifdef UNICODE
510Declare Function CreateMDIWindow Lib "user32" Alias "CreateMDIWindowW" (ByVal lpClassName As LPCWSTR, ByVal lpWindowName As LPCWSTR, ByVal dwStyle As DWord, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As HWND, ByVal hInstance As HINSTANCE, ByVal lParam As LPARAM) As HWND
511#else
512Declare Function CreateMDIWindow Lib "user32" Alias "CreateMDIWindowA" (ByVal lpClassName As LPCSTR, ByVal lpWindowName As LPCSTR, ByVal dwStyle As DWord, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As HWND, ByVal hInstance As HINSTANCE, ByVal lParam As LPARAM) As HWND
513#endif ' !UNICODE
514
515Declare Function DefDlgProc Lib "user32" Alias _FuncName_DefWindowProc (hDlg As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
516Declare Function DefWindowProc Lib "user32" Alias _FuncName_DefWindowProc (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
517
518Declare Function DefFrameProcA Lib "user32" (ByRef hWnd As HWND, ByRef hWndMDIClient As HWND, ByVal uMsg As DWord, ByVal wParam As WPARAM, ByVal lParam As LPARAM) As LRESULT
519Declare Function DefFrameProcW Lib "user32" (ByRef hWnd As HWND, ByRef hWndMDIClient As HWND, ByVal uMsg As DWord, ByVal wParam As WPARAM, ByVal lParam As LPARAM) As LRESULT
520#ifdef UNICODE
521Declare Function DefFrameProc Lib "user32" Alias "DefFrameProcW" (ByRef hWnd As HWND, ByRef hWndMDIClient As HWND, ByVal uMsg As DWord, ByVal wParam As WPARAM, ByVal lParam As LPARAM) As LRESULT
522#else
523Declare Function DefFrameProc Lib "user32" Alias "DefFrameProcA" (ByRef hWnd As HWND, ByRef hWndMDIClient As HWND, ByVal uMsg As DWord, ByVal wParam As WPARAM, ByVal lParam As LPARAM) As LRESULT
524#endif ' !UNICODE
525
526Declare Function DefMDIChildProcA Lib "user32" (ByVal hWnd As HWND, ByVal uMsg As DWord, ByVal wParam As WPARAM, ByVal lParam As LPARAM) As LRESULT
527Declare Function DefMDIChildProcW Lib "user32" (ByVal hWnd As HWND, ByVal uMsg As DWord, ByVal wParam As WPARAM, ByVal lParam As LPARAM) As LRESULT
528#ifdef UNICODE
529Declare Function DefMDIChildProc Lib "user32" Alias "DefMDIChildProcW" (ByVal hWnd As HWND, ByVal uMsg As DWord, ByVal wParam As WPARAM, ByVal lParam As LPARAM) As LRESULT
530#else
531Declare Function DefMDIChildProc Lib "user32" Alias "DefMDIChildProcA" (ByVal hWnd As HWND, ByVal uMsg As DWord, ByVal wParam As WPARAM, ByVal lParam As LPARAM) As LRESULT
532#endif ' !UNICODE
533
534Declare Function DeleteMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
535Declare Function DestroyAcceleratorTable Lib "user32" (hAccel As HACCEL) As BOOL
536
537Declare Function TranslateMDISysAccel Lib "user32" (ByVal hWndClient As HWND, ByRef lpMsg As MSG) As BOOL
538Declare Function ArrangeIconicWindows Lib "user32" (ByVal hWnd As HWND) As DWord
539Declare Function TileWindows Lib "user32" (ByVal hwndParent As HWND, ByVal wHow As DWord, ByRef lpRect As RECT, ByVal cKids As DWord, ByVal lpKids As *HWND) As Word
540Declare Function CascadeWindows Lib "user32" (ByVal hwndParent As HWND, ByVal wHow As DWord, ByRef lpRect As RECT, ByVal cKids As DWord, ByVal lpKids As *HWND) As Word
541
542Declare Function DestroyCaret Lib "user32" () As BOOL
543Declare Function DestroyCursor Lib "user32" (hCursor As HCURSOR) As BOOL
544Declare Function DestroyIcon Lib "user32" (hIcon As HICON) As BOOL
545Declare Function DestroyMenu Lib "user32" (hMenu As HMENU) As BOOL
546Declare Function DestroyWindow Lib "user32" (hWnd As HWND) As BOOL
547Type DLGITEMTEMPLATE
548 style As DWord
549 dwExtendedStyle As DWord
550 x As Integer
551 y As Integer
552 cx As Integer
553 cy As Integer
554 id As Word
555End Type
556Type DLGTEMPLATE
557 style As DWord
558 dwExtendedStyle As DWord
559 cdit As Word
560 x As Integer
561 y As Integer
562 cx As Integer
563 cy As Integer
564End Type
565Declare Function DialogBoxIndirectParam Lib "user32" Alias _FuncName_DialogBoxIndirectParam (hInstance As HINSTANCE, DialogTemplate As *DLGTEMPLATE, hwndParent As HWND, pDialogFunc As DLGPROC, InitParam As LPARAM) As LONG_PTR
566Declare Function MapDialogRect Lib "user32" (ByVal hDlg As HWND, ByRef lpRect As RECT) As BOOL
567Declare Function DispatchMessage Lib "user32" Alias _FuncName_DispatchMessage (ByRef Msg As MSG) As LRESULT
568Declare Function DlgDirList Lib "user32" Alias _FuncName_DlgDirList (hDlg As HWND, lpPathSpec As LPTSTR, nIDListBox As Long, nIDStaticPath As Long, uFileType As DWord) As Long
569Declare Function DlgDirListComboBox Lib "user32" Alias _FuncName_DlgDirListComboBox (hDlg As HWND, lpPathSpec As LPTSTR, nIDComboBox As Long, nIDStaticPath As Long,uFileType As DWord) As Long
570Declare Function DlgDirSelectComboBoxEx Lib "user32" Alias _FuncName_DlgDirSelectComboBoxEx (hDlg As HWND, lpString As LPTSTR, nCount As Long, nIDComboBox As Long) As BOOL
571Declare Function DlgDirSelectEx Lib "user32" Alias _FuncName_DlgDirSelectEx (hDlg As HWND, lpString As LPTSTR, nCount As Long, nIDListBox As Long) As BOOL
572Const BDR_RAISEDOUTER = &H0001
573Const BDR_SUNKENOUTER = &H0002
574Const BDR_RAISEDINNER = &H0004
575Const BDR_SUNKENINNER = &H0008
576Const BDR_OUTER = &H0003
577Const BDR_INNER = &H000c
578Const EDGE_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER
579Const EDGE_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER
580Const EDGE_ETCHED = BDR_SUNKENOUTER or BDR_RAISEDINNER
581Const EDGE_BUMP = BDR_RAISEDOUTER or BDR_SUNKENINNER
582Const BF_LEFT = &H0001
583Const BF_TOP = &H0002
584Const BF_RIGHT = &H0004
585Const BF_BOTTOM = &H0008
586Const BF_TOPLEFT = BF_TOP or BF_LEFT
587Const BF_TOPRIGHT = BF_TOP or BF_RIGHT
588Const BF_BOTTOMLEFT = BF_BOTTOM or BF_LEFT
589Const BF_BOTTOMRIGHT = BF_BOTTOM or BF_RIGHT
590Const BF_RECT = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM
591Const BF_DIAGONAL = &H0010
592Const BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL or BF_TOP or BF_RIGHT
593Const BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL or BF_TOP or BF_LEFT
594Const BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL or BF_BOTTOM or BF_LEFT
595Const BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT
596Const BF_MIDDLE = &H0800
597Const BF_SOFT = &H1000
598Const BF_ADJUST = &H2000
599Const BF_FLAT = &H4000
600Const BF_MONO = &H8000
601Declare Function DrawEdge Lib "user32" (hdc As HDC, ByRef lpRect As RECT, edge As DWord, grfFlags As DWord) As BOOL
602
603Const DFC_CAPTION = 1
604Const DFC_MENU = 2
605Const DFC_SCROLL = 3
606Const DFC_BUTTON = 4
607Const DFC_POPUPMENU = 5
608Const DFCS_CAPTIONCLOSE = &H0000
609Const DFCS_CAPTIONMIN = &H0001
610Const DFCS_CAPTIONMAX = &H0002
611Const DFCS_CAPTIONRESTORE = &H0003
612Const DFCS_CAPTIONHELP = &H0004
613Const DFCS_MENUARROW = &H0000
614Const DFCS_MENUCHECK = &H0001
615Const DFCS_MENUBULLET = &H0002
616Const DFCS_MENUARROWRIGHT = &H0004
617Const DFCS_SCROLLUP = &H0000
618Const DFCS_SCROLLDOWN = &H0001
619Const DFCS_SCROLLLEFT = &H0002
620Const DFCS_SCROLLRIGHT = &H0003
621Const DFCS_SCROLLCOMBOBOX = &H0005
622Const DFCS_SCROLLSIZEGRIP = &H0008
623Const DFCS_SCROLLSIZEGRIPRIGHT = &H0010
624Const DFCS_BUTTONCHECK = &H0000
625Const DFCS_BUTTONRADIOIMAGE = &H0001
626Const DFCS_BUTTONRADIOMASK = &H0002
627Const DFCS_BUTTONRADIO = &H0004
628Const DFCS_BUTTON3STATE = &H0008
629Const DFCS_BUTTONPUSH = &H0010
630Const DFCS_INACTIVE = &H0100
631Const DFCS_PUSHED = &H0200
632Const DFCS_CHECKED = &H0400
633Const DFCS_TRANSPARENT = &H0800
634Const DFCS_HOT = &H1000
635Const DFCS_ADJUSTRECT = &H2000
636Const DFCS_FLAT = &H4000
637Const DFCS_MONO = &H8000
638Declare Function DrawFrameControl Lib "user32" (hdc As HDC, ByRef lpRect As RECT, uType As DWord, uState As DWord) As BOOL
639
640Declare Function DrawIcon Lib "user32" (hdc As HDC, x As Long, y As Long, hIcon As HICON) As BOOL
641
642Const DI_MASK = &H0001
643Const DI_IMAGE = &H0002
644Const DI_NORMAL = &H0003
645Const DI_COMPAT = &H0004
646Const DI_DEFAULTSIZE = &H0008
647Declare Function DrawIconEx Lib "user32" (hdc As HDC, xLeft As Long, yTop As Long, hIcon As HICON, cxWidth As Long, cyWidth As Long, istepIfAniCur As DWord, hbrFlickerFreeDraw As HBRUSH, diFlags As DWord) As BOOL
648
649Declare Function DrawMenuBar Lib "user32" (hwnd As HWND) As BOOL
650
651Type DROPSTRUCT
652 hwndSource As HWND
653 hwndSink As HWND
654 wFmt As DWord
655 dwData As ULONG_PTR
656 ptDrop As POINTAPI
657 dwControlData As DWord
658End Type
659TypeDef PDROPSTRUCT= *DROPSTRUCT
660TypeDef LPDROPSTRUCT= *DROPSTRUCT
661
662Const DOF_EXECUTABLE = &H8001
663Const DOF_DOCUMENT = &H8002
664Const DOF_DIRECTORY = &H8003
665Const DOF_MULTIPLE = &H8004
666Const DOF_PROGMAN = &H0001
667Const DOF_SHELLDATA = &H0002
668
669Const DO_DROPFILE = &H454C4946
670Const DO_PRINTFILE = &H544E5250
671
672Declare Function DragObject Lib "user32" (ByVal hwndParent As HWND, ByVal hwndFrom As HWND, ByVal fmt As DWord, ByVal data As ULONG_PTR, ByVal hcur As HCURSOR) As DWord
673Declare Function DragDetect Lib "user32" (ByVal hwnd As HWND, ByRef pt As POINTAPI) As BOOL
674
675
676Const DT_TOP = &H00000000
677Const DT_LEFT = &H00000000
678Const DT_CENTER = &H00000001
679Const DT_RIGHT = &H00000002
680Const DT_VCENTER = &H00000004
681Const DT_BOTTOM = &H00000008
682Const DT_WORDBREAK = &H00000010
683Const DT_SINGLELINE = &H00000020
684Const DT_EXPANDTABS = &H00000040
685Const DT_TABSTOP = &H00000080
686Const DT_NOCLIP = &H00000100
687Const DT_EXTERNALLEADING =&H00000200
688Const DT_CALCRECT = &H00000400
689Const DT_NOPREFIX = &H00000800
690Const DT_INTERNAL = &H00001000
691Const DT_EDITCONTROL = &H00002000
692Const DT_PATH_ELLIPSIS = &H00004000
693Const DT_END_ELLIPSIS = &H00008000
694Const DT_MODIFYSTRING = &H00010000
695Const DT_RTLREADING = &H00020000
696Const DT_WORD_ELLIPSIS = &H00040000
697Declare Function DrawText Lib "user32" Alias _FuncName_DrawText (hdc As HDC, lpStr As PCTSTR, nCount As Long, ByRef Rect As RECT, dwFormat As DWord) As BOOL
698
699Type DRAWTEXTPARAMS
700 cbSize As DWord
701 iTabLength As Long
702 iLeftMargin As Long
703 iRightMargin As Long
704 uiLengthDrawn As DWord
705End Type
706Declare Function DrawTextEx Lib "user32" Alias _FuncName_DrawTextEx (hdc As HDC, pchText As PCTSTR, cchText As Long, ByRef Rect As RECT, dwDTFormat As DWord, ByRef DTParams As DRAWTEXTPARAMS) As BOOL
707
708TypeDef GRAYSTRINGPROC = *Function(hDC As HDC, lParam As LPARAM, l As Long) As BOOL
709
710Declare Function GrayStringA Lib "user32" (ByVal hDC As HDC, ByVal hBrush As HBRUSH, ByVal lpOutputFunc As GRAYSTRINGPROC, ByVal lpData As LPARAM, ByVal nCount As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long) As BOOL
711Declare Function GrayStringW Lib "user32" (ByVal hDC As HDC, ByVal hBrush As HBRUSH, ByVal lpOutputFunc As GRAYSTRINGPROC, ByVal lpData As LPARAM, ByVal nCount As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long) As BOOL
712#ifdef UNICODE
713Declare Function GrayString Lib "user32" Alias "GrayStringW" (ByVal hDC As HDC, ByVal hBrush As HBRUSH, ByVal lpOutputFunc As GRAYSTRINGPROC, ByVal lpData As LPARAM, ByVal nCount As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long) As BOOL
714#else
715Declare Function GrayString Lib "user32" Alias "GrayStringA" (ByVal hDC As HDC, ByVal hBrush As HBRUSH, ByVal lpOutputFunc As GRAYSTRINGPROC, ByVal lpData As LPARAM, ByVal nCount As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long) As BOOL
716#endif ' !UNICODE
717
718Const DST_COMPLEX = &H0000
719Const DST_TEXT = &H0001
720Const DST_PREFIXTEXT = &H0002
721Const DST_ICON = &H0003
722Const DST_BITMAP = &H0004
723
724Const DSS_NORMAL = &H0000
725Const DSS_UNION = &H0010
726Const DSS_DISABLED = &H0020
727Const DSS_MONO = &H0080
728Const DSS_HIDEPREFIX = &H0200
729Const DSS_PREFIXONLY = &H0400
730Const DSS_RIGHT = &H8000
731
732TypeDef DRAWSTATEPROC = *Function(hdc As HDC, lData As LPARAM, wData As WPARAM, cx As Long, cy As Long) As BOOL
733
734Declare Function DrawStateA Lib "user32" (ByVal hdc As HDC, ByVal hbrFore As HBRUSH, ByVal qfnCallBack As DRAWSTATEPROC, ByVal lData As LPARAM, ByVal wData As WPARAM, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal uFlags As DWord) As BOOL
735Declare Function DrawStateW Lib "user32" (ByVal hdc As HDC, ByVal hbrFore As HBRUSH, ByVal qfnCallBack As DRAWSTATEPROC, ByVal lData As LPARAM, ByVal wData As WPARAM, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal uFlags As DWord) As BOOL
736#ifdef UNICODE
737Declare Function DrawState Lib "user32" Alias "DrawStateW" (ByVal hdc As HDC, ByVal hbrFore As HBRUSH, ByVal qfnCallBack As DRAWSTATEPROC, ByVal lData As LPARAM, ByVal wData As WPARAM, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal uFlags As DWord) As BOOL
738#else
739Declare Function DrawState Lib "user32" Alias "DrawStateA" (ByVal hdc As HDC, ByVal hbrFore As HBRUSH, ByVal qfnCallBack As DRAWSTATEPROC, ByVal lData As LPARAM, ByVal wData As WPARAM, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal uFlags As DWord) As BOOL
740#endif ' !UNICODE
741
742Declare Function TabbedTextOutA Lib "user32" (ByVal hdc As HDC, ByVal x As Long, ByVal y As Long, ByVal lpString As LPCSTR, ByVal chCount As Long, ByVal nTabPositions As Long, ByVal lpnTabStopPositions As *Long, ByVal nTabOrigin As Long) As Long
743Declare Function TabbedTextOutW Lib "user32" (ByVal hdc As HDC, ByVal x As Long, ByVal y As Long, ByVal lpString As LPCWSTR, ByVal chCount As Long, ByVal nTabPositions As Long, ByVal lpnTabStopPositions As *Long, ByVal nTabOrigin As Long) As Long
744#ifdef UNICODE
745Declare Function TabbedTextOut Lib "user32" Alias "TabbedTextOutW" (ByVal hdc As HDC, ByVal x As Long, ByVal y As Long, ByVal lpString As LPCWSTR, ByVal chCount As Long, ByVal nTabPositions As Long, ByVal lpnTabStopPositions As *Long, ByVal nTabOrigin As Long) As Long
746#else
747Declare Function TabbedTextOut Lib "user32" Alias "TabbedTextOutA" (ByVal hdc As HDC, ByVal x As Long, ByVal y As Long, ByVal lpString As LPCSTR, ByVal chCount As Long, ByVal nTabPositions As Long, ByVal lpnTabStopPositions As *Long, ByVal nTabOrigin As Long) As Long
748#endif ' !UNICODE
749
750Declare Function GetTabbedTextExtentA Lib "user32" (ByVal hdc As HDC, ByVal lpString As LPCSTR, ByVal chCount As Long, ByVal nTabPositions As Long, ByVal lpnTabStopPositions As *Long) As DWord
751Declare Function GetTabbedTextExtentW Lib "user32" (ByVal hdc As HDC, ByVal lpString As LPCWSTR, ByVal chCount As Long, ByVal nTabPositions As Long, ByVal lpnTabStopPositions As *Long) As DWord
752#ifdef UNICODE
753Declare Function GetTabbedTextExtent Lib "user32" Alias "GetTabbedTextExtentW" (ByVal hdc As HDC, ByVal lpString As LPCWSTR, ByVal chCount As Long, ByVal nTabPositions As Long, ByVal lpnTabStopPositions As *Long) As DWord
754#else
755Declare Function GetTabbedTextExtent Lib "user32" Alias "GetTabbedTextExtentA" (ByVal hdc As HDC, ByVal lpString As LPCSTR, ByVal chCount As Long, ByVal nTabPositions As Long, ByVal lpnTabStopPositions As *Long) As DWord
756#endif ' !UNICODE
757
758Declare Function EmptyClipboard Lib "user32" () As BOOL
759Declare Function EnableMenuItem Lib "user32" (hMenu As HMENU, uIDEnableItem As DWord, uEnable As DWord) As BOOL
760
761Const ESB_ENABLE_BOTH = &H0000
762Const ESB_DISABLE_BOTH = &H0003
763Const ESB_DISABLE_LEFT = &H0001
764Const ESB_DISABLE_RIGHT = &H0002
765Const ESB_DISABLE_UP = &H0001
766Const ESB_DISABLE_DOWN = &H0002
767Const ESB_DISABLE_LTUP = ESB_DISABLE_LEFT
768Const ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT
769Declare Function EnableScrollBar Lib "user32" (hWnd As HWND, dwSBflags As DWord, dwArrows As DWord) As BOOL
770
771Declare Function EnableWindow Lib "user32" (hWnd As HWND, bEnable As BOOL) As BOOL
772Declare Function EndDialogAPI Lib "user32" Alias "EndDialog" (hwndDlg As HWND, nRet As Long) As BOOL
773Declare Function EndPaint Lib "user32" (hWnd As HWND, ByRef lpPaint As PAINTSTRUCT) As BOOL
774Declare Function EnumClipboardFormats Lib "user32" (uFormat As DWord) As DWord
775Declare Function EnumChildWindows Lib "user32" (hwndParent As HWND, pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
776Declare Function EnumDisplayMonitors Lib "user32.dll" (ByVal hdc As HDC, lprcClip As *RECT, ByVal lpfnEnum As MONITORENUMPROC, dwData As LPARAM) As BOOL
777Declare Function EnumThreadWindows Lib "user32" (dwThreadId As DWord, pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
778Declare Function EnumWindows Lib "user32" (pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
779Declare Function ExitWindowsEx Lib "user32" (uFlags As DWord, dwReserved As DWord) As BOOL
780Declare Function FillRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As BOOL
781
782Declare Function DrawFocusRect Lib "user32" (ByVal hDC As HDC, ByRef lprc As RECT) As BOOL
783
784Declare Function FindWindow Lib "user32" Alias _FuncName_FindWindow (pClassName As PCTSTR, lpWindowName As PCTSTR) As HWND
785Declare Function FindWindowEx Lib "user32" Alias _FuncName_FindWindowEx (hwndParent As HWND, hwndChildAfter As HWND, pszClass As PCTSTR, pszWindow As PCTSTR) As HWND
786Declare Function FlashWindow Lib "user32" (hWnd As HWND, bInvert As BOOL) As BOOL
787Const FLASHW_STOP = 0
788Const FLASHW_CAPTION = 1
789Const FLASHW_TRAY = 2
790Const FLASHW_ALL = (FLASHW_CAPTION Or FLASHW_TRAY)
791Const FLASHW_TIMER = 4
792Const FLASHW_TIMERNOFG = 12
793Type FLASHWINFO
794 cbSize As DWord
795 hWnd As HWND
796 dwFlags As DWord
797 uCount As DWord
798 dwTimeout As DWord
799End Type
800Declare Function FlashWindowEx Lib "user32" (ByRef fwi As FLASHWINFO) As Long
801Declare Function FrameRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As Long
802Declare Function GetActiveWindow Lib "user32" () As HWND
803Declare Function GetAsyncKeyState Lib "user32" (vKey As Long) As Integer
804Declare Function GetCapture Lib "user32" () As HWND
805Declare Function GetCaretPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
806Declare Function GetClassInfoEx Lib "user32" Alias _FuncName_GetClassInfoEx (hInst As HINSTANCE, pszClass As PCTSTR, ByRef lpwcx As WNDCLASSEX) As BOOL
807
808Const GCL_MENUNAME = -8
809Const GCL_HBRBACKGROUND = -10
810Const GCL_HCURSOR = -12
811Const GCL_HICON = -14
812Const GCL_HMODULE = -16
813Const GCL_CBWNDEXTRA = -18
814Const GCL_CBCLSEXTRA = -20
815Const GCL_WNDPROC = -24
816Const GCL_STYLE = -26
817Const GCW_ATOM = -32
818Const GCL_HICONSM = -34
819#ifdef _WIN64
820Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
821Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
822#else
823Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
824Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
825#endif
826
827Declare Function GetClassName Lib "user32" Alias _FuncName_GetClassName (hWnd As HWND, lpClassName As PTSTR, nMaxCount As Long) As Long
828Declare Function GetClientRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
829Declare Function GetClipboardData Lib "user32" (uFormat As DWord) As HANDLE
830Declare Function GetClipboardFormatName Lib "user32" Alias _FuncName_GetClipboardFormatName (uFormat As DWord, pszFormatName As PTSTR, cchMaxCount As Long) As BOOL
831Declare Function GetClipboardOwner Lib "user32" () As HWND
832Declare Function GetClipboardViewer Lib "user32" () As HWND
833Declare Function GetClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
834Declare Function GetCursor Lib "user32" () As HCURSOR
835Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
836Declare Function GetDC Lib "user32" (hWnd As HWND) As HDC
837
838Const DCX_WINDOW = &H00000001
839Const DCX_CACHE = &H00000002
840Const DCX_NORESETATTRS = &H00000004
841Const DCX_CLIPCHILDREN = &H00000008
842Const DCX_CLIPSIBLINGS = &H00000010
843Const DCX_PARENTCLIP = &H00000020
844Const DCX_EXCLUDERGN = &H00000040
845Const DCX_INTERSECTRGN = &H00000080
846Const DCX_EXCLUDEUPDATE = &H00000100
847Const DCX_INTERSECTUPDATE = &H00000200
848Const DCX_LOCKWINDOWUPDATE = &H00000400
849Const DCX_VALIDATE = &H00200000
850Declare Function GetDCEx Lib "user32" (hWnd As HWND, hrgnClip As HRGN, dwFlags As DWord) As HDC
851
852Declare Function GetDesktopWindow Lib "user32" () As HWND
853Declare Function GetDialogBaseUnits Lib "user32" () As Long
854Declare Function GetDlgCtrlID Lib "user32" (hWnd As HWND) As Long
855Declare Function GetDlgItem Lib "user32" (hDlg As HWND, nIDDlgItem As Long) As HWND
856Declare Function GetDlgItemInt Lib "user32" (hDlg As HWND, nIDDlgItem As Long, lpTranslated As *BOOL, bSigned As BOOL) As DWord
857Declare Function GetDlgItemText Lib "user32" Alias _FuncName_GetDlgItemText (hDlg As HWND, nIDDlgItem As Long, pString As PTSTR, nMaxCount As Long) As Long
858Declare Function GetDoubleClickTime Lib "user32" () As DWord
859Declare Function GetFocus Lib "user32" () As HWND
860Declare Function GetForegroundWindow Lib "user32" () As HWND
861Declare Function GetIconInfo Lib "user32" (hIcon As HICON, ByRef pIconInfo As ICONINFO) As Long
862Declare Function GetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
863Declare Function GetKeyState Lib "user32" (nVirtKey As Long) As Integer
864Declare Function GetListBoxInfo Lib "user32" (ByVal hwnd As HWND) As DWord
865Declare Function GetMenu Lib "user32" (hWnd As HWND) As HMENU
866
867Declare Function GetMenuContextHelpId Lib "user32" (hmenu As HMENU) As DWord
868Const GMDI_USEDISABLED = &H0001
869Const GMDI_GOINTOPOPUPS = &H0002
870Declare Function GetMenuDefaultItem Lib "user32" (hMenu As HMENU, fByPos As DWord, gmdiFlags As DWord) As DWord
871
872Declare Function GetMenuItemID Lib "user32" (hMenu As HMENU, nPos As Long) As DWord
873Declare Function GetMenuItemCount Lib "user32" (hMenu As HMENU) As Long
874Declare Function GetMenuItemInfo Lib "user32" Alias _FuncName_GetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As DWord, ByRef mii As MENUITEMINFO) As BOOL
875Declare Function GetMessage Lib "user32" Alias _FuncName_GetMessage (ByRef Msg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord) As Long
876Const CCHDEVICENAME = 32
877Type MONITORINFO
878 cbSize As DWord
879 rcMonitor As RECT
880 rcWork As RECT
881 dwFlags As DWord
882End Type
883Type MONITORINFOEXA
884 cbSize As DWord
885 rcMonitor As RECT
886 rcWork As RECT
887 dwFlags As DWord
888 szDevice[ELM(CCHDEVICENAME)] As SByte
889End Type
890Type MONITORINFOEXW
891 cbSize As DWord
892 rcMonitor As RECT
893 rcWork As RECT
894 dwFlags As DWord
895 szDevice[ELM(CCHDEVICENAME)] As WCHAR
896End Type
897Declare Function GetMonitorInfo Lib "user32.dll" Alias _FuncName_GetMonitorInfo (hMonitor As HMONITOR, ByRef mi As Any /*MONITORINFO*/) As BOOL
898Declare Function GetNextDlgGroupItem Lib "user32" (hDlg As HWND, hCtl As HWND, bPrevious As BOOL) As HWND
899Declare Function GetNextDlgTabItem Lib "user32" (hDlg As HWND, hCtl As HWND, bPrevious As BOOL) As HWND
900Declare Function GetOpenClipboardWindow Lib "user32" () As HWND
901Declare Function GetParent Lib "user32" (hWnd As HWND) As HWND
902Declare Function GetPriorityClipboardFormat Lib "user32" (lpFormatList As *DWord, FormatNum As Long) As Long
903Declare Function GetProp Lib "user32" Alias _FuncName_GetProp (hWnd As HWND, pString As PCTSTR) As HANDLE
904Declare Function GetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO) As BOOL
905
906Declare Function GetSubMenu Lib "user32" (hMenu As HMENU, nPos As Long) As HMENU
907
908Const COLOR_SCROLLBAR = 0
909Const COLOR_BACKGROUND = 1
910Const COLOR_ACTIVECAPTION = 2
911Const COLOR_INACTIVECAPTION = 3
912Const COLOR_MENU = 4
913Const COLOR_WINDOW = 5
914Const COLOR_WINDOWFRAME = 6
915Const COLOR_MENUTEXT = 7
916Const COLOR_WINDOWTEXT = 8
917Const COLOR_CAPTIONTEXT = 9
918Const COLOR_ACTIVEBORDER = 10
919Const COLOR_INACTIVEBORDER = 11
920Const COLOR_APPWORKSPACE = 12
921Const COLOR_HIGHLIGHT = 13
922Const COLOR_HIGHLIGHTTEXT = 14
923Const COLOR_BTNFACE = 15
924Const COLOR_BTNSHADOW = 16
925Const COLOR_GRAYTEXT = 17
926Const COLOR_BTNTEXT = 18
927Const COLOR_INACTIVECAPTIONTEXT = 19
928Const COLOR_BTNHIGHLIGHT = 20
929Const COLOR_3DDKSHADOW = 21
930Const COLOR_3DLIGHT = 22
931Const COLOR_INFOTEXT = 23
932Const COLOR_INFOBK = 24
933Const COLOR_HOTLIGHT = 26
934Const COLOR_GRADIENTACTIVECAPTION = 27
935Const COLOR_GRADIENTINACTIVECAPTION = 28
936Const COLOR_DESKTOP = COLOR_BACKGROUND
937Const COLOR_3DFACE = COLOR_BTNFACE
938Const COLOR_3DSHADOW = COLOR_BTNSHADOW
939Const COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT
940Const COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT
941Const COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT
942Declare Function GetSysColor Lib "user32" (nIndex As Long) As DWord
943Declare Function GetSysColorBrush Lib "user32" (nIndex As Long) As HBRUSH
944
945Declare Function GetSystemMenu Lib "user32" (hWnd As HWND, bRevert As BOOL) As HMENU
946
947Const SM_CXSCREEN = 0
948Const SM_CYSCREEN = 1
949Const SM_CXVSCROLL = 2
950Const SM_CYHSCROLL = 3
951Const SM_CYCAPTION = 4
952Const SM_CXBORDER = 5
953Const SM_CYBORDER = 6
954Const SM_CXDLGFRAME = 7
955Const SM_CYDLGFRAME = 8
956Const SM_CYVTHUMB = 9
957Const SM_CXHTHUMB = 10
958Const SM_CXICON = 11
959Const SM_CYICON = 12
960Const SM_CXCURSOR = 13
961Const SM_CYCURSOR = 14
962Const SM_CYMENU = 15
963Const SM_CXFULLSCREEN = 16
964Const SM_CYFULLSCREEN = 17
965Const SM_CYKANJIWINDOW = 18
966Const SM_MOUSEPRESENT = 19
967Const SM_CYVSCROLL = 20
968Const SM_CXHSCROLL = 21
969Const SM_DEBUG = 22
970Const SM_SWAPBUTTON = 23
971Const SM_RESERVED1 = 24
972Const SM_RESERVED2 = 25
973Const SM_RESERVED3 = 26
974Const SM_RESERVED4 = 27
975Const SM_CXMIN = 28
976Const SM_CYMIN = 29
977Const SM_CXSIZE = 30
978Const SM_CYSIZE = 31
979Const SM_CXFRAME = 32
980Const SM_CYFRAME = 33
981Const SM_CXMINTRACK = 34
982Const SM_CYMINTRACK = 35
983Const SM_CXDOUBLECLK = 36
984Const SM_CYDOUBLECLK = 37
985Const SM_CXICONSPACING = 38
986Const SM_CYICONSPACING = 39
987Const SM_MENUDROPALIGNMENT = 40
988Const SM_PENWINDOWS = 41
989Const SM_DBCSENABLED = 42
990Const SM_CMOUSEBUTTONS = 43
991Const SM_CXFIXEDFRAME = SM_CXDLGFRAME
992Const SM_CYFIXEDFRAME = SM_CYDLGFRAME
993Const SM_CXSIZEFRAME = SM_CXFRAME
994Const SM_CYSIZEFRAME = SM_CYFRAME
995Const SM_SECURE = 44
996Const SM_CXEDGE = 45
997Const SM_CYEDGE = 46
998Const SM_CXMINSPACING = 47
999Const SM_CYMINSPACING = 48
1000Const SM_CXSMICON = 49
1001Const SM_CYSMICON = 50
1002Const SM_CYSMCAPTION = 51
1003Const SM_CXSMSIZE = 52
1004Const SM_CYSMSIZE = 53
1005Const SM_CXMENUSIZE = 54
1006Const SM_CYMENUSIZE = 55
1007Const SM_ARRANGE = 56
1008Const SM_CXMINIMIZED = 57
1009Const SM_CYMINIMIZED = 58
1010Const SM_CXMAXTRACK = 59
1011Const SM_CYMAXTRACK = 60
1012Const SM_CXMAXIMIZED = 61
1013Const SM_CYMAXIMIZED = 62
1014Const SM_NETWORK = 63
1015Const SM_CLEANBOOT = 67
1016Const SM_CXDRAG = 68
1017Const SM_CYDRAG = 69
1018Const SM_SHOWSOUNDS = 70
1019Const SM_CXMENUCHECK = 71
1020Const SM_CYMENUCHECK = 72
1021Const SM_SLOWMACHINE = 73
1022Const SM_MIDEASTENABLED = 74
1023Const SM_MOUSEWHEELPRESENT = 75
1024Declare Function GetSystemMetrics Lib "user32" (nIndex As Long) As Long
1025
1026Declare Function GetUpdateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT, bErase As BOOL) As BOOL
1027Declare Function GetUpdateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
1028
1029Const GW_HWNDFIRST = 0
1030Const GW_HWNDLAST = 1
1031Const GW_HWNDNEXT = 2
1032Const GW_HWNDPREV = 3
1033Const GW_OWNER = 4
1034Const GW_CHILD = 5
1035Declare Function GetWindow Lib "user32" (hWnd As HWND, uCmd As DWord) As HWND
1036
1037Declare Function GetTopWindow Lib "user32" (ByVal hWnd As HWND) As HWND
1038
1039Function GetNextWindow(ByVal hWnd As HWND, ByVal wCmd As DWord) As HWND
1040 Return GetWindow(hWnd, wCmd) As HWND
1041End Function
1042Function GetSysModalWindow() As HWND
1043 Return (NULL) As HWND
1044End Function
1045Function SetSysModalWindow(ByVal hWnd As HWND) As HWND
1046 Return (NULL) As HWND
1047End Function
1048
1049Function GetWindowTask(hWnd As HWND) As HANDLE
1050 Return GetWindowThreadProcessId(hWnd, NULL) As HANDLE
1051End Function
1052
1053Declare Function GetLastActivePopup Lib "user32" (ByVal hWnd As HWND) As HWND
1054
1055
1056Declare Function GetWindowContextHelpId Lib "user32" (hwnd As HWND) As DWord
1057
1058Declare Function GetWindowDC Lib "user32" (hWnd As HWND) As HDC
1059
1060#ifndef _WIN64
1061Const GWL_WNDPROC = -4
1062Const GWL_HINSTANCE = -6
1063Const GWL_HWNDPARENT = -8
1064Const GWL_USERDATA = -21
1065Const GWL_ID = -12
1066#endif
1067
1068Const GWL_STYLE = -16
1069Const GWL_EXSTYLE = -20
1070
1071Const GWLP_WNDPROC = -4
1072Const GWLP_HINSTANCE = -6
1073Const GWLP_HWNDPARENT = -8
1074Const GWLP_USERDATA = -21
1075Const GWLP_ID = -12
1076
1077
1078#ifdef _WIN64
1079Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
1080Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
1081#else
1082Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
1083Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
1084#endif
1085Declare Function GetWindowModuleFileName Lib "user32" Alias _FuncName_GetWindowModuleFileName (hwnd As HWND, pszFileName As LPTSTR, cchFileNameMax As DWord) As DWord
1086
1087Const WPF_SETMINPOSITION = &H0001
1088Const WPF_RESTORETOMAXIMIZED = &H0002
1089Type WINDOWPLACEMENT
1090 length As DWord
1091 flags As DWord
1092 showCmd As DWord
1093 ptMinPosition As POINTAPI
1094 ptMaxPosition As POINTAPI
1095 rcNormalPosition As RECT
1096End Type
1097Declare Function GetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
1098
1099Declare Function GetWindowRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
1100
1101Declare Function GetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As Long
1102Declare Function ExcludeUpdateRgn Lib "user32" (ByVal hDC As HDC, ByVal hWnd As HWND) As Long
1103
1104Declare Function GetWindowText Lib "user32" Alias _FuncName_GetWindowText (hWnd As HWND, lpString As PTSTR, nMaxCount As Long) As Long
1105Declare Function GetWindowTextLength Lib "user32" Alias _FuncName_GetWindowTextLength (hWnd As HWND) As Long
1106Declare Function GetWindowThreadProcessId Lib "user32" (hWnd As HWND, pdwProcessId As *DWord) As DWord
1107Declare Function HideCaret Lib "user32" (hWnd As HWND) As BOOL
1108Declare Function InsertMenuItem Lib "user32" Alias _FuncName_InsertMenuItem (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
1109Declare Function InvalidateRect Lib "user32" (hWnd As HWND, ByRef Rect As RECT, bErase As BOOL) As BOOL
1110Declare Function InvalidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
1111Declare Function InvertRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT) As BOOL
1112Declare Function IsCharAlpha Lib "user32" Alias _FuncName_IsCharAlpha (ch As TCHAR) As BOOL
1113Declare Function IsCharAlphaNumeric Lib "user32" Alias _FuncName_IsCharAlphaNumeric (ch As TCHAR) As BOOL
1114Declare Function IsCharLower Lib "user32" Alias _FuncName_IsCharLower (ch As TCHAR) As BOOL
1115Declare Function IsCharUpper Lib "user32" Alias _FuncName_IsCharUpper (ch As TCHAR) As BOOL
1116Declare Function IsChild Lib "user32" (hWndParent As HWND, hWnd As HWND) As BOOL
1117Declare Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As DWord) As BOOL
1118Declare Function IsDialogMessage Lib "user32" Alias _FuncName_IsDialogMessage (hDlg As HWND, ByRef msg As MSG) As BOOL
1119Declare Function IsDlgButtonChecked Lib "user32" (hDlg As HWND, nIDButton As Long) As DWord
1120Declare Function IsIconic Lib "user32" (hWnd As HWND) As BOOL
1121Declare Function IsWindow Lib "user32" (hWnd As HWND) As BOOL
1122Declare Function IsWindowEnabled Lib "user32" (hWnd As HWND) As BOOL
1123Declare Function IsWindowUnicode Lib "user32" (hWnd As HWND) As BOOL
1124Declare Function IsWindowVisible Lib "user32" (hWnd As HWND) As BOOL
1125Declare Function IsZoomed Lib "user32" (hWnd As HWND) As BOOL
1126
1127Const KEYEVENTF_EXTENDEDKEY = &H0001
1128Const KEYEVENTF_KEYUP = &H0002
1129Declare Sub keybd_event Lib "user32" (bVk As Byte, bScan As Byte, dwFlags As DWord, dwExtraInfo As DWord)
1130
1131Declare Function KillTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR) As BOOL
1132Declare Function LoadBitmap Lib "user32" Alias _FuncName_LoadBitmap (hInst As HINSTANCE, pBitmapName As PCTSTR) As HBITMAP
1133
1134Const IDC_ARROW = 32512
1135Const IDC_IBEAM = 32513
1136Const IDC_WAIT = 32514
1137Const IDC_CROSS = 32515
1138Const IDC_UPARROW = 32516
1139Const IDC_SIZE = 32640
1140Const IDC_ICON = 32641
1141Const IDC_SIZENWSE = 32642
1142Const IDC_SIZENESW = 32643
1143Const IDC_SIZEWE = 32644
1144Const IDC_SIZENS = 32645
1145Const IDC_SIZEALL = 32646
1146Const IDC_NO = 32648
1147Const IDC_HAND = 32649
1148Const IDC_APPSTARTING = 32650
1149Const IDC_HELP = 32651
1150Declare Function LoadCursor Lib "user32" Alias _FuncName_LoadCursor (hInst As HINSTANCE, pCursorName As PCTSTR) As HCURSOR
1151
1152Declare Function LoadCursorFromFile Lib "user32" Alias _FuncName_LoadCursorFromFile (pFileName As PCTSTR) As HCURSOR
1153
1154Const IDI_APPLICATION = 32512
1155Const IDI_HAND = 32513
1156Const IDI_QUESTION = 32514
1157Const IDI_EXCLAMATION = 32515
1158Const IDI_ASTERISK = 32516
1159Const IDI_WINLOGO = 32517
1160Declare Function LoadIcon Lib "user32" Alias _FuncName_LoadIcon (hInst As HINSTANCE, pIconName As PCTSTR) As HICON
1161
1162Const IMAGE_BITMAP = 0
1163Const IMAGE_ICON = 1
1164Const IMAGE_CURSOR = 2
1165Const IMAGE_ENHMETAFILE = 3
1166Const LR_DEFAULTCOLOR = &H0000
1167Const LR_MONOCHROME = &H0001
1168Const LR_COLOR = &H0002
1169Const LR_COPYRETURNORG = &H0004
1170Const LR_COPYDELETEORG = &H0008
1171Const LR_LOADFROMFILE = &H0010
1172Const LR_LOADTRANSPARENT = &H0020
1173Const LR_DEFAULTSIZE = &H0040
1174Const LR_VGACOLOR = &H0080
1175Const LR_LOADMAP3DCOLORS = &H1000
1176Const LR_CREATEDIBSECTION = &H2000
1177Const LR_COPYFROMRESOURCE = &H4000
1178Const LR_SHARED = &H8000
1179Declare Function LoadImage Lib "user32" Alias _FuncName_LoadImage (hinst As HINSTANCE, pszName As PCTSTR, dwImageType As DWord, cxDesired As Long, cyDesired As Long, dwFlags As DWord) As HANDLE
1180Declare Function LoadString Lib "user32" Alias _FuncName_LoadString (hInstance As HINSTANCE, uID As DWord, lpBuffer As LPTSTR, nBufferMax As Long) As Long
1181Declare Function LockWindowUpdate Lib "user32" (hWnd As HWND) As BOOL
1182Declare Function MapVirtualKey Lib "user32" Alias _FuncName_MapVirtualKey (wCode As DWord, wMapType As DWord) As DWord
1183Declare Function MapWindowPoints Lib "user32" (
1184 hWndFrom As HWND,
1185 hWndTo As HWND,
1186 pPoints As *POINTAPI,
1187 cPoints As DWord) As Long
1188Declare Function MessageBeep Lib "user32" (uType As DWord) As BOOL
1189
1190Const MB_OK = &H00000000
1191Const MB_OKCANCEL = &H00000001
1192Const MB_ABORTRETRYIGNORE = &H00000002
1193Const MB_YESNOCANCEL = &H00000003
1194Const MB_YESNO = &H00000004
1195Const MB_RETRYCANCEL = &H00000005
1196Const MB_ICONHAND = &H00000010
1197Const MB_ICONQUESTION = &H00000020
1198Const MB_ICONEXCLAMATION = &H00000030
1199Const MB_ICONASTERISK = &H00000040
1200Const MB_USERICON = &H00000080
1201Const MB_ICONWARNING = MB_ICONEXCLAMATION
1202Const MB_ICONERROR = MB_ICONHAND
1203Const MB_ICONINFORMATION = MB_ICONASTERISK
1204Const MB_ICONSTOP = MB_ICONHAND
1205Const MB_DEFBUTTON1 = &H00000000
1206Const MB_DEFBUTTON2 = &H00000100
1207Const MB_DEFBUTTON3 = &H00000200
1208Const MB_DEFBUTTON4 = &H00000300
1209Const MB_APPLMODAL = &H00000000
1210Const MB_SYSTEMMODAL = &H00001000
1211Const MB_TASKMODAL = &H00002000
1212Const MB_HELP = &H00004000
1213Const MB_NOFOCUS = &H00008000
1214Const MB_SETFOREGROUND = &H00010000
1215Const MB_DEFAULT_DESKTOP_ONLY = &H00020000
1216Const MB_TOPMOST = &H00040000
1217Const MB_RIGHT = &H00080000
1218Const MB_RTLREADING = &H00100000
1219Const MB_SERVICE_NOTIFICATION = &H00200000
1220#ifdef UNICODE
1221Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hwnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
1222#else
1223Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hwnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
1224#endif
1225Declare Function MessageBoxW Lib "user32" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
1226Declare Function MessageBoxA Lib "user32" (hWnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
1227Const MOUSEEVENTF_MOVE = &H0001
1228Const MOUSEEVENTF_LEFTDOWN = &H0002
1229Const MOUSEEVENTF_LEFTUP = &H0004
1230Const MOUSEEVENTF_RIGHTDOWN = &H0008
1231Const MOUSEEVENTF_RIGHTUP = &H0010
1232Const MOUSEEVENTF_MIDDLEDOWN = &H0020
1233Const MOUSEEVENTF_MIDDLEUP = &H0040
1234Const MOUSEEVENTF_WHEEL = &H0800
1235Const MOUSEEVENTF_ABSOLUTE = &H8000
1236Declare Sub mouse_event Lib "user32" (dwFlags As DWord, dx As DWord, dy As DWord, dwData As DWord, dwExtraInfo As DWord)
1237
1238Declare Function MoveWindow Lib "user32" (hWnd As HWND, x As Long, y As Long, nWidth As Long, nHight As Long, bRepaint As BOOL) As BOOL
1239Declare Function OpenClipboard Lib "user32" (hWndNewOwner As HWND) As BOOL
1240Declare Function OpenIcon Lib "user32" (hWnd As HWND) As BOOL
1241
1242Const PM_NOREMOVE = &H0000
1243Const PM_REMOVE = &H0001
1244Declare Function PeekMessage Lib "user32" Alias _FuncName_PeekMessage (ByRef Msg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord, wRemoveMsg As DWord) As BOOL
1245
1246Const HWND_BROADCAST = &HFFFF
1247Declare Function PostMessage Lib "user32" Alias _FuncName_PostMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
1248
1249Declare Sub PostQuitMessage Lib "user32" (nExitCode As Long)
1250Declare Function PostThreadMessage Lib "user32" Alias _FuncName_PostThreadMessage (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
1251Declare Function RealChildWindowFromPoint Lib "user32" (hwndParent As HWND, xPoint As Long, yPoint As Long) As HWND
1252
1253Const RDW_INVALIDATE = &H0001
1254Const RDW_INTERNALPAINT = &H0002
1255Const RDW_ERASE = &H0004
1256Const RDW_VALIDATE = &H0008
1257Const RDW_NOINTERNALPAINT = &H0010
1258Const RDW_NOERASE = &H0020
1259Const RDW_NOCHILDREN = &H0040
1260Const RDW_ALLCHILDREN = &H0080
1261Const RDW_UPDATENOW = &H0100
1262Const RDW_ERASENOW = &H0200
1263Const RDW_FRAME = &H0400
1264Const RDW_NOFRAME = &H0800
1265Declare Function RedrawWindow Lib "user32" (hWnd As HWND, ByRef lprcUpdate As RECT, hrgnUpdate As HRGN, flags As DWord) As BOOL
1266
1267Declare Function RegisterClassEx Lib "user32" Alias _FuncName_RegisterClassEx (ByRef wcx As WNDCLASSEX) As ATOM
1268Declare Function RegisterClipboardFormat Lib "user32" Alias _FuncName_RegisterClipboardFormat (pszFormat As PCTSTR) As DWord
1269Declare Function RegisterHotKey lib "user32.dll" (hwnd As HWND, id As Long, dwModufuers As DWord, vk As DWord) As BOOL
1270Declare Function RegisterWindowMessage Lib "user32" Alias _FuncName_RegisterWindowMessage (pString As PCTSTR) As DWord
1271Declare Function ReleaseCapture Lib "user32" () As BOOL
1272Declare Function ReleaseDC Lib "user32" (hWnd As HWND, hdc As HDC) As BOOL
1273Declare Function RemoveMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
1274Declare Function RemoveProp Lib "user32" Alias _FuncName_RemoveProp (hWnd As HWND, pString As PCTSTR) As HANDLE
1275Declare Function TranslateAccelerator Lib "user32" Alias _FuncName_TranslateAccelerator (hwnd As HWND, hAccTable As HACCEL, ByRef msg As MSG) As Long
1276Declare Function TranslateMessage Lib "user32" (ByRef msg As MSG) As Long
1277Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef Point As POINTAPI) As BOOL
1278Declare Function ScrollDC Lib "user32" (hdc As HDC, dx As Long, dy As Long, ByRef rcScroll As RECT, ByRef rcClip As RECT, hrgnUpdate As HRGN, ByRef rcUpdate As RECT) As BOOL
1279
1280Declare Function SetScrollPos Lib "user32" (ByVal hWnd As HWND, ByVal nBar As Long, ByVal nPos As Long, ByVal bRedraw As BOOL) As Long
1281Declare Function GetScrollPos Lib "user32" (ByVal hWnd As HWND, ByVal nBar As Long) As Long
1282Declare Function SetScrollRange Lib "user32" (ByVal hWnd As HWND, ByVal nBar As Long, ByVal nMinPos As Long, ByVal nMaxPos As Long, ByVal bRedraw As BOOL) As BOOL
1283Declare Function GetScrollRange Lib "user32" (ByVal hWnd As HWND, ByVal nBar As Long, ByRef lpMinPos As Long, ByRef lpMaxPos As Long) As BOOL
1284
1285Const SW_SCROLLCHILDREN = &H0001
1286Const SW_INVALIDATE = &H0002
1287Const SW_ERASE = &H0004
1288Declare Function ScrollWindowEx Lib "user32" (hWnd As HWND, dx As Long, dy As Long, ByRef rcScroll As RECT, ByRef rcClip As RECT, hrgnUpdate As HRGN, ByRef rcUpdate As RECT, flags As DWord) As BOOL
1289
1290Declare Function SendDlgItemMessage Lib "user32" Alias _FuncName_SendDlgItemMessage (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1291Declare Function SendMessage Lib "user32" Alias _FuncName_SendMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1292Declare Function SendNotifyMessage Lib "user32" Alias _FuncName_SendNotifyMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1293Declare Function SetActiveWindow Lib "user32" (hWnd As HWND) As HWND
1294Declare Function SetDlgItemInt Lib "user32" (hDlg As HWND, nIDDlgItem As Long, uValue As DWord, bSigned As BOOL) As BOOL
1295Declare Function SetDlgItemText Lib "user32" Alias _FuncName_SetDlgItemText (hDlg As HWND, nIDDlgItem As Long, lpString As PCTSTR) As BOOL
1296Declare Function SetCapture Lib "user32" (hWnd As HWND) As HWND
1297Declare Function SetCaretPos Lib "user32" (x As Long, y As Long) As BOOL
1298
1299#ifdef _WIN64
1300Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1301Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1302#else
1303Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1304Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1305#endif
1306
1307Declare Function SetClipboardData Lib "user32" (uFormat As DWord, hMem As HANDLE) As HANDLE
1308Declare Function SetClipboardViewer Lib "user32" (ByVal hWndNewViewer As HWND) As HWND
1309Declare Function SetCursor Lib "user32" (hCursor As HCURSOR) As HCURSOR
1310Declare Function SetCursorPos Lib "user32" (x As Long, y As Long) As BOOL
1311Declare Function SetDoubleClickTime Lib "user32" (uInterval As DWord) As BOOL
1312Declare Function SetFocus Lib "user32" (hWnd As HWND) As HWND
1313Declare Function SetForegroundWindow Lib "user32" (hWnd As HWND) As BOOL
1314Declare Function SetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
1315
1316Declare Function GetKeyNameTextA Lib "user32" (ByVal lParam As Long, ByVal lpString As LPSTR, ByVal cchSize As Long) As Long
1317Declare Function GetKeyNameTextW Lib "user32" (ByVal lParam As Long, ByVal lpString As LPWSTR, ByVal cchSize As Long) As Long
1318#ifdef UNICODE
1319Declare Function GetKeyNameText Lib "user32" Alias "GetKeyNameTextW" (ByVal lParam As Long, ByVal lpString As LPWSTR, ByVal cchSize As Long) As Long
1320#else
1321Declare Function GetKeyNameText Lib "user32" Alias "GetKeyNameTextA" (ByVal lParam As Long, ByVal lpString As LPSTR, ByVal cchSize As Long) As Long
1322#endif ' !UNICODE
1323Declare Function GetKeyboardType Lib "user32" (ByVal nTypeFlag As Long) As Long
1324
1325Declare Function ToAscii Lib "user32" (ByVal uVirtKey As DWord, ByVal uScanCode As DWord, ByVal lpKeyState As *Byte, ByVal lpChar As *WORD, ByVal uFlags As DWord) As Long
1326Declare Function ToAsciiEx Lib "user32" (ByVal uVirtKey As DWord, ByVal uScanCode As DWord, ByVal lpKeyState As *Byte, ByVal lpChar As *WORD, ByVal uFlags As DWord, ByVal dwhkl As HKL) As Long
1327
1328Declare Function ToUnicode Lib "user32" (ByVal uVirtKey As DWord, ByVal uScanCode As DWord, ByVal lpKeyState As *Byte, ByVal pwszBuff As LPWSTR, ByVal cchBuff As Long, ByVal wFlags As DWord) As Long
1329
1330Declare Function OemKeyScan Lib "user32" (ByVal wOemChar As Word) As DWord
1331
1332Declare Function VkKeyScanA Lib "user32" (ByVal ch As SByte) As Integer
1333Declare Function VkKeyScanW Lib "user32" (ByVal ch As Word) As Integer
1334#ifdef UNICODE
1335Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanW" (ByVal ch As Word) As Integer
1336#else
1337Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanA" (ByVal ch As SByte) As Integer
1338#endif ' !UNICODE
1339
1340Declare Function VkKeyScanExA Lib "user32" (ByVal ch As SByte, ByVal dwhkl As HKL) As Integer
1341Declare Function VkKeyScanExW Lib "user32" (ByVal ch As Word, ByVal dwhkl As HKL) As Integer
1342#ifdef UNICODE
1343Declare Function VkKeyScanEx Lib "user32" Alias "VkKeyScanW" (ByVal ch As Word, ByVal dwhkl As HKL) As Integer
1344#else
1345Declare Function VkKeyScanEx Lib "user32" Alias "VkKeyScanA" (ByVal ch As SByte, ByVal dwhkl As HKL) As Integer
1346#endif ' !UNICODE
1347
1348Type MOUSEINPUT
1349 dx As Long
1350 dy As Long
1351 mouseData As DWord
1352 dwFlags As DWord
1353 time As DWord
1354 dwExtraInfo As ULONG_PTR
1355End Type
1356TypeDef PMOUSEINPUT = *MOUSEINPUT
1357TypeDef LPMOUSEINPUT = *MOUSEINPUT
1358
1359Type KEYBDINPUT
1360 wVk As Word
1361 wScan As Word
1362 dwFlags As DWord
1363 time As DWord
1364 dwExtraInfo As ULONG_PTR
1365End Type
1366TypeDef PKEYBDINPUT = *KEYBDINPUT
1367TypeDef LPKEYBDINPUT = *KEYBDINPUT
1368
1369Type HARDWAREINPUT
1370 uMsg As DWord
1371 wParamL As Word
1372 wParamH As Word
1373End Type
1374TypeDef PHARDWAREINPUT = *HARDWAREINPUT
1375TypeDef LPHARDWAREINPUT = *HARDWAREINPUT
1376
1377Const INPUT_MOUSE = 0
1378Const INPUT_KEYBOARD = 1
1379Const INPUT_HARDWARE = 2
1380
1381Type INPUT
1382 types As DWord
1383#ifdef _WIN64
1384 union[6] As DWord
1385#else
1386 union[5] As DWord
1387#endif
1388/* Union
1389 mi As MOUSEINPUT
1390 ki As KEYBDINPUT
1391 hi As HARDWAREINPUT
1392 End Union*/
1393End Type
1394TypeDef PINPUT = *INPUT
1395TypeDef LPINPUT = *INPUT
1396
1397Declare Function SendInput Lib "user32" (ByVal cInputs As DWord, ByVal pInputs As *INPUT, ByVal cbSize As Long) As DWord
1398
1399Declare Function MapVirtualKeyA Lib "user32" (ByVal uCode As DWord, ByVal uMapType As DWord) As DWord
1400Declare Function MapVirtualKeyW Lib "user32" (ByVal uCode As DWord, ByVal uMapType As DWord) As DWord
1401#ifdef UNICODE
1402Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyW" (ByVal uCode As DWord, ByVal uMapType As DWord) As DWord
1403#else
1404Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal uCode As DWord, ByVal uMapType As DWord) As DWord
1405#endif ' !UNICODE
1406
1407Declare Function MapVirtualKeyExA Lib "user32" (ByVal uCode As DWord, ByVal uMapType As DWord, ByVal dwhkl As HKL) As DWord
1408Declare Function MapVirtualKeyExW Lib "user32" (ByVal uCode As DWord, ByVal uMapType As DWord, ByVal dwhkl As HKL) As DWord
1409#ifdef UNICODE
1410Declare Function MapVirtualKeyEx Lib "user32" Alias "MapVirtualKeyExW" (ByVal uCode As DWord, ByVal uMapType As DWord, ByVal dwhkl As HKL) As DWord
1411#else
1412Declare Function MapVirtualKeyEx Lib "user32" Alias "MapVirtualKeyExA" (ByVal uCode As DWord, ByVal uMapType As DWord, ByVal dwhkl As HKL) As DWord
1413#endif ' !UNICODE
1414
1415Declare Function GetInputState Lib "user32" () As BOOL
1416Declare Function GetQueueStatus Lib "user32" (ByVal flags As DWord) As DWord
1417
1418Const QS_KEY = &H0001
1419Const QS_MOUSEMOVE = &H0002
1420Const QS_MOUSEBUTTON = &H0004
1421Const QS_POSTMESSAGE = &H0008
1422Const QS_TIMER = &H0010
1423Const QS_PAINT = &H0020
1424Const QS_SENDMESSAGE = &H0040
1425Const QS_HOTKEY = &H0080
1426Const QS_ALLPOSTMESSAGE = &H0100
1427'Const QS_RAWINPUT = &H0400
1428
1429Const QS_MOUSE = (QS_MOUSEMOVE or QS_MOUSEBUTTON)
1430Const QS_INPUT = (QS_MOUSE or QS_KEY /* or QS_RAWINPUT*/)
1431Const QS_ALLEVENTS = (QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or QS_HOTKEY)
1432Const QS_ALLINPUT = (QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or QS_HOTKEY or QS_SENDMESSAGE)
1433
1434Declare Function MsgWaitForMultipleObjects Lib "user32" (ByVal nCount As DWord, ByVal pHandles As *HANDLE, ByVal fWaitAll As BOOL, ByVal dwMilliseconds As DWord, ByVal dwWakeMask As DWord) As DWord
1435Declare Function MsgWaitForMultipleObjectsEx Lib "user32" (ByVal nCount As DWord, ByVal pHandles As *HANDLE, ByVal dwMilliseconds As DWord, ByVal dwWakeMask As DWord, ByVal dwFlags As DWord) As DWord
1436
1437Const MWMO_WAITALL = &H0001
1438Const MWMO_ALERTABLE = &H0002
1439Const MWMO_INPUTAVAILABLE = &H0004
1440
1441
1442Declare Function SetMenu Lib "user32" (hWnd As HWND, hMenu As HMENU) As BOOL
1443
1444Declare Function ChangeMenuA Lib "user32" (ByVal hMenu As HMENU, ByVal cmd As DWord, ByVal lpszNewItem As LPCSTR, ByVal cmdInsert As DWord, ByVal flags As DWord) As BOOL
1445Declare Function ChangeMenuW Lib "user32" (ByVal hMenu As HMENU, ByVal cmd As DWord, ByVal lpszNewItem As LPCWSTR, ByVal cmdInsert As DWord, ByVal flags As DWord) As BOOL
1446#ifdef UNICODE
1447Declare Function ChangeMenu Lib "user32" Alias "ChangeMenuW" (ByVal hMenu As HMENU, ByVal cmd As DWord, ByVal lpszNewItem As LPCWSTR, ByVal cmdInsert As DWord, ByVal flags As DWord) As BOOL
1448#else
1449Declare Function ChangeMenu Lib "user32" Alias "ChangeMenuA" (ByVal hMenu As HMENU, ByVal cmd As DWord, ByVal lpszNewItem As LPCSTR, ByVal cmdInsert As DWord, ByVal flags As DWord) As BOOL
1450#endif ' !UNICODE
1451
1452Declare Function HiliteMenuItem Lib "user32" (ByVal hWnd As HWND, ByVal hMenu As HMENU, ByVal uIDHiliteItem As DWord, ByVal uHilite As DWord) As BOOL
1453
1454Declare Function GetMenuStringA Lib "user32" (ByVal hMenu As HMENU, ByVal uIDItem As DWord, ByVal lpString As LPSTR, ByVal cchMax As Long, ByVal flags As DWord) As Long
1455Declare Function GetMenuStringW Lib "user32" (ByVal hMenu As HMENU, ByVal uIDItem As DWord, ByVal lpString As LPWSTR, ByVal cchMax As Long, ByVal flags As DWord) As Long
1456#ifdef UNICODE
1457Declare Function GetMenuString Lib "user32" Alias "GetMenuStringW" (ByVal hMenu As HMENU, ByVal uIDItem As DWord, ByVal lpString As LPWSTR, ByVal cchMax As Long, ByVal flags As DWord) As Long
1458#else
1459Declare Function GetMenuString Lib "user32" Alias "GetMenuStringA" (ByVal hMenu As HMENU, ByVal uIDItem As DWord, ByVal lpString As LPSTR, ByVal cchMax As Long, ByVal flags As DWord) As Long
1460#endif ' !UNICODE
1461
1462Declare Function GetMenuState Lib "user32" (ByVal hMenu As HMENU, ByVal uId As DWord, ByVal uFlags As DWord) As DWord
1463
1464Declare Function AppendMenuA Lib "user32" (ByVal hMenu As HMENU, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCSTR) As BOOL
1465Declare Function AppendMenuW Lib "user32" (ByVal hMenu As HMENU, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCWSTR) As BOOL
1466#ifdef UNICODE
1467Declare Function AppendMenu Lib "user32" Alias "AppendMenuW" (ByVal hMenu As HMENU, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCWSTR) As BOOL
1468#else
1469Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As HMENU, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCSTR) As BOOL
1470#endif ' !UNICODE
1471
1472Declare Function ModifyMenuA Lib "user32" (ByVal hMnu As HMENU, ByVal uPosition As DWord, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCSTR) As BOOL
1473Declare Function ModifyMenuW Lib "user32" (ByVal hMnu As HMENU, ByVal uPosition As DWord, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCWSTR) As BOOL
1474#ifdef UNICODE
1475Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuW" (ByVal hMnu As HMENU, ByVal uPosition As DWord, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCWSTR) As BOOL
1476#else
1477Declare Function ModifyMenu Lib "user32" Alias "ModifyMenuA" (ByVal hMnu As HMENU, ByVal uPosition As DWord, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCSTR) As BOOL
1478#endif ' !UNICODE
1479
1480Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As HMENU, ByVal uPosition As DWord, ByVal uFlags As DWord, ByVal hBitmapUnchecked As HBITMAP, ByVal hBitmapChecked As HBITMAP) As BOOL
1481
1482Declare Function GetMenuCheckMarkDimensions Lib "user32" () As Long
1483
1484Type TPMPARAMS
1485 cbSize As DWord
1486 rcExclude As RECT
1487End Type
1488TypeDef LPTPMPARAMS = *TPMPARAMS
1489
1490Declare Function TrackPopupMenuEx Lib "user32" (ByVal hMenu As HMENU, ByVal fuFlags As DWord, ByVal x As Long, ByVal y As Long, ByVal hwnd As HWND, ByVal lptpm As *TPMPARAMS) As BOOL
1491Declare Function GetMenuItemRect Lib "user32" (ByVal hWnd As HWND, ByVal hMenu As HMENU, ByVal uItem As DWord, ByRef lprcItem As RECT) As BOOL
1492Declare Function MenuItemFromPoint Lib "user32" (ByVal hWnd As HWND, ByVal hMenu As HMENU, ByRef ptScreen As POINTAPI) As Long
1493
1494Declare Function SetMenuContextHelpId Lib "user32" (hmenu As HMENU, dwContextHelpId As DWord) As BOOL
1495Declare Function SetMenuDefaultItem Lib "user32" (hMenu As HMENU, uItem As DWord, fByPos As DWord) As BOOL
1496Declare Function SetMenuItemInfo Lib "user32" Alias _FuncName_SetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
1497Declare Function SetParent Lib "user32" (hWndChild As HWND, hWndNewParent As HWND) As HWND
1498Declare Function SetProp Lib "user32" Alias _FuncName_SetProp (hWnd As HWND, pString As PCTSTR, hData As HANDLE) As BOOL
1499
1500TypeDef PROPENUMPROCEXA = *Function(ByVal hwnd As HWND, ByVal lpszString As LPSTR, ByVal hData As HANDLE, ByVal dwData As ULONG_PTR) As BOOL
1501TypeDef PROPENUMPROCEXW = *Function(ByVal hwnd As HWND, ByVal lpszString As LPWSTR, ByVal hData As HANDLE, ByVal dwData As ULONG_PTR) As BOOL
1502#ifdef UNICODE
1503TypeDef PROPENUMPROCEX = PROPENUMPROCEXW
1504#else
1505TypeDef PROPENUMPROCEX = PROPENUMPROCEXA
1506#endif ' !UNICODE
1507
1508Declare Function EnumPropsExA Lib "user32" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCEXA, ByVal lParam As LPARAM) As Long
1509Declare Function EnumPropsExW Lib "user32" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCEXW, ByVal lParam As LPARAM) As Long
1510#ifdef UNICODE
1511Declare Function EnumPropsEx Lib "user32" Alias "EnumPropsExW" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCEXW, ByVal lParam As LPARAM) As Long
1512#else
1513Declare Function EnumPropsEx Lib "user32" Alias "EnumPropsExA" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCEXA, ByVal lParam As LPARAM) As Long
1514#endif ' !UNICODE
1515
1516
1517TypeDef PROPENUMPROCA = *Function(ByVal hwnd As HWND, ByVal lpszString As LPCSTR, ByVal hData As HANDLE) As BOOL
1518TypeDef PROPENUMPROCW = *Function(ByVal hwnd As HWND, ByVal lpszString As LPCWSTR, ByVal hData As HANDLE) As BOOL
1519#ifdef UNICODE
1520TypeDef PROPENUMPROC = PROPENUMPROCW
1521#else
1522TypeDef PROPENUMPROC = PROPENUMPROCA
1523#endif ' !UNICODE
1524
1525Declare Function EnumPropsA Lib "user32" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCA) As Long
1526Declare Function EnumPropsW Lib "user32" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCW) As Long
1527#ifdef UNICODE
1528Declare Function EnumProps Lib "user32" Alias "EnumPropsW" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCW) As Long
1529#else
1530Declare Function EnumProps Lib "user32" Alias "EnumPropsA" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCA) As Long
1531#endif ' !UNICODE
1532
1533Declare Function SetRect Lib "User32" (ByRef rc As RECT, xLeft As Long, yTop As Long, xRight As Long, yBottom As Long) As Long
1534Declare Function SetRectEmpty Lib "user32" (ByRef lprc As RECT) As BOOL
1535Declare Function CopyRect Lib "user32" (ByRef lprcDst As RECT, ByRef lprcSrc As RECT) As BOOL
1536Declare Function InflateRect Lib "user32" (ByRef lprc As RECT, ByVal dx As Long, ByVal dy As Long) As BOOL
1537Declare Function IntersectRect Lib "user32" (ByRef lprcDst As RECT, ByRef lprcSrc1 As RECT, ByRef lprcSrc2 As RECT) As BOOL
1538Declare Function UnionRect Lib "user32" (ByRef lprcDst As RECT, ByRef lprcSrc1 As RECT, ByRef lprcSrc2 As RECT) As BOOL
1539Declare Function SubtractRect Lib "user32" (ByRef lprcDst As RECT, ByRef lprcSrc1 As RECT, ByRef lprcSrc2 As RECT) As BOOL
1540Declare Function OffsetRect Lib "user32" (ByRef lprc As RECT, ByVal dx As Long, ByVal dy As Long) As BOOL
1541Declare Function IsRectEmpty Lib "user32" (ByRef lprc As RECT) As BOOL
1542Declare Function EqualRect Lib "user32" (ByRef lprc1 As RECT, ByRef lprc2 As RECT) As BOOL
1543Declare Function PtInRect Lib "user32" (ByRef lprc As RECT, ByRef pt As POINTAPI) As BOOL
1544Declare Function SetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL
1545Declare Function SetSysColors Lib "user32" (cElements As Long, lpaElements As *DWord, lpaRgbValues As *DWord) As BOOL
1546Declare Function SetSystemCursor Lib "user32" (ByVal hcur As HCURSOR, ByVal id As DWord) As BOOL
1547
1548Const USER_TIMER_MAXIMUM = &H7FFFFFFF
1549Const USER_TIMER_MINIMUM = &H0000000A
1550
1551TypeDef TIMERPROC = *Sub(hwnd As HWND, msg As DWord, idEvent As ULONG_PTR, dwTime As DWord)
1552Declare Function SetTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR, nElapse As DWord, lpTimerFunc As TIMERPROC) As ULONG_PTR
1553
1554Declare Function SetWindowContextHelpId Lib "user32"(hwnd As HWND, dwContextHelpId As DWord) As BOOL
1555#ifdef _WIN64
1556Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1557Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1558#else
1559Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1560Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1561#endif
1562
1563Declare Function SetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
1564
1565Const HWND_TOP = 0 As HWND
1566Const HWND_BOTTOM = 1 As HWND
1567Const HWND_TOPMOST = -1 As HWND
1568Const HWND_NOTOPMOST = -2 As HWND
1569Const SWP_NOSIZE = &H0001
1570Const SWP_NOMOVE = &H0002
1571Const SWP_NOZORDER = &H0004
1572Const SWP_NOREDRAW = &H0008
1573Const SWP_NOACTIVATE = &H0010
1574Const SWP_FRAMECHANGED = &H0020
1575Const SWP_SHOWWINDOW = &H0040
1576Const SWP_HIDEWINDOW = &H0080
1577Const SWP_NOCOPYBITS = &H0100
1578Const SWP_NOOWNERZORDER = &H0200
1579Const SWP_NOSENDCHANGING = &H0400
1580Const SWP_DRAWFRAME = SWP_FRAMECHANGED
1581Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
1582Const SWP_DEFERERASE = &H2000
1583Const SWP_ASYNCWINDOWPOS = &H4000
1584Declare Function SetWindowPos Lib "user32" (hWnd As HWND, hWndInsertAfter As HWND, X As Long, Y As Long, cx As Long, cy As Long, uFlags As DWord) As BOOL
1585
1586Declare Function SetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bRedraw As BOOL) As BOOL
1587Declare Function SetWindowsHookEx Lib "user32" Alias _FuncName_SetWindowsHookEx (idHook As Long, lpfn As HOOKPROC, hMod As HINSTANCE, dwThreadId As DWord) As HHOOK
1588Declare Function SetWindowText Lib "user32" Alias _FuncName_SetWindowText (hWnd As HWND, pString As PCTSTR) As BOOL
1589Declare Function ShowCaret Lib "user32" (hWnd As HWND) As BOOL
1590Declare Function ShowCursor Lib "user32" (bShow As Long) As BOOL
1591Declare Function ShowScrollBar Lib "user32" (hWnd As HWND, wBar As DWord, bShow As BOOL) As BOOL
1592
1593Const SW_HIDE = 0
1594Const SW_SHOWNORMAL = 1
1595Const SW_NORMAL = 1
1596Const SW_SHOWMINIMIZED = 2
1597Const SW_SHOWMAXIMIZED = 3
1598Const SW_MAXIMIZE = 3
1599Const SW_SHOWNOACTIVATE = 4
1600Const SW_SHOW = 5
1601Const SW_MINIMIZE = 6
1602Const SW_SHOWMINNOACTIVE = 7
1603Const SW_SHOWNA = 8
1604Const SW_RESTORE = 9
1605Const SW_SHOWDEFAULT = 10
1606Const SW_FORCEMINIMIZE = 11
1607Const SW_MAX = 11
1608Declare Function ShowWindow Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
1609Declare Function ShowWindowAsync Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
1610
1611Type NONCLIENTMETRICSW
1612 cbSize As DWord
1613 iBorderWidth As Long
1614 iScrollWidth As Long
1615 iScrollHeight As Long
1616 iCaptionWidth As Long
1617 iCaptionHeight As Long
1618 lfCaptionFont As LOGFONTW
1619 iSmCaptionWidth As Long
1620 iSmCaptionHeight As Long
1621 lfSmCaptionFont As LOGFONTW
1622 iMenuWidth As Long
1623 iMenuHeight As Long
1624 lfMenuFont As LOGFONTW
1625 lfStatusFont As LOGFONTW
1626 lfMessageFont As LOGFONTW
1627End Type
1628Type NONCLIENTMETRICSA
1629 cbSize As DWord
1630 iBorderWidth As Long
1631 iScrollWidth As Long
1632 iScrollHeight As Long
1633 iCaptionWidth As Long
1634 iCaptionHeight As Long
1635 lfCaptionFont As LOGFONTA
1636 iSmCaptionWidth As Long
1637 iSmCaptionHeight As Long
1638 lfSmCaptionFont As LOGFONTA
1639 iMenuWidth As Long
1640 iMenuHeight As Long
1641 lfMenuFont As LOGFONTA
1642 lfStatusFont As LOGFONTA
1643 lfMessageFont As LOGFONTA
1644End Type
1645#ifdef UNICODE
1646TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSW
1647#else
1648TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSA
1649#endif
1650Const SPI_GETBEEP = 1
1651Const SPI_SETBEEP = 2
1652Const SPI_GETMOUSE = 3
1653Const SPI_SETMOUSE = 4
1654Const SPI_GETBORDER = 5
1655Const SPI_SETBORDER = 6
1656Const SPI_GETKEYBOARDSPEED = 10
1657Const SPI_SETKEYBOARDSPEED = 11
1658Const SPI_LANGDRIVER = 12
1659Const SPI_ICONHORIZONTALSPACING = 13
1660Const SPI_GETSCREENSAVETIMEOUT = 14
1661Const SPI_SETSCREENSAVETIMEOUT = 15
1662Const SPI_GETSCREENSAVEACTIVE = 16
1663Const SPI_SETSCREENSAVEACTIVE = 17
1664Const SPI_GETGRIDGRANULARITY = 18
1665Const SPI_SETGRIDGRANULARITY = 19
1666Const SPI_SETDESKWALLPAPER = 20
1667Const SPI_SETDESKPATTERN = 21
1668Const SPI_GETKEYBOARDDELAY = 22
1669Const SPI_SETKEYBOARDDELAY = 23
1670Const SPI_ICONVERTICALSPACING = 24
1671Const SPI_GETICONTITLEWRAP = 25
1672Const SPI_SETICONTITLEWRAP = 26
1673Const SPI_GETMENUDROPALIGNMENT = 27
1674Const SPI_SETMENUDROPALIGNMENT = 28
1675Const SPI_SETDOUBLECLKWIDTH = 29
1676Const SPI_SETDOUBLECLKHEIGHT = 30
1677Const SPI_GETICONTITLELOGFONT = 31
1678Const SPI_SETDOUBLECLICKTIME = 32
1679Const SPI_SETMOUSEBUTTONSWAP = 33
1680Const SPI_SETICONTITLELOGFONT = 34
1681Const SPI_GETFASTTASKSWITCH = 35
1682Const SPI_SETFASTTASKSWITCH = 36
1683Const SPI_SETDRAGFULLWINDOWS = 37
1684Const SPI_GETDRAGFULLWINDOWS = 38
1685Const SPI_GETNONCLIENTMETRICS = 41
1686Const SPI_SETNONCLIENTMETRICS = 42
1687Const SPI_GETMINIMIZEDMETRICS = 43
1688Const SPI_SETMINIMIZEDMETRICS = 44
1689Const SPI_GETICONMETRICS = 45
1690Const SPI_SETICONMETRICS = 46
1691Const SPI_SETWORKAREA = 47
1692Const SPI_GETWORKAREA = 48
1693Const SPI_SETPENWINDOWS = 49
1694Const SPI_GETHIGHCONTRAST = 66
1695Const SPI_SETHIGHCONTRAST = 67
1696Const SPI_GETKEYBOARDPREF = 68
1697Const SPI_SETKEYBOARDPREF = 69
1698Const SPI_GETSCREENREADER = 70
1699Const SPI_SETSCREENREADER = 71
1700Const SPI_GETANIMATION = 72
1701Const SPI_SETANIMATION = 73
1702Const SPI_GETFONTSMOOTHING = 74
1703Const SPI_SETFONTSMOOTHING = 75
1704Const SPI_SETDRAGWIDTH = 76
1705Const SPI_SETDRAGHEIGHT = 77
1706Const SPI_SETHANDHELD = 78
1707Const SPI_GETLOWPOWERTIMEOUT = 79
1708Const SPI_GETPOWEROFFTIMEOUT = 80
1709Const SPI_SETLOWPOWERTIMEOUT = 81
1710Const SPI_SETPOWEROFFTIMEOUT = 82
1711Const SPI_GETLOWPOWERACTIVE = 83
1712Const SPI_GETPOWEROFFACTIVE = 84
1713Const SPI_SETLOWPOWERACTIVE = 85
1714Const SPI_SETPOWEROFFACTIVE = 86
1715Const SPI_SETCURSORS = 87
1716Const SPI_SETICONS = 88
1717Const SPI_GETDEFAULTINPUTLANG = 89
1718Const SPI_SETDEFAULTINPUTLANG = 90
1719Const SPI_SETLANGTOGGLE = 91
1720Const SPI_GETWINDOWSEXTENSION = 92
1721Const SPI_SETMOUSETRAILS = 93
1722Const SPI_GETMOUSETRAILS = 94
1723Const SPI_SETSCREENSAVERRUNNING = 97
1724Const SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING
1725Const SPI_GETFILTERKEYS = 50
1726Const SPI_SETFILTERKEYS = 51
1727Const SPI_GETTOGGLEKEYS = 52
1728Const SPI_SETTOGGLEKEYS = 53
1729Const SPI_GETMOUSEKEYS = 54
1730Const SPI_SETMOUSEKEYS = 55
1731Const SPI_GETSHOWSOUNDS = 56
1732Const SPI_SETSHOWSOUNDS = 57
1733Const SPI_GETSTICKYKEYS = 58
1734Const SPI_SETSTICKYKEYS = 59
1735Const SPI_GETACCESSTIMEOUT = 60
1736Const SPI_SETACCESSTIMEOUT = 61
1737Const SPI_GETSERIALKEYS = 62
1738Const SPI_SETSERIALKEYS = 63
1739Const SPI_GETSOUNDSENTRY = 64
1740Const SPI_SETSOUNDSENTRY = 65
1741Const SPI_GETMOUSEHOVERWIDTH = 98
1742Const SPI_SETMOUSEHOVERWIDTH = 99
1743Const SPI_GETMOUSEHOVERHEIGHT = 100
1744Const SPI_SETMOUSEHOVERHEIGHT = 101
1745Const SPI_GETMOUSEHOVERTIME = 102
1746Const SPI_SETMOUSEHOVERTIME = 103
1747Const SPI_GETWHEELSCROLLLINES = 104
1748Const SPI_SETWHEELSCROLLLINES = 105
1749Const SPI_GETSHOWIMEUI = 110
1750Const SPI_SETSHOWIMEUI = 111
1751Const SPI_GETMOUSESPEED = 112
1752Const SPI_SETMOUSESPEED = 113
1753Const SPI_GETSCREENSAVERRUNNING = 114
1754Const SPI_GETACTIVEWINDOWTRACKING = &H1000 'Windows 2000 or later
1755Const SPI_SETACTIVEWINDOWTRACKING = &H1001
1756Const SPI_GETMENUANIMATION = &H1002
1757Const SPI_SETMENUANIMATION = &H1003
1758Const SPI_GETCOMBOBOXANIMATION = &H1004
1759Const SPI_SETCOMBOBOXANIMATION = &H1005
1760Const SPI_GETLISTBOXSMOOTHSCROLLING = &H1006
1761Const SPI_SETLISTBOXSMOOTHSCROLLING = &H1007
1762Const SPI_GETGRADIENTCAPTIONS = &H1008
1763Const SPI_SETGRADIENTCAPTIONS = &H1009
1764Const SPI_GETMENUUNDERLINES = &H100A
1765Const SPI_SETMENUUNDERLINES = &H100B
1766Const SPI_GETACTIVEWNDTRKZORDER = &H100C
1767Const SPI_SETACTIVEWNDTRKZORDER = &H100D
1768Const SPI_GETHOTTRACKING = &H100E
1769Const SPI_SETHOTTRACKING = &H100F
1770Const SPI_GETFOREGROUNDLOCKTIMEOUT = &H2000
1771Const SPI_SETFOREGROUNDLOCKTIMEOUT = &H2001
1772Const SPI_GETACTIVEWNDTRKTIMEOUT = &H2002
1773Const SPI_SETACTIVEWNDTRKTIMEOUT = &H2003
1774Const SPI_GETFOREGROUNDFLASHCOUNT = &H2004
1775Const SPI_SETFOREGROUNDFLASHCOUNT = &H2005
1776Const SPIF_UPDATEINIFILE = &H0001
1777Const SPIF_SENDWININICHANGE = &H0002
1778Const SPIF_SENDCHANGE = SPIF_SENDWININICHANGE
1779Declare Function SystemParametersInfo Lib "user32" Alias _FuncName_SystemParametersInfo (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
1780
1781Const CDS_UPDATEREGISTRY = &H00000001
1782Const CDS_TEST = &H00000002
1783Const CDS_FULLSCREEN = &H00000004
1784Const CDS_GLOBAL = &H00000008
1785Const CDS_SET_PRIMARY = &H00000010
1786Const CDS_VIDEOPARAMETERS = &H00000020
1787Const CDS_RESET = &H40000000
1788Const CDS_NORESET = &H10000000
1789
1790Const DISP_CHANGE_SUCCESSFUL = 0
1791Const DISP_CHANGE_RESTART = 1
1792Const DISP_CHANGE_FAILED = -1
1793Const DISP_CHANGE_BADMODE = -2
1794Const DISP_CHANGE_NOTUPDATED = -3
1795Const DISP_CHANGE_BADFLAGS = -4
1796Const DISP_CHANGE_BADPARAM = -5
1797Const DISP_CHANGE_BADDUALVIEW = -6
1798
1799#ifdef _INC_GDI
1800Declare Function ChangeDisplaySettingsA Lib "user32" (ByVal lpDevMode As *DEVMODEA, ByVal dwFlags As DWord) As Long
1801Declare Function ChangeDisplaySettingsW Lib "user32" (ByVal lpDevMode As *DEVMODEW, ByVal dwFlags As DWord) As Long
1802#ifdef UNICODE
1803Declare Function ChangeDisplaySettings Lib "user32" Alias _FuncName_ChangeDisplaySettings (ByVal lpDevMode As *DEVMODEW, ByVal dwFlags As DWord) As Long
1804#else
1805Declare Function ChangeDisplaySettings Lib "user32" Alias _FuncName_ChangeDisplaySettings (ByVal lpDevMode As *DEVMODEA, ByVal dwFlags As DWord) As Long
1806#endif
1807
1808Declare Function ChangeDisplaySettingsExA Lib "user32" (ByVal lpszDeviceName As LPCSTR, ByVal lpDevMode As *DEVMODEA, ByVal hwnd As HWND, ByVal dwFlags As DWord, ByVal lParam As VoidPtr) As Long
1809Declare Function ChangeDisplaySettingsExW Lib "user32" (ByVal lpszDeviceName As LPCWSTR, ByVal lpDevMode As *DEVMODEW, ByVal hwnd As HWND, ByVal dwFlags As DWord, ByVal lParam As VoidPtr) As Long
1810#ifdef UNICODE
1811Declare Function ChangeDisplaySettingsEx Lib "user32" Alias _FuncName_ChangeDisplaySettingsEx (ByVal lpszDeviceName As LPCWSTR, ByVal lpDevMode As *DEVMODEW, ByVal hwnd As HWND, ByVal dwFlags As DWord, ByVal lParam As VoidPtr) As Long
1812#else
1813Declare Function ChangeDisplaySettingsEx Lib "user32" Alias _FuncName_ChangeDisplaySettingsEx (ByVal lpszDeviceName As LPCSTR, ByVal lpDevMode As *DEVMODEA, ByVal hwnd As HWND, ByVal dwFlags As DWord, ByVal lParam As VoidPtr) As Long
1814#endif
1815
1816Const ENUM_CURRENT_SETTINGS = ((-1) As DWord)
1817Const ENUM_REGISTRY_SETTINGS = ((-2) As DWord)
1818
1819Declare Function EnumDisplaySettingsA Lib "user32" (ByVal lpszDeviceName As LPCSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEA) As BOOL
1820Declare Function EnumDisplaySettingsW Lib "user32" (ByVal lpszDeviceName As LPCWSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEW) As BOOL
1821#ifdef UNICODE
1822Declare Function EnumDisplaySettings Lib "user32" Alias _FuncName_EnumDisplaySettings (ByVal lpszDeviceName As LPCWSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEW) As BOOL
1823#else
1824Declare Function EnumDisplaySettings Lib "user32" Alias _FuncName_EnumDisplaySettings (ByVal lpszDeviceName As LPCSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEA) As BOOL
1825#endif
1826
1827/*#ifdef(WINVER >= 0x0500)
1828Declare Function EnumDisplaySettingsExA Lib "user32" (ByVal lpszDeviceName As LPCSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEA, ByVal dwFlags As DWord) As BOOL
1829Declare Function EnumDisplaySettingsExW Lib "user32" (ByVal lpszDeviceName As LPCWSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEW, ByVal dwFlags As DWord) As BOOL
1830#ifdef UNICODE
1831Declare Function EnumDisplaySettingsEx Lib "user32" Alias _FuncName_EnumDisplaySettingsEx (ByVal lpszDeviceName As LPCWSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEW, ByVal dwFlags As DWord) As BOOL
1832#else
1833Declare Function EnumDisplaySettingsEx Lib "user32" Alias _FuncName_EnumDisplaySettingsEx (ByVal lpszDeviceName As LPCSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEA, ByVal dwFlags As DWord) As BOOL
1834#endif
1835
1836Const EDS_RAWMODE = &H00000002
1837
1838Declare Function EnumDisplayDevicesA Lib "user32" (ByVal lpDevice As LPCSTR, ByVal iDevNum As DWord, ByVal lpDisplayDevice As *DISPLAY_DEVICEA, ByVal dwFlags As DWord) As BOOL
1839Declare Function EnumDisplayDevicesW Lib "user32" (ByVal lpDevice As LPCWSTR, ByVal iDevNum As DWord, ByVal lpDisplayDevice As *DISPLAY_DEVICEW, ByVal dwFlags As DWord)As BOOL
1840#ifdef UNICODE
1841Declare Function EnumDisplayDevices Lib "user32" Alias _FuncName_EnumDisplayDevices (ByVal lpDevice As LPCWSTR, ByVal iDevNum As DWord, ByVal lpDisplayDevice As *DISPLAY_DEVICEW, ByVal dwFlags As DWord)As BOOL
1842#else
1843Declare Function EnumDisplayDevices Lib "user32" Alias _FuncName_EnumDisplayDevices (ByVal lpDevice As LPCSTR, ByVal iDevNum As DWord, ByVal lpDisplayDevice As *DISPLAY_DEVICEA, ByVal dwFlags As DWord) As BOOL
1844#endif
1845#endif */ /* WINVER >= 0x0500 */
1846#endif ' _INC_GDI
1847
1848Const TME_HOVER = &H00000001
1849Const TME_LEAVE = &H00000002
1850Const TME_NONCLIENT = &H00000010
1851Const TME_QUERY = &H40000000
1852Const TME_CANCEL = &H80000000
1853Const HOVER_DEFAULT = &HFFFFFFFF
1854Type TRACKMOUSEEVENT
1855 cbSize As DWord
1856 dwFlags As DWord
1857 hwndTrack As HWND
1858 dwHoverTime As DWord
1859End Type
1860Declare Function TrackMouseEvent Lib "user32" (ByRef EventTrack As TRACKMOUSEEVENT) As BOOL
1861
1862Const TPM_LEFTBUTTON = &H0000
1863Const TPM_RIGHTBUTTON = &H0002
1864Const TPM_LEFTALIGN = &H0000
1865Const TPM_CENTERALIGN = &H0004
1866Const TPM_RIGHTALIGN = &H0008
1867Const TPM_TOPALIGN = &H0000
1868Const TPM_VCENTERALIGN = &H0010
1869Const TPM_BOTTOMALIGN = &H0020
1870Const TPM_HORIZONTAL = &H0000
1871Const TPM_VERTICAL = &H0040
1872Const TPM_NONOTIFY = &H0080
1873Const TPM_RETURNCMD = &H0100
1874Const TPM_RECURSE = &H0001
1875Declare Function TrackPopupMenu Lib "user32" (hMenu As HMENU, uFlags As DWord, x As Long, y As Long, nReserved As Long, ByVal hWnd As HWND, ByRef prcRect As RECT) As BOOL
1876
1877declare function UnhookWindowsHookEx lib "user32" (ByVal hhk As HHOOK) As BOOL
1878Declare Function UnregisterClass Lib "user32" Alias _FuncName_UnregisterClass (pClassName As PCTSTR, hinst As HINSTANCE) As BOOL
1879Declare Function UnregisterHotKey Lib "user32" (hwnd As HWND, id As Long) As BOOL
1880Declare Function UpdateWindow Lib "user32" (hWnd As HWND) As BOOL
1881Declare Function ValidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
1882Declare Function ValidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As BOOL
1883Declare Function WaitForInputIdle Lib "user32" (hProcess As HANDLE, dwMilliseconds As DWord) As DWord
1884
1885Declare Function WaitMessage Lib "user32" () As BOOL
1886Declare Function WindowFromDC Lib "user32" (hDC As HDC) As HWND
1887Declare Function WindowFromPoint Lib "user32" (ptX As Long, ptY As Long) As HWND
1888
1889TypeDef HELPPOLY = DWord
1890
1891Type MULTIKEYHELPA
1892 mkSize As DWord
1893 mkKeylist As SByte
1894 szKeyphrase[ELM(1)] As SByte
1895End Type
1896TypeDef PMULTIKEYHELPA=*MULTIKEYHELPA
1897TypeDef LPMULTIKEYHELPA=*MULTIKEYHELPA
1898Type MULTIKEYHELPW
1899 mkSize As DWord
1900 mkKeylist As Word
1901 szKeyphrase[ELM(1)] As Word
1902End Type
1903TypeDef PMULTIKEYHELPW=*MULTIKEYHELPW
1904TypeDef LPMULTIKEYHELPW=*MULTIKEYHELPW
1905
1906#ifdef UNICODE
1907TypeDef MULTIKEYHELP = MULTIKEYHELPW
1908TypeDef PMULTIKEYHELP = PMULTIKEYHELPW
1909TypeDef LPMULTIKEYHELP = LPMULTIKEYHELPW
1910#else
1911TypeDef MULTIKEYHELP = MULTIKEYHELPA
1912TypeDef PMULTIKEYHELP = PMULTIKEYHELPA
1913TypeDef LPMULTIKEYHELP = LPMULTIKEYHELPA
1914#endif ' UNICODE
1915
1916Type HELPWININFOA
1917 wStructSize As Long
1918 x As Long
1919 y As Long
1920 dx As Long
1921 dy As Long
1922 wMax As Long
1923 rgchMember[ELM(2)] As SByte
1924End Type
1925TypeDef PHELPWININFOA=*HELPWININFOA
1926TypeDef LPHELPWININFOA=*HELPWININFOA
1927Type HELPWININFOW
1928 wStructSize As Long
1929 x As Long
1930 y As Long
1931 dx As Long
1932 dy As Long
1933 wMax As Long
1934 rgchMember[ELM(2)] As Word
1935End Type
1936TypeDef PHELPWININFOW=*HELPWININFOW
1937TypeDef LPHELPWININFOW=*HELPWININFOW
1938
1939#ifdef UNICODE
1940TypeDef HELPWININFO = HELPWININFOW
1941TypeDef PHELPWININFO = PHELPWININFOW
1942TypeDef LPHELPWININFO = LPHELPWININFOW
1943#else
1944TypeDef HELPWININFO = HELPWININFOA
1945TypeDef PHELPWININFO = PHELPWININFOA
1946TypeDef LPHELPWININFO = LPHELPWININFOA
1947#endif ' UNICODE
1948
1949Const HELP_CONTEXT = &H0001
1950Const HELP_QUIT = &H0002
1951Const HELP_INDEX = &H0003
1952Const HELP_CONTENTS = &H0003
1953Const HELP_HELPONHELP = &H0004
1954Const HELP_SETINDEX = &H0005
1955Const HELP_SETCONTENTS = &H0005
1956Const HELP_CONTEXTPOPUP = &H0008
1957Const HELP_FORCEFILE = &H0009
1958Const HELP_KEY = &H0101
1959Const HELP_COMMAND = &H0102
1960Const HELP_PARTIALKEY = &H0105
1961Const HELP_MULTIKEY = &H0201
1962Const HELP_SETWINPOS = &H0203
1963Const HELP_CONTEXTMENU = &H000a
1964Const HELP_FINDER = &H000b
1965Const HELP_WM_HELP = &H000c
1966Const HELP_SETPOPUP_POS = &H000d
1967Const HELP_TCARD = &H8000
1968Const HELP_TCARD_DATA = &H0010
1969Const HELP_TCARD_OTHER_CALLER = &H0011
1970
1971Const IDH_NO_HELP = 28440
1972Const IDH_MISSING_CONTEXT = 28441
1973Const IDH_GENERIC_HELP_BUTTON = 28442
1974Const IDH_OK = 28443
1975Const IDH_CANCEL = 28444
1976Const IDH_HELP = 28445
1977
1978Declare Function WinHelpA Lib "user32" (ByVal hWndMain As HWND, ByVal lpszHelp As LPCSTR, ByVal uCommand As DWord, ByVal dwData As ULONG_PTR) As BOOL
1979Declare Function WinHelpW Lib "user32" (ByVal hWndMain As HWND, ByVal lpszHelp As LPCWSTR, ByVal uCommand As DWord, ByVal dwData As ULONG_PTR) As BOOL
1980#ifdef UNICODE
1981Declare Function WinHelp Lib "user32" Alias "WinHelpW" (ByVal hWndMain As HWND, ByVal lpszHelp As LPCWSTR, ByVal uCommand As DWord, ByVal dwData As ULONG_PTR) As BOOL
1982#else
1983Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hWndMain As HWND, ByVal lpszHelp As LPCSTR, ByVal uCommand As DWord, ByVal dwData As ULONG_PTR) As BOOL
1984#endif ' !UNICODE
1985
1986Declare Function wsprintf cdecl Lib "user32" Alias _FuncName_wsprintf (pText As PTSTR, pFormat As PCTSTR, ...) As Long
1987Declare Function wvsprintf Lib "user32" Alias _FuncName_wvsprintf (pOutput As PTSTR, pFormat As PCTSTR, arglist As DWordPtr) As Long
1988
1989Type GUITHREADINFO
1990 cbSize As DWord
1991 flags As DWord
1992 hwndActive As HWND
1993 hwndFocus As HWND
1994 hwndCapture As HWND
1995 hwndMenuOwner As HWND
1996 hwndMoveSize As HWND
1997 hwndCaret As HWND
1998 rcCaret As RECT
1999End Type
2000TypeDef PGUITHREADINFO = *GUITHREADINFO
2001TypeDef LPGUITHREADINFO = *GUITHREADINFO
2002
2003Const GUI_CARETBLINKING = &H00000001
2004Const GUI_INMOVESIZE = &H00000002
2005Const GUI_INMENUMODE = &H00000004
2006Const GUI_SYSTEMMENUMODE = &H00000008
2007Const GUI_POPUPMENUMODE = &H00000010
2008Const GUI_16BITTASK = &H00000020
2009
2010Declare Function GetGUIThreadInfo Lib "user32" (ByVal idThread As DWord, ByRef pgui As GUITHREADINFO) As BOOL
2011
2012Const STATE_SYSTEM_UNAVAILABLE = &H00000001
2013Const STATE_SYSTEM_SELECTED = &H00000002
2014Const STATE_SYSTEM_FOCUSED = &H00000004
2015Const STATE_SYSTEM_PRESSED = &H00000008
2016Const STATE_SYSTEM_CHECKED = &H00000010
2017Const STATE_SYSTEM_MIXED = &H00000020
2018Const STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED
2019Const STATE_SYSTEM_READONLY = &H00000040
2020Const STATE_SYSTEM_HOTTRACKED = &H00000080
2021Const STATE_SYSTEM_DEFAULT = &H00000100
2022Const STATE_SYSTEM_EXPANDED = &H00000200
2023Const STATE_SYSTEM_COLLAPSED = &H00000400
2024Const STATE_SYSTEM_BUSY = &H00000800
2025Const STATE_SYSTEM_FLOATING = &H00001000
2026Const STATE_SYSTEM_MARQUEED = &H00002000
2027Const STATE_SYSTEM_ANIMATED = &H00004000
2028Const STATE_SYSTEM_INVISIBLE = &H00008000
2029Const STATE_SYSTEM_OFFSCREEN = &H00010000
2030Const STATE_SYSTEM_SIZEABLE = &H00020000
2031Const STATE_SYSTEM_MOVEABLE = &H00040000
2032Const STATE_SYSTEM_SELFVOICING = &H00080000
2033Const STATE_SYSTEM_FOCUSABLE = &H00100000
2034Const STATE_SYSTEM_SELECTABLE = &H00200000
2035Const STATE_SYSTEM_LINKED = &H00400000
2036Const STATE_SYSTEM_TRAVERSED = &H00800000
2037Const STATE_SYSTEM_MULTISELECTABLE = &H01000000
2038Const STATE_SYSTEM_EXTSELECTABLE = &H02000000
2039Const STATE_SYSTEM_ALERT_LOW = &H04000000
2040Const STATE_SYSTEM_ALERT_MEDIUM = &H08000000
2041Const STATE_SYSTEM_ALERT_HIGH = &H10000000
2042Const STATE_SYSTEM_PROTECTED = &H20000000
2043Const STATE_SYSTEM_VALID = &H3FFFFFFF
2044
2045Const CCHILDREN_TITLEBAR = 5
2046Const CCHILDREN_SCROLLBAR = 5
2047
2048
2049Type CURSORINFO
2050 cbSize As DWord
2051 flags As DWord
2052 hCursor As HCURSOR
2053 ptScreenPos As POINTAPI
2054End Type
2055TypeDef PCURSORINFO=*CURSORINFO
2056TypeDef LPCURSORINFO=*CURSORINFO
2057
2058Const CURSOR_SHOWING = &H00000001
2059
2060Declare Function GetCursorInfo Lib "user32" (ByRef pci As CURSORINFO) As BOOL
2061
2062
2063Type MENUBARINFO
2064 cbSize As DWord
2065 rcBar As RECT
2066 hMenu As HMENU
2067 hwndMenu As HWND
2068 fields As BOOL
2069/* fBarFocused As BOOL
2070 fFocused As BOOL*/
2071End Type
2072TypeDef PMENUBARINFO=*MENUBARINFO
2073TypeDef LPMENUBARINFO=*MENUBARINFO
2074
2075Declare Function GetMenuBarInfo Lib "user32" (ByVal hwnd As HWND, ByVal idObject As Long, ByVal idItem As Long, ByRef pmbi As MENUBARINFO) As BOOL
2076
2077Type COMBOBOXINFO
2078 cbSize As DWord
2079 rcItem As RECT
2080 rcButton As RECT
2081 stateButton As DWord
2082 hwndCombo As HWND
2083 hwndItem As HWND
2084 hwndList As HWND
2085End Type
2086TypeDef PCOMBOBOXINFO=*COMBOBOXINFO
2087TypeDef LPCOMBOBOXINFO=*COMBOBOXINFO
2088
2089Declare Function GetComboBoxInfo Lib "user32" (ByVal hwndCombo As HWND, ByRef pcbi As COMBOBOXINFO) As BOOL
2090
2091
2092Const GA_PARENT = 1
2093Const GA_ROOT = 2
2094Const GA_ROOTOWNER = 3
2095
2096Declare Function GetAncestor Lib "user32" (ByVal hwnd As HWND, ByVal gaFlags As DWord) As HWND
2097
2098
2099Declare Function RealGetWindowClassA Lib "user32" (ByVal hwnd As HWND, ByVal ptszClassName As LPSTR, ByVal cchClassNameMax As DWord) As DWord
2100Declare Function RealGetWindowClassW Lib "user32" (ByVal hwnd As HWND, ByVal ptszClassName As LPWSTR, ByVal cchClassNameMax As DWord) As DWord
2101#ifdef UNICODE
2102Declare Function RealGetWindowClass Lib "user32" Alias "RealGetWindowClassW" (ByVal hwnd As HWND, ByVal ptszClassName As LPWSTR, ByVal cchClassNameMax As DWord) As DWord
2103#else
2104Declare Function RealGetWindowClass Lib "user32" Alias "RealGetWindowClassA" (ByVal hwnd As HWND, ByVal ptszClassName As LPSTR, ByVal cchClassNameMax As DWord) As DWord
2105#endif ' !UNICODE
2106
2107
2108Type ALTTABINFO
2109 cbSize As DWord
2110 cItems As Long
2111 cColumns As Long
2112 cRows As Long
2113 iColFocus As Long
2114 iRowFocus As Long
2115 cxItem As Long
2116 cyItem As Long
2117 ptStart As POINTAPI
2118End Type
2119TypeDef PALTTABINFO=*ALTTABINFO
2120TypeDef LPALTTABINFO=*ALTTABINFO
2121
2122Declare Function GetAltTabInfoA Lib "user32" (ByVal hwnd As HWND, ByVal iItem As Long, ByRef pati As ALTTABINFO, ByVal pszItemText As LPSTR, ByVal cchItemText As DWord) As BOOL
2123Declare Function GetAltTabInfoW Lib "user32" (ByVal hwnd As HWND, ByVal iItem As Long, ByRef pati As ALTTABINFO, ByVal pszItemText As LPWSTR, ByVal cchItemText As DWord) As BOOL
2124#ifdef UNICODE
2125Declare Function GetAltTabInfo Lib "user32" Alias "GetAltTabInfoW" (ByVal hwnd As HWND, ByVal iItem As Long, ByRef pati As ALTTABINFO, ByVal pszItemText As LPWSTR, ByVal cchItemText As DWord) As BOOL
2126#else
2127Declare Function GetAltTabInfo Lib "user32" Alias "GetAltTabInfoA" (ByVal hwnd As HWND, ByVal iItem As Long, ByRef pati As ALTTABINFO, ByVal pszItemText As LPSTR, ByVal cchItemText As DWord) As BOOL
2128#endif ' !UNICODE
Note: See TracBrowser for help on using the repository browser.