source: trunk/Include/api_window.sbp@ 435

Last change on this file since 435 was 418, checked in by NoWest, 16 years ago

構造体を追加

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