source: trunk/ab5.0/ablib/src/api_window.sbp @ 560

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

UI_Sampleの追加。イベントのコメントアウト解除。Form.abからテスト部分を除去。Application.DoEventsを実装。MakeControlEventHandlerを静的メンバのイベント対応へ。WindowsExceptionの追加。

File size: 102.8 KB
Line 
1' api_window.sbp - Window Control API
2
3'-------------
4' Window API Function Names
5#ifdef UNICODE
6Const _FuncName_CallWindowProc = "CallWindowProcW"
7Const _FuncName_CharLower = "CharLowerW"
8Const _FuncName_CharNext = "CharNextW"
9Const _FuncName_CharPrev = "CharPrevW"
10Const _FuncName_CharUpper = "CharUpperW"
11Const _FuncName_CreateAcceleratorTable = "CreateAcceleratorTableW"
12Const _FuncName_CreateWindowEx = "CreateWindowExW"
13Const _FuncName_DefDlgProc = "DefDlgProcW"
14Const _FuncName_DefWindowProc = "DefWindowProcW"
15Const _FuncName_DialogBoxIndirectParam = "DialogBoxIndirectParamW"
16Const _FuncName_DispatchMessage = "DispatchMessageW"
17Const _FuncName_DlgDirList = "DlgDirListW"
18Const _FuncName_DlgDirListComboBox = "DlgDirListComboBoxW"
19Const _FuncName_DlgDirSelectComboBoxEx = "DlgDirSelectComboBoxExW"
20Const _FuncName_DlgDirSelectEx = "DlgDirSelectExW"
21Const _FuncName_DrawText = "DrawTextW"
22Const _FuncName_DrawTextEx = "DrawTextExW"
23Const _FuncName_FindWindow = "FindWindowW"
24Const _FuncName_FindWindowEx = "FindWindowExW"
25Const _FuncName_GetClassInfoEx = "GetClassInfoExW"
26Const _FuncName_GetClassLong = "GetClassLongW"
27Const _FuncName_GetClassLongPtr = "GetClassLongPtrW"
28Const _FuncName_GetClassName = "GetClassNameW"
29Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameW"
30Const _FuncName_GetDlgItemText = "GetDlgItemTextW"
31Const _FuncName_GetMonitorInfo = "GetMonitorInfoW"
32Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoW"
33Const _FuncName_GetMessage = "GetMessageW"
34Const _FuncName_GetProp = "GetPropW"
35Const _FuncName_GetWindowLong = "GetWindowLongW"
36Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrW"
37Const _FuncName_GetWindowText = "GetWindowTextW"
38Const _FuncName_GetWindowTextLength = "GetWindowTextLengthW"
39Const _FuncName_GetWindowModuleFileName = "GetWindowModuleFileNameW"
40Const _FuncName_InsertMenuItem = "InsertMenuItemW"
41Const _FuncName_IsCharAlpha = "IsCharAlphaW"
42Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericW"
43Const _FuncName_IsCharLower = "IsCharLowerW"
44Const _FuncName_IsCharUpper = "IsCharUpperW"
45Const _FuncName_IsDialogMessage = "IsDialogMessageW"
46Const _FuncName_LoadBitmap = "LoadBitmapW"
47Const _FuncName_LoadCursor = "LoadCursorW"
48Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileW"
49Const _FuncName_LoadIcon = "LoadIconW"
50Const _FuncName_LoadImage = "LoadImageW"
51Const _FuncName_LoadString = "LoadStringW"
52Const _FuncName_MapVirtualKey = "MapVirtualKeyW"
53Const _FuncName_PeekMessage = "PeekMessageW"
54Const _FuncName_PostMessage = "PostMessageW"
55Const _FuncName_PostThreadMessage = "PostThreadMessageW"
56Const _FuncName_RegisterClassEx = "RegisterClassExW"
57Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatW"
58Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageW"
59Const _FuncName_RemoveProp = "RemovePropW"
60Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageW"
61Const _FuncName_SendMessage = "SendMessageW"
62Const _FuncName_SendMessageCallback = "SendMessageCallbackW"
63Const _FuncName_SendMessageTimeout = "SendMessageTimeoutW"
64Const _FuncName_SendNotifyMessage = "SendNotifyMessageW"
65Const _FuncName_SetDlgItemText = "SetDlgItemTextW"
66Const _FuncName_SetClassLong = "SetClassLongW"
67Const _FuncName_SetClassLongPtr = "SetClassLongPtrW"
68Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoW"
69Const _FuncName_SetProp = "SetPropW"
70Const _FuncName_SetWindowLong = "SetWindowLongW"
71Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrW"
72Const _FuncName_SetWindowText = "SetWindowTextW"
73Const _FuncName_SetWindowsHookEx = "SetWindowsHookExW"
74Const _FuncName_SystemParametersInfo = "SystemParametersInfoW"
75Const _FuncName_TranslateAccelerator = "TranslateAcceleratorW"
76Const _FuncName_UnregisterClass = "UnregisterClassW"
77Const _FuncName_wsprintf = "wsprintfW"
78Const _FuncName_wvsprintf = "wvsprintfW"
79Const _FuncName_ChangeDisplaySettings = "ChangeDisplaySettingsW"
80Const _FuncName_ChangeDisplaySettingsEx= "ChangeDisplaySettingsExW"
81Const _FuncName_EnumDisplaySettings= "EnumDisplaySettingsW"
82Const _FuncName_EnumDisplaySettingsEx= "EnumDisplaySettingsExW"
83Const _FuncName_EnumDisplayDevices= "EnumDisplayDevicesW"
84#else
85Const _FuncName_CallWindowProc = "CallWindowProcA"
86Const _FuncName_CharLower = "CharLowerA"
87Const _FuncName_CharNext = "CharNextA"
88Const _FuncName_CharPrev = "CharPrevA"
89Const _FuncName_CharUpper = "CharUpperA"
90Const _FuncName_CreateAcceleratorTable = "CreateAcceleratorTableA"
91Const _FuncName_CreateWindowEx = "CreateWindowExA"
92Const _FuncName_DefDlgProc = "DefDlgProcA"
93Const _FuncName_DefWindowProc = "DefWindowProcA"
94Const _FuncName_DialogBoxIndirectParam = "DialogBoxIndirectParamA"
95Const _FuncName_DispatchMessage = "DispatchMessageA"
96Const _FuncName_DlgDirList = "DlgDirListA"
97Const _FuncName_DlgDirListComboBox = "DlgDirListComboBoxA"
98Const _FuncName_DlgDirSelectComboBoxEx = "DlgDirSelectComboBoxExA"
99Const _FuncName_DlgDirSelectEx = "DlgDirSelectExA"
100Const _FuncName_DrawText = "DrawTextA"
101Const _FuncName_DrawTextEx = "DrawTextExA"
102Const _FuncName_FindWindow = "FindWindowA"
103Const _FuncName_FindWindowEx = "FindWindowExA"
104Const _FuncName_GetClassInfoEx = "GetClassInfoExA"
105Const _FuncName_GetClassLong = "GetClassLongA"
106Const _FuncName_GetClassLongPtr = "GetClassLongPtrA"
107Const _FuncName_GetClassName = "GetClassNameA"
108Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameA"
109Const _FuncName_GetDlgItemText = "GetDlgItemTextA"
110Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoA"
111Const _FuncName_GetMessage = "GetMessageA"
112Const _FuncName_GetMonitorInfo = "GetMonitorInfoA"
113Const _FuncName_GetProp = "GetPropA"
114Const _FuncName_GetWindowLong = "GetWindowLongA"
115Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrA"
116Const _FuncName_GetWindowText = "GetWindowTextA"
117Const _FuncName_GetWindowTextLength = "GetWindowTextLengthA"
118Const _FuncName_GetWindowModuleFileName = "GetWindowModuleFileNameA"
119Const _FuncName_InsertMenuItem = "InsertMenuItemA"
120Const _FuncName_IsCharAlpha = "IsCharAlphaA"
121Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericA"
122Const _FuncName_IsCharLower = "IsCharLowerA"
123Const _FuncName_IsCharUpper = "IsCharUpperA"
124Const _FuncName_IsDialogMessage = "IsDialogMessageA"
125Const _FuncName_LoadBitmap = "LoadBitmapA"
126Const _FuncName_LoadCursor = "LoadCursorA"
127Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileA"
128Const _FuncName_LoadIcon = "LoadIconA"
129Const _FuncName_LoadImage = "LoadImageA"
130Const _FuncName_LoadString = "LoadStringA"
131Const _FuncName_MapVirtualKey = "MapVirtualKeyA"
132Const _FuncName_PeekMessage = "PeekMessageA"
133Const _FuncName_PostMessage = "PostMessageA"
134Const _FuncName_PostThreadMessage = "PostThreadMessageA"
135Const _FuncName_RegisterClassEx = "RegisterClassExA"
136Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatA"
137Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageA"
138Const _FuncName_RemoveProp = "RemovePropA"
139Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageA"
140Const _FuncName_SendMessage = "SendMessageA"
141Const _FuncName_SendMessageCallback = "SendMessageCallbackA"
142Const _FuncName_SendMessageTimeout = "SendMessageTimeoutA"
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 PTSTR
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 PTSTR
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_CANCELTRYCONTINUE =      &H00000006
1201Const MB_ICONHAND =               &H00000010
1202Const MB_ICONQUESTION =           &H00000020
1203Const MB_ICONEXCLAMATION =        &H00000030
1204Const MB_ICONASTERISK =           &H00000040
1205Const MB_USERICON =               &H00000080
1206Const MB_ICONWARNING =            MB_ICONEXCLAMATION
1207Const MB_ICONERROR =              MB_ICONHAND
1208Const MB_ICONINFORMATION =        MB_ICONASTERISK
1209Const MB_ICONSTOP =               MB_ICONHAND
1210Const MB_DEFBUTTON1 =             &H00000000
1211Const MB_DEFBUTTON2 =             &H00000100
1212Const MB_DEFBUTTON3 =             &H00000200
1213Const MB_DEFBUTTON4 =             &H00000300
1214Const MB_APPLMODAL =              &H00000000
1215Const MB_SYSTEMMODAL =            &H00001000
1216Const MB_TASKMODAL =              &H00002000
1217Const MB_HELP =                   &H00004000
1218Const MB_NOFOCUS =                &H00008000
1219Const MB_SETFOREGROUND =          &H00010000
1220Const MB_DEFAULT_DESKTOP_ONLY =   &H00020000
1221Const MB_TOPMOST =                &H00040000
1222Const MB_RIGHT =                  &H00080000
1223Const MB_RTLREADING =             &H00100000
1224Const MB_SERVICE_NOTIFICATION =   &H00200000
1225
1226Const MB_TYPEMASK = &h0000000F
1227Const MB_ICONMASK = &h000000F0
1228Const MB_DEFMASK  = &h00000F00
1229Const MB_MODEMASK = &h00003000
1230Const MB_MISCMASK = &h0000C000
1231#ifdef UNICODE
1232Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hwnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
1233#else
1234Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hwnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
1235#endif
1236Declare Function MessageBoxW Lib "user32" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
1237Declare Function MessageBoxA Lib "user32" (hWnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
1238Const MOUSEEVENTF_MOVE =       &H0001
1239Const MOUSEEVENTF_LEFTDOWN =   &H0002
1240Const MOUSEEVENTF_LEFTUP =     &H0004
1241Const MOUSEEVENTF_RIGHTDOWN =  &H0008
1242Const MOUSEEVENTF_RIGHTUP =    &H0010
1243Const MOUSEEVENTF_MIDDLEDOWN = &H0020
1244Const MOUSEEVENTF_MIDDLEUP =   &H0040
1245Const MOUSEEVENTF_WHEEL =      &H0800
1246Const MOUSEEVENTF_ABSOLUTE =   &H8000
1247Declare Sub mouse_event Lib "user32" (dwFlags As DWord, dx As DWord, dy As DWord, dwData As DWord, dwExtraInfo As DWord)
1248
1249Declare Function MoveWindow Lib "user32" (hWnd As HWND, x As Long, y As Long, nWidth As Long, nHight As Long, bRepaint As BOOL) As BOOL
1250Declare Function OpenClipboard Lib "user32" (hWndNewOwner As HWND) As BOOL
1251Declare Function OpenIcon Lib "user32" (hWnd As HWND) As BOOL
1252
1253Const PM_NOREMOVE = &H0000
1254Const PM_REMOVE =   &H0001
1255Declare 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
1256
1257Const HWND_BROADCAST = &HFFFF
1258Declare Function PostMessage Lib "user32" Alias _FuncName_PostMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
1259
1260Declare Sub PostQuitMessage Lib "user32" (nExitCode As Long)
1261Declare Function PostThreadMessage Lib "user32" Alias _FuncName_PostThreadMessage (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
1262Declare Function RealChildWindowFromPoint Lib "user32" (hwndParent As HWND, xPoint As Long, yPoint As Long) As HWND
1263
1264Const RDW_INVALIDATE =        &H0001
1265Const RDW_INTERNALPAINT =     &H0002
1266Const RDW_ERASE =             &H0004
1267Const RDW_VALIDATE =          &H0008
1268Const RDW_NOINTERNALPAINT =   &H0010
1269Const RDW_NOERASE =           &H0020
1270Const RDW_NOCHILDREN =        &H0040
1271Const RDW_ALLCHILDREN =       &H0080
1272Const RDW_UPDATENOW =         &H0100
1273Const RDW_ERASENOW =          &H0200
1274Const RDW_FRAME =             &H0400
1275Const RDW_NOFRAME =           &H0800
1276Declare Function RedrawWindow Lib "user32" (hWnd As HWND, ByRef lprcUpdate As RECT, hrgnUpdate As HRGN, flags As DWord) As BOOL
1277
1278Declare Function RegisterClassEx Lib "user32" Alias _FuncName_RegisterClassEx (ByRef wcx As WNDCLASSEX) As ATOM
1279Declare Function RegisterClipboardFormat Lib "user32" Alias _FuncName_RegisterClipboardFormat (pszFormat As PCTSTR) As DWord
1280Declare Function RegisterHotKey lib "user32.dll" (hwnd As HWND, id As Long, dwModufuers As DWord, vk As DWord) As BOOL
1281Declare Function RegisterWindowMessage Lib "user32" Alias _FuncName_RegisterWindowMessage (pString As PCTSTR) As DWord
1282Declare Function ReleaseCapture Lib "user32" () As BOOL
1283Declare Function ReleaseDC Lib "user32" (hWnd As HWND, hdc As HDC) As BOOL
1284Declare Function RemoveMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
1285Declare Function RemoveProp Lib "user32" Alias _FuncName_RemoveProp (hWnd As HWND, pString As PCTSTR) As HANDLE
1286Declare Function TranslateAccelerator Lib "user32" Alias _FuncName_TranslateAccelerator (hwnd As HWND, hAccTable As HACCEL, ByRef msg As MSG) As Long
1287Declare Function TranslateMessage Lib "user32" (ByRef msg As MSG) As Long
1288Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef Point As POINTAPI) As BOOL
1289Declare 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
1290
1291Declare Function SetScrollPos Lib "user32" (ByVal hWnd As HWND, ByVal nBar As Long, ByVal nPos As Long, ByVal bRedraw As BOOL) As Long
1292Declare Function GetScrollPos Lib "user32" (ByVal hWnd As HWND, ByVal nBar As Long) As Long
1293Declare 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
1294Declare Function GetScrollRange Lib "user32" (ByVal hWnd As HWND, ByVal nBar As Long, ByRef lpMinPos As Long, ByRef lpMaxPos As Long) As BOOL
1295
1296Const SW_SCROLLCHILDREN = &H0001
1297Const SW_INVALIDATE =     &H0002
1298Const SW_ERASE =          &H0004
1299Declare 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
1300
1301Declare Function SendDlgItemMessage Lib "user32" Alias _FuncName_SendDlgItemMessage (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1302Declare Function SendMessage Lib "user32" Alias _FuncName_SendMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1303
1304TypeDef SENDASYNCPROC = *Sub(hwnd As HWND, uMsg As DWord, dwData As ULONG_PTR, lResult As LRESULT)
1305Declare Function SendMessageCallback Lib "user32" Alias _FuncName_SendMessageCallback (hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM, lpResultCallBack As SENDASYNCPROC, dwData As ULONG_PTR) As BOOL
1306Const SMTO_NORMAL = &h0000
1307Const SMTO_BLOCK = &h0001
1308Const SMTO_ABORTIFHUNG = &h0002
1309'#if WINVER >= &h0500
1310'Const SMTO_NOTIMEOUTIFNOTHUNG = &h0008
1311'#endif
1312'#if WINVER >= &h0600
1313'Const SMTO_ERRORONEXIT = &h0020
1314'#endif
1315Declare Function SendMessageTimeout Lib "user32" Alias _FuncName_SendMessageTimeout (hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM, fuFlags As DWord, uTimeout As DWord, ByRef dwResult As ULONG_PTR) As LRESULT
1316Declare Function SendNotifyMessage Lib "user32" Alias _FuncName_SendNotifyMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1317Declare Function SetActiveWindow Lib "user32" (hWnd As HWND) As HWND
1318Declare Function SetDlgItemInt Lib "user32" (hDlg As HWND, nIDDlgItem As Long, uValue As DWord, bSigned As BOOL) As BOOL
1319Declare Function SetDlgItemText Lib "user32" Alias _FuncName_SetDlgItemText (hDlg As HWND, nIDDlgItem As Long, lpString As PCTSTR) As BOOL
1320Declare Function SetCapture Lib "user32" (hWnd As HWND) As HWND
1321Declare Function SetCaretPos Lib "user32" (x As Long, y As Long) As BOOL
1322
1323#ifdef _WIN64
1324Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1325Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1326#else
1327Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1328Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1329#endif
1330
1331Declare Function SetClipboardData Lib "user32" (uFormat As DWord, hMem As HANDLE) As HANDLE
1332Declare Function SetClipboardViewer Lib "user32" (ByVal hWndNewViewer As HWND) As HWND
1333Declare Function SetCursor Lib "user32" (hCursor As HCURSOR) As HCURSOR
1334Declare Function SetCursorPos Lib "user32" (x As Long, y As Long) As BOOL
1335Declare Function SetDoubleClickTime Lib "user32" (uInterval As DWord) As BOOL
1336Declare Function SetFocus Lib "user32" (hWnd As HWND) As HWND
1337Declare Function SetForegroundWindow Lib "user32" (hWnd As HWND) As BOOL
1338Declare Function SetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
1339
1340Declare Function GetKeyNameTextA Lib "user32" (ByVal lParam As Long, ByVal lpString As LPSTR, ByVal cchSize As Long) As Long
1341Declare Function GetKeyNameTextW Lib "user32" (ByVal lParam As Long, ByVal lpString As LPWSTR, ByVal cchSize As Long) As Long
1342#ifdef UNICODE
1343Declare Function GetKeyNameText Lib "user32" Alias "GetKeyNameTextW" (ByVal lParam As Long, ByVal lpString As LPWSTR, ByVal cchSize As Long) As Long
1344#else
1345Declare Function GetKeyNameText Lib "user32" Alias "GetKeyNameTextA" (ByVal lParam As Long, ByVal lpString As LPSTR, ByVal cchSize As Long) As Long
1346#endif ' !UNICODE
1347Declare Function GetKeyboardType Lib "user32" (ByVal nTypeFlag As Long) As Long
1348
1349Declare 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
1350Declare 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
1351
1352Declare 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
1353
1354Declare Function OemKeyScan Lib "user32" (ByVal wOemChar As Word) As DWord
1355
1356Declare Function VkKeyScanA Lib "user32" (ByVal ch As SByte) As Integer
1357Declare Function VkKeyScanW Lib "user32" (ByVal ch As Word) As Integer
1358#ifdef UNICODE
1359Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanW" (ByVal ch As Word) As Integer
1360#else
1361Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanA" (ByVal ch As SByte) As Integer
1362#endif ' !UNICODE
1363
1364Declare Function VkKeyScanExA Lib "user32" (ByVal ch As SByte, ByVal dwhkl As HKL) As Integer
1365Declare Function VkKeyScanExW Lib "user32" (ByVal ch As Word, ByVal dwhkl As HKL) As Integer
1366#ifdef UNICODE
1367Declare Function VkKeyScanEx Lib "user32" Alias "VkKeyScanW" (ByVal ch As Word, ByVal dwhkl As HKL) As Integer
1368#else
1369Declare Function VkKeyScanEx Lib "user32" Alias "VkKeyScanA" (ByVal ch As SByte, ByVal dwhkl As HKL) As Integer
1370#endif ' !UNICODE
1371
1372Type MOUSEINPUT
1373    dx As Long
1374    dy As Long
1375    mouseData As DWord
1376    dwFlags As DWord
1377    time As DWord
1378    dwExtraInfo As ULONG_PTR
1379End Type
1380TypeDef PMOUSEINPUT = *MOUSEINPUT
1381TypeDef LPMOUSEINPUT = *MOUSEINPUT
1382
1383Type KEYBDINPUT
1384    wVk As Word
1385    wScan As Word
1386    dwFlags As DWord
1387    time As DWord
1388    dwExtraInfo As ULONG_PTR
1389End Type
1390TypeDef PKEYBDINPUT = *KEYBDINPUT
1391TypeDef LPKEYBDINPUT = *KEYBDINPUT
1392
1393Type HARDWAREINPUT
1394    uMsg As DWord
1395    wParamL As Word
1396    wParamH As Word
1397End Type
1398TypeDef PHARDWAREINPUT = *HARDWAREINPUT
1399TypeDef LPHARDWAREINPUT = *HARDWAREINPUT
1400
1401Const INPUT_MOUSE = 0
1402Const INPUT_KEYBOARD = 1
1403Const INPUT_HARDWARE = 2
1404
1405Type INPUT
1406    types As DWord
1407#ifdef _WIN64
1408    union[6] As DWord
1409#else
1410    union[5] As DWord
1411#endif
1412/*  Union
1413        mi As MOUSEINPUT
1414        ki As KEYBDINPUT
1415        hi As HARDWAREINPUT
1416    End Union*/
1417End Type
1418TypeDef PINPUT = *INPUT
1419TypeDef LPINPUT = *INPUT
1420
1421Declare Function SendInput Lib "user32" (ByVal cInputs As DWord, ByVal pInputs As *INPUT, ByVal cbSize As Long) As DWord
1422
1423Declare Function MapVirtualKeyA Lib "user32" (ByVal uCode As DWord, ByVal uMapType As DWord) As DWord
1424Declare Function MapVirtualKeyW Lib "user32" (ByVal uCode As DWord, ByVal uMapType As DWord) As DWord
1425#ifdef UNICODE
1426Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyW" (ByVal uCode As DWord, ByVal uMapType As DWord) As DWord
1427#else
1428Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal uCode As DWord, ByVal uMapType As DWord) As DWord
1429#endif ' !UNICODE
1430
1431Declare Function MapVirtualKeyExA Lib "user32" (ByVal uCode As DWord, ByVal uMapType As DWord, ByVal dwhkl As HKL) As DWord
1432Declare Function MapVirtualKeyExW Lib "user32" (ByVal uCode As DWord, ByVal uMapType As DWord, ByVal dwhkl As HKL) As DWord
1433#ifdef UNICODE
1434Declare Function MapVirtualKeyEx Lib "user32" Alias "MapVirtualKeyExW" (ByVal uCode As DWord, ByVal uMapType As DWord, ByVal dwhkl As HKL) As DWord
1435#else
1436Declare Function MapVirtualKeyEx Lib "user32" Alias "MapVirtualKeyExA" (ByVal uCode As DWord, ByVal uMapType As DWord, ByVal dwhkl As HKL) As DWord
1437#endif ' !UNICODE
1438
1439Declare Function GetInputState Lib "user32" () As BOOL
1440Declare Function GetQueueStatus Lib "user32" (ByVal flags As DWord) As DWord
1441
1442Const QS_KEY = &H0001
1443Const QS_MOUSEMOVE = &H0002
1444Const QS_MOUSEBUTTON = &H0004
1445Const QS_POSTMESSAGE = &H0008
1446Const QS_TIMER = &H0010
1447Const QS_PAINT = &H0020
1448Const QS_SENDMESSAGE = &H0040
1449Const QS_HOTKEY = &H0080
1450Const QS_ALLPOSTMESSAGE = &H0100
1451'Const QS_RAWINPUT = &H0400
1452
1453Const QS_MOUSE = (QS_MOUSEMOVE or QS_MOUSEBUTTON)
1454Const QS_INPUT = (QS_MOUSE or QS_KEY /* or QS_RAWINPUT*/)
1455Const QS_ALLEVENTS = (QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or QS_HOTKEY)
1456Const QS_ALLINPUT = (QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or QS_HOTKEY or QS_SENDMESSAGE)
1457
1458Declare 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
1459Declare 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
1460
1461Const MWMO_WAITALL = &H0001
1462Const MWMO_ALERTABLE = &H0002
1463Const MWMO_INPUTAVAILABLE = &H0004
1464
1465
1466Declare Function SetMenu Lib "user32" (hWnd As HWND, hMenu As HMENU) As BOOL
1467
1468Declare 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
1469Declare 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
1470#ifdef UNICODE
1471Declare 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
1472#else
1473Declare 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
1474#endif ' !UNICODE
1475
1476Declare Function HiliteMenuItem Lib "user32" (ByVal hWnd As HWND, ByVal hMenu As HMENU, ByVal uIDHiliteItem As DWord, ByVal uHilite As DWord) As BOOL
1477
1478Declare 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
1479Declare 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
1480#ifdef UNICODE
1481Declare 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
1482#else
1483Declare 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
1484#endif ' !UNICODE
1485
1486Declare Function GetMenuState Lib "user32" (ByVal hMenu As HMENU, ByVal uId As DWord, ByVal uFlags As DWord) As DWord
1487
1488Declare Function AppendMenuA Lib "user32" (ByVal hMenu As HMENU, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCSTR) As BOOL
1489Declare Function AppendMenuW Lib "user32" (ByVal hMenu As HMENU, ByVal uFlags As DWord, ByVal uIDNewItem As ULONG_PTR, ByVal lpNewItem As LPCWSTR) As BOOL
1490#ifdef UNICODE
1491Declare 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
1492#else
1493Declare 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
1494#endif ' !UNICODE
1495
1496Declare 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
1497Declare 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
1498#ifdef UNICODE
1499Declare 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
1500#else
1501Declare 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
1502#endif ' !UNICODE
1503
1504Declare 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
1505
1506Declare Function GetMenuCheckMarkDimensions Lib "user32" () As Long
1507
1508Type TPMPARAMS
1509    cbSize As DWord
1510    rcExclude As RECT
1511End Type
1512TypeDef LPTPMPARAMS = *TPMPARAMS
1513
1514Declare 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
1515Declare Function GetMenuItemRect Lib "user32" (ByVal hWnd As HWND, ByVal hMenu As HMENU, ByVal uItem As DWord, ByRef lprcItem As RECT) As BOOL
1516Declare Function MenuItemFromPoint Lib "user32" (ByVal hWnd As HWND, ByVal hMenu As HMENU, ByRef ptScreen As POINTAPI) As Long
1517
1518Declare Function SetMenuContextHelpId Lib "user32" (hmenu As HMENU, dwContextHelpId As DWord) As BOOL
1519Declare Function SetMenuDefaultItem Lib "user32" (hMenu As HMENU, uItem As DWord, fByPos As DWord) As BOOL
1520Declare Function SetMenuItemInfo Lib "user32" Alias _FuncName_SetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
1521Declare Function SetParent Lib "user32" (hWndChild As HWND, hWndNewParent As HWND) As HWND
1522Declare Function SetProp Lib "user32" Alias _FuncName_SetProp (hWnd As HWND, pString As PCTSTR, hData As HANDLE) As BOOL
1523
1524TypeDef PROPENUMPROCEXA = *Function(ByVal hwnd As HWND, ByVal lpszString As LPSTR, ByVal hData As HANDLE, ByVal dwData As ULONG_PTR) As BOOL
1525TypeDef PROPENUMPROCEXW = *Function(ByVal hwnd As HWND, ByVal lpszString As LPWSTR, ByVal hData As HANDLE, ByVal dwData As ULONG_PTR) As BOOL
1526#ifdef UNICODE
1527TypeDef PROPENUMPROCEX = PROPENUMPROCEXW
1528#else
1529TypeDef PROPENUMPROCEX = PROPENUMPROCEXA
1530#endif ' !UNICODE
1531
1532Declare Function EnumPropsExA Lib "user32" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCEXA, ByVal lParam As LPARAM) As Long
1533Declare Function EnumPropsExW Lib "user32" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCEXW, ByVal lParam As LPARAM) As Long
1534#ifdef UNICODE
1535Declare Function EnumPropsEx Lib "user32" Alias "EnumPropsExW" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCEXW, ByVal lParam As LPARAM) As Long
1536#else
1537Declare Function EnumPropsEx Lib "user32" Alias "EnumPropsExA" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCEXA, ByVal lParam As LPARAM) As Long
1538#endif ' !UNICODE
1539
1540
1541TypeDef PROPENUMPROCA = *Function(ByVal hwnd As HWND, ByVal lpszString As LPCSTR, ByVal hData As HANDLE) As BOOL
1542TypeDef PROPENUMPROCW = *Function(ByVal hwnd As HWND, ByVal lpszString As LPCWSTR, ByVal hData As HANDLE) As BOOL
1543#ifdef UNICODE
1544TypeDef PROPENUMPROC = PROPENUMPROCW
1545#else
1546TypeDef PROPENUMPROC = PROPENUMPROCA
1547#endif ' !UNICODE
1548
1549Declare Function EnumPropsA Lib "user32" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCA) As Long
1550Declare Function EnumPropsW Lib "user32" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCW) As Long
1551#ifdef UNICODE
1552Declare Function EnumProps Lib "user32" Alias "EnumPropsW" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCW) As Long
1553#else
1554Declare Function EnumProps Lib "user32" Alias "EnumPropsA" (ByVal hWnd As HWND, ByVal lpEnumFunc As PROPENUMPROCA) As Long
1555#endif ' !UNICODE
1556
1557Declare Function SetRect Lib "User32" (ByRef rc As RECT, xLeft As Long, yTop As Long, xRight As Long, yBottom As Long) As Long
1558Declare Function SetRectEmpty Lib "user32" (ByRef lprc As RECT) As BOOL
1559Declare Function CopyRect Lib "user32" (ByRef lprcDst As RECT, ByRef lprcSrc As RECT) As BOOL
1560Declare Function InflateRect Lib "user32" (ByRef lprc As RECT, ByVal dx As Long, ByVal dy As Long) As BOOL
1561Declare Function IntersectRect Lib "user32" (ByRef lprcDst As RECT, ByRef lprcSrc1 As RECT, ByRef lprcSrc2 As RECT) As BOOL
1562Declare Function UnionRect Lib "user32" (ByRef lprcDst As RECT, ByRef lprcSrc1 As RECT, ByRef lprcSrc2 As RECT) As BOOL
1563Declare Function SubtractRect Lib "user32" (ByRef lprcDst As RECT, ByRef lprcSrc1 As RECT, ByRef lprcSrc2 As RECT) As BOOL
1564Declare Function OffsetRect Lib "user32" (ByRef lprc As RECT, ByVal dx As Long, ByVal dy As Long) As BOOL
1565Declare Function IsRectEmpty Lib "user32" (ByRef lprc As RECT) As BOOL
1566Declare Function EqualRect Lib "user32" (ByRef lprc1 As RECT, ByRef lprc2 As RECT) As BOOL
1567Declare Function PtInRect Lib "user32" (ByRef lprc As RECT, ByRef pt As POINTAPI) As BOOL
1568Declare Function SetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL
1569Declare Function SetSysColors Lib "user32" (cElements As Long, lpaElements As *DWord, lpaRgbValues As *DWord) As BOOL
1570Declare Function SetSystemCursor Lib "user32" (ByVal hcur As HCURSOR, ByVal id As DWord) As BOOL
1571
1572Const USER_TIMER_MAXIMUM = &H7FFFFFFF
1573Const USER_TIMER_MINIMUM = &H0000000A
1574
1575TypeDef TIMERPROC = *Sub(hwnd As HWND, msg As DWord, idEvent As ULONG_PTR, dwTime As DWord)
1576Declare Function SetTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR, nElapse As DWord, lpTimerFunc As TIMERPROC) As ULONG_PTR
1577
1578Declare Function SetWindowContextHelpId Lib "user32" (hwnd As HWND, dwContextHelpId As DWord) As BOOL
1579#ifdef _WIN64
1580Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1581Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1582#else
1583Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1584Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1585#endif
1586
1587Declare Function SetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
1588
1589Const HWND_TOP =       0  As HWND
1590Const HWND_BOTTOM =    1  As HWND
1591Const HWND_TOPMOST =   -1 As HWND
1592Const HWND_NOTOPMOST = -2 As HWND
1593Const SWP_NOSIZE =         &H0001
1594Const SWP_NOMOVE =         &H0002
1595Const SWP_NOZORDER =       &H0004
1596Const SWP_NOREDRAW =       &H0008
1597Const SWP_NOACTIVATE =     &H0010
1598Const SWP_FRAMECHANGED =   &H0020
1599Const SWP_SHOWWINDOW =     &H0040
1600Const SWP_HIDEWINDOW =     &H0080
1601Const SWP_NOCOPYBITS =     &H0100
1602Const SWP_NOOWNERZORDER =  &H0200
1603Const SWP_NOSENDCHANGING = &H0400
1604Const SWP_DRAWFRAME =      SWP_FRAMECHANGED
1605Const SWP_NOREPOSITION =   SWP_NOOWNERZORDER
1606Const SWP_DEFERERASE =     &H2000
1607Const SWP_ASYNCWINDOWPOS = &H4000
1608Declare 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
1609
1610Declare Function SetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bRedraw As BOOL) As BOOL
1611Declare Function SetWindowsHookEx Lib "user32" Alias _FuncName_SetWindowsHookEx (idHook As Long, lpfn As HOOKPROC, hMod As HINSTANCE, dwThreadId As DWord) As HHOOK
1612Declare Function SetWindowText Lib "user32" Alias _FuncName_SetWindowText (hWnd As HWND, pString As PCTSTR) As BOOL
1613Declare Function ShowCaret Lib "user32" (hWnd As HWND) As BOOL
1614Declare Function ShowCursor Lib "user32" (bShow As Long) As BOOL
1615Declare Function ShowScrollBar Lib "user32" (hWnd As HWND, wBar As DWord, bShow As BOOL) As BOOL
1616
1617Const SW_HIDE =            0
1618Const SW_SHOWNORMAL =      1
1619Const SW_NORMAL =          1
1620Const SW_SHOWMINIMIZED =   2
1621Const SW_SHOWMAXIMIZED =   3
1622Const SW_MAXIMIZE =        3
1623Const SW_SHOWNOACTIVATE =  4
1624Const SW_SHOW =            5
1625Const SW_MINIMIZE =        6
1626Const SW_SHOWMINNOACTIVE = 7
1627Const SW_SHOWNA =          8
1628Const SW_RESTORE =         9
1629Const SW_SHOWDEFAULT =     10
1630Const SW_FORCEMINIMIZE =   11
1631Const SW_MAX =             11
1632Declare Function ShowWindow Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
1633Declare Function ShowWindowAsync Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
1634
1635Type NONCLIENTMETRICSW
1636    cbSize As DWord
1637    iBorderWidth As Long
1638    iScrollWidth As Long
1639    iScrollHeight As Long
1640    iCaptionWidth As Long
1641    iCaptionHeight As Long
1642    lfCaptionFont As LOGFONTW
1643    iSmCaptionWidth As Long
1644    iSmCaptionHeight As Long
1645    lfSmCaptionFont As LOGFONTW
1646    iMenuWidth As Long
1647    iMenuHeight As Long
1648    lfMenuFont As LOGFONTW
1649    lfStatusFont As LOGFONTW
1650    lfMessageFont As LOGFONTW
1651End Type
1652Type NONCLIENTMETRICSA
1653    cbSize As DWord
1654    iBorderWidth As Long
1655    iScrollWidth As Long
1656    iScrollHeight As Long
1657    iCaptionWidth As Long
1658    iCaptionHeight As Long
1659    lfCaptionFont As LOGFONTA
1660    iSmCaptionWidth As Long
1661    iSmCaptionHeight As Long
1662    lfSmCaptionFont As LOGFONTA
1663    iMenuWidth As Long
1664    iMenuHeight As Long
1665    lfMenuFont As LOGFONTA
1666    lfStatusFont As LOGFONTA
1667    lfMessageFont As LOGFONTA
1668End Type
1669#ifdef UNICODE
1670TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSW
1671#else
1672TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSA
1673#endif
1674Const SPI_GETBEEP =               1
1675Const SPI_SETBEEP =               2
1676Const SPI_GETMOUSE =              3
1677Const SPI_SETMOUSE =              4
1678Const SPI_GETBORDER =             5
1679Const SPI_SETBORDER =             6
1680Const SPI_GETKEYBOARDSPEED =      10
1681Const SPI_SETKEYBOARDSPEED =      11
1682Const SPI_LANGDRIVER =            12
1683Const SPI_ICONHORIZONTALSPACING = 13
1684Const SPI_GETSCREENSAVETIMEOUT =  14
1685Const SPI_SETSCREENSAVETIMEOUT =  15
1686Const SPI_GETSCREENSAVEACTIVE =   16
1687Const SPI_SETSCREENSAVEACTIVE =   17
1688Const SPI_GETGRIDGRANULARITY =    18
1689Const SPI_SETGRIDGRANULARITY =    19
1690Const SPI_SETDESKWALLPAPER =      20
1691Const SPI_SETDESKPATTERN =        21
1692Const SPI_GETKEYBOARDDELAY =      22
1693Const SPI_SETKEYBOARDDELAY =      23
1694Const SPI_ICONVERTICALSPACING =   24
1695Const SPI_GETICONTITLEWRAP =      25
1696Const SPI_SETICONTITLEWRAP =      26
1697Const SPI_GETMENUDROPALIGNMENT =  27
1698Const SPI_SETMENUDROPALIGNMENT =  28
1699Const SPI_SETDOUBLECLKWIDTH =     29
1700Const SPI_SETDOUBLECLKHEIGHT =    30
1701Const SPI_GETICONTITLELOGFONT =   31
1702Const SPI_SETDOUBLECLICKTIME =    32
1703Const SPI_SETMOUSEBUTTONSWAP =    33
1704Const SPI_SETICONTITLELOGFONT =   34
1705Const SPI_GETFASTTASKSWITCH =     35
1706Const SPI_SETFASTTASKSWITCH =     36
1707Const SPI_SETDRAGFULLWINDOWS =    37
1708Const SPI_GETDRAGFULLWINDOWS =    38
1709Const SPI_GETNONCLIENTMETRICS =   41
1710Const SPI_SETNONCLIENTMETRICS =   42
1711Const SPI_GETMINIMIZEDMETRICS =   43
1712Const SPI_SETMINIMIZEDMETRICS =   44
1713Const SPI_GETICONMETRICS =        45
1714Const SPI_SETICONMETRICS =        46
1715Const SPI_SETWORKAREA =           47
1716Const SPI_GETWORKAREA =           48
1717Const SPI_SETPENWINDOWS =         49
1718Const SPI_GETHIGHCONTRAST =       66
1719Const SPI_SETHIGHCONTRAST =       67
1720Const SPI_GETKEYBOARDPREF =       68
1721Const SPI_SETKEYBOARDPREF =       69
1722Const SPI_GETSCREENREADER =       70
1723Const SPI_SETSCREENREADER =       71
1724Const SPI_GETANIMATION =          72
1725Const SPI_SETANIMATION =          73
1726Const SPI_GETFONTSMOOTHING =      74
1727Const SPI_SETFONTSMOOTHING =      75
1728Const SPI_SETDRAGWIDTH =          76
1729Const SPI_SETDRAGHEIGHT =         77
1730Const SPI_SETHANDHELD =           78
1731Const SPI_GETLOWPOWERTIMEOUT =    79
1732Const SPI_GETPOWEROFFTIMEOUT =    80
1733Const SPI_SETLOWPOWERTIMEOUT =    81
1734Const SPI_SETPOWEROFFTIMEOUT =    82
1735Const SPI_GETLOWPOWERACTIVE =     83
1736Const SPI_GETPOWEROFFACTIVE =     84
1737Const SPI_SETLOWPOWERACTIVE =     85
1738Const SPI_SETPOWEROFFACTIVE =     86
1739Const SPI_SETCURSORS =            87
1740Const SPI_SETICONS =              88
1741Const SPI_GETDEFAULTINPUTLANG =   89
1742Const SPI_SETDEFAULTINPUTLANG =   90
1743Const SPI_SETLANGTOGGLE =         91
1744Const SPI_GETWINDOWSEXTENSION =   92
1745Const SPI_SETMOUSETRAILS =        93
1746Const SPI_GETMOUSETRAILS =        94
1747Const SPI_SETSCREENSAVERRUNNING = 97
1748Const SPI_SCREENSAVERRUNNING =    SPI_SETSCREENSAVERRUNNING
1749Const SPI_GETFILTERKEYS =         50
1750Const SPI_SETFILTERKEYS =         51
1751Const SPI_GETTOGGLEKEYS =         52
1752Const SPI_SETTOGGLEKEYS =         53
1753Const SPI_GETMOUSEKEYS =          54
1754Const SPI_SETMOUSEKEYS =          55
1755Const SPI_GETSHOWSOUNDS =         56
1756Const SPI_SETSHOWSOUNDS =         57
1757Const SPI_GETSTICKYKEYS =         58
1758Const SPI_SETSTICKYKEYS =         59
1759Const SPI_GETACCESSTIMEOUT =      60
1760Const SPI_SETACCESSTIMEOUT =      61
1761Const SPI_GETSERIALKEYS =         62
1762Const SPI_SETSERIALKEYS =         63
1763Const SPI_GETSOUNDSENTRY =        64
1764Const SPI_SETSOUNDSENTRY =        65
1765Const SPI_GETMOUSEHOVERWIDTH =    98
1766Const SPI_SETMOUSEHOVERWIDTH =    99
1767Const SPI_GETMOUSEHOVERHEIGHT =   100
1768Const SPI_SETMOUSEHOVERHEIGHT =   101
1769Const SPI_GETMOUSEHOVERTIME =     102
1770Const SPI_SETMOUSEHOVERTIME =     103
1771Const SPI_GETWHEELSCROLLLINES =   104
1772Const SPI_SETWHEELSCROLLLINES =   105
1773Const SPI_GETSHOWIMEUI =          110
1774Const SPI_SETSHOWIMEUI =          111
1775Const SPI_GETMOUSESPEED =         112
1776Const SPI_SETMOUSESPEED =         113
1777Const SPI_GETSCREENSAVERRUNNING = 114
1778Const SPI_GETACTIVEWINDOWTRACKING =       &H1000    'Windows 2000 or later
1779Const SPI_SETACTIVEWINDOWTRACKING =       &H1001
1780Const SPI_GETMENUANIMATION =              &H1002
1781Const SPI_SETMENUANIMATION =              &H1003
1782Const SPI_GETCOMBOBOXANIMATION =          &H1004
1783Const SPI_SETCOMBOBOXANIMATION =          &H1005
1784Const SPI_GETLISTBOXSMOOTHSCROLLING =     &H1006
1785Const SPI_SETLISTBOXSMOOTHSCROLLING =     &H1007
1786Const SPI_GETGRADIENTCAPTIONS =           &H1008
1787Const SPI_SETGRADIENTCAPTIONS =           &H1009
1788Const SPI_GETMENUUNDERLINES =             &H100A
1789Const SPI_SETMENUUNDERLINES =             &H100B
1790Const SPI_GETACTIVEWNDTRKZORDER =         &H100C
1791Const SPI_SETACTIVEWNDTRKZORDER =         &H100D
1792Const SPI_GETHOTTRACKING =                &H100E
1793Const SPI_SETHOTTRACKING =                &H100F
1794Const SPI_GETFOREGROUNDLOCKTIMEOUT =      &H2000
1795Const SPI_SETFOREGROUNDLOCKTIMEOUT =      &H2001
1796Const SPI_GETACTIVEWNDTRKTIMEOUT =        &H2002
1797Const SPI_SETACTIVEWNDTRKTIMEOUT =        &H2003
1798Const SPI_GETFOREGROUNDFLASHCOUNT =       &H2004
1799Const SPI_SETFOREGROUNDFLASHCOUNT =       &H2005
1800Const SPIF_UPDATEINIFILE =    &H0001
1801Const SPIF_SENDWININICHANGE = &H0002
1802Const SPIF_SENDCHANGE =       SPIF_SENDWININICHANGE
1803Declare Function SystemParametersInfo Lib "user32" Alias _FuncName_SystemParametersInfo (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
1804
1805Const CDS_UPDATEREGISTRY = &H00000001
1806Const CDS_TEST            = &H00000002
1807Const CDS_FULLSCREEN      = &H00000004
1808Const CDS_GLOBAL          = &H00000008
1809Const CDS_SET_PRIMARY     = &H00000010
1810Const CDS_VIDEOPARAMETERS = &H00000020
1811Const CDS_RESET           = &H40000000
1812Const CDS_NORESET         = &H10000000
1813
1814Const DISP_CHANGE_SUCCESSFUL    =   0
1815Const DISP_CHANGE_RESTART       =   1
1816Const DISP_CHANGE_FAILED        =  -1
1817Const DISP_CHANGE_BADMODE       =  -2
1818Const DISP_CHANGE_NOTUPDATED    =  -3
1819Const DISP_CHANGE_BADFLAGS      =  -4
1820Const DISP_CHANGE_BADPARAM      =  -5
1821Const DISP_CHANGE_BADDUALVIEW   =  -6
1822
1823#ifdef _INC_GDI
1824Declare Function ChangeDisplaySettingsA Lib "user32" (ByVal lpDevMode As *DEVMODEA, ByVal dwFlags As DWord) As Long
1825Declare Function ChangeDisplaySettingsW Lib "user32" (ByVal lpDevMode As *DEVMODEW, ByVal dwFlags As DWord) As Long
1826#ifdef UNICODE
1827Declare Function ChangeDisplaySettings Lib "user32" Alias _FuncName_ChangeDisplaySettings (ByVal lpDevMode As *DEVMODEW, ByVal dwFlags As DWord) As Long
1828#else
1829Declare Function ChangeDisplaySettings Lib "user32" Alias _FuncName_ChangeDisplaySettings (ByVal lpDevMode As *DEVMODEA, ByVal dwFlags As DWord) As Long
1830#endif
1831
1832Declare 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
1833Declare 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
1834#ifdef UNICODE
1835Declare 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
1836#else
1837Declare 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
1838#endif
1839
1840Const ENUM_CURRENT_SETTINGS       = ((-1) As DWord)
1841Const ENUM_REGISTRY_SETTINGS      = ((-2) As DWord)
1842
1843Declare Function EnumDisplaySettingsA Lib "user32" (ByVal lpszDeviceName As LPCSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEA) As BOOL
1844Declare Function EnumDisplaySettingsW Lib "user32" (ByVal lpszDeviceName As LPCWSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEW) As BOOL
1845#ifdef UNICODE
1846Declare Function EnumDisplaySettings Lib "user32" Alias _FuncName_EnumDisplaySettings (ByVal lpszDeviceName As LPCWSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEW) As BOOL
1847#else
1848Declare Function EnumDisplaySettings Lib "user32" Alias _FuncName_EnumDisplaySettings (ByVal lpszDeviceName As LPCSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEA) As BOOL
1849#endif
1850
1851/*#ifdef(WINVER >= &h0500)
1852Declare Function EnumDisplaySettingsExA Lib "user32" (ByVal lpszDeviceName As LPCSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEA, ByVal dwFlags As DWord) As BOOL
1853Declare Function EnumDisplaySettingsExW Lib "user32" (ByVal lpszDeviceName As LPCWSTR, ByVal iModeNum As DWord, ByVal lpDevMode As *DEVMODEW, ByVal dwFlags As DWord) As BOOL
1854#ifdef UNICODE
1855Declare 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
1856#else
1857Declare 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
1858#endif
1859
1860Const EDS_RAWMODE  = &H00000002
1861
1862Declare Function EnumDisplayDevicesA Lib "user32" (ByVal lpDevice As LPCSTR, ByVal iDevNum As DWord, ByVal lpDisplayDevice As *DISPLAY_DEVICEA, ByVal dwFlags As DWord) As BOOL
1863Declare Function EnumDisplayDevicesW Lib "user32" (ByVal lpDevice As LPCWSTR, ByVal iDevNum As DWord, ByVal lpDisplayDevice As *DISPLAY_DEVICEW, ByVal dwFlags As DWord)As BOOL
1864#ifdef UNICODE
1865Declare 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
1866#else
1867Declare 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
1868#endif
1869#endif */ /* WINVER >= &h0500 */
1870#endif ' _INC_GDI
1871
1872Const TME_HOVER       = &H00000001
1873Const TME_LEAVE       = &H00000002
1874Const TME_NONCLIENT   = &H00000010
1875Const TME_QUERY       = &H40000000
1876Const TME_CANCEL      = &H80000000
1877Const HOVER_DEFAULT   = &HFFFFFFFF
1878Type TRACKMOUSEEVENT
1879    cbSize As DWord
1880    dwFlags As DWord
1881    hwndTrack As HWND
1882    dwHoverTime As DWord
1883End Type
1884Declare Function TrackMouseEvent Lib "user32" (ByRef EventTrack As TRACKMOUSEEVENT) As BOOL
1885
1886Const TPM_LEFTBUTTON =   &H0000
1887Const TPM_RIGHTBUTTON =  &H0002
1888Const TPM_LEFTALIGN =    &H0000
1889Const TPM_CENTERALIGN =  &H0004
1890Const TPM_RIGHTALIGN =   &H0008
1891Const TPM_TOPALIGN =     &H0000
1892Const TPM_VCENTERALIGN = &H0010
1893Const TPM_BOTTOMALIGN =  &H0020
1894Const TPM_HORIZONTAL =   &H0000
1895Const TPM_VERTICAL =     &H0040
1896Const TPM_NONOTIFY =     &H0080
1897Const TPM_RETURNCMD =    &H0100
1898Const TPM_RECURSE =      &H0001
1899Declare 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
1900
1901declare function UnhookWindowsHookEx lib "user32" (ByVal hhk As HHOOK) As BOOL
1902Declare Function UnregisterClass Lib "user32" Alias _FuncName_UnregisterClass (pClassName As PCTSTR, hinst As HINSTANCE) As BOOL
1903Declare Function UnregisterHotKey Lib "user32" (hwnd As HWND, id As Long) As BOOL
1904Declare Function UpdateWindow Lib "user32" (hWnd As HWND) As BOOL
1905Declare Function ValidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
1906Declare Function ValidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As BOOL
1907Declare Function WaitForInputIdle Lib "user32" (hProcess As HANDLE, dwMilliseconds As DWord) As DWord
1908
1909Declare Function WaitMessage Lib "user32" () As BOOL
1910Declare Function WindowFromDC Lib "user32" (hDC As HDC) As HWND
1911Declare Function WindowFromPoint Lib "user32" (ptX As Long, ptY As Long) As HWND
1912
1913TypeDef HELPPOLY = DWord
1914
1915Type MULTIKEYHELPA
1916    mkSize As DWord
1917    mkKeylist As SByte
1918    szKeyphrase[ELM(1)] As SByte
1919End Type
1920TypeDef PMULTIKEYHELPA=*MULTIKEYHELPA
1921TypeDef LPMULTIKEYHELPA=*MULTIKEYHELPA
1922Type MULTIKEYHELPW
1923    mkSize As DWord
1924    mkKeylist As Word
1925    szKeyphrase[ELM(1)] As Word
1926End Type
1927TypeDef PMULTIKEYHELPW=*MULTIKEYHELPW
1928TypeDef LPMULTIKEYHELPW=*MULTIKEYHELPW
1929
1930#ifdef UNICODE
1931TypeDef MULTIKEYHELP = MULTIKEYHELPW
1932TypeDef PMULTIKEYHELP = PMULTIKEYHELPW
1933TypeDef LPMULTIKEYHELP = LPMULTIKEYHELPW
1934#else
1935TypeDef MULTIKEYHELP = MULTIKEYHELPA
1936TypeDef PMULTIKEYHELP = PMULTIKEYHELPA
1937TypeDef LPMULTIKEYHELP = LPMULTIKEYHELPA
1938#endif ' UNICODE
1939
1940Type HELPWININFOA
1941    wStructSize As Long
1942    x As Long
1943    y As Long
1944    dx As Long
1945    dy As Long
1946    wMax As Long
1947    rgchMember[ELM(2)] As SByte
1948End Type
1949TypeDef PHELPWININFOA=*HELPWININFOA
1950TypeDef LPHELPWININFOA=*HELPWININFOA
1951Type HELPWININFOW
1952    wStructSize As Long
1953    x As Long
1954    y As Long
1955    dx As Long
1956    dy As Long
1957    wMax As Long
1958    rgchMember[ELM(2)] As Word
1959End Type
1960TypeDef PHELPWININFOW=*HELPWININFOW
1961TypeDef LPHELPWININFOW=*HELPWININFOW
1962
1963#ifdef UNICODE
1964TypeDef HELPWININFO = HELPWININFOW
1965TypeDef PHELPWININFO = PHELPWININFOW
1966TypeDef LPHELPWININFO = LPHELPWININFOW
1967#else
1968TypeDef HELPWININFO = HELPWININFOA
1969TypeDef PHELPWININFO = PHELPWININFOA
1970TypeDef LPHELPWININFO = LPHELPWININFOA
1971#endif ' UNICODE
1972
1973Const HELP_CONTEXT = &H0001
1974Const HELP_QUIT = &H0002
1975Const HELP_INDEX = &H0003
1976Const HELP_CONTENTS = &H0003
1977Const HELP_HELPONHELP = &H0004
1978Const HELP_SETINDEX = &H0005
1979Const HELP_SETCONTENTS = &H0005
1980Const HELP_CONTEXTPOPUP = &H0008
1981Const HELP_FORCEFILE = &H0009
1982Const HELP_KEY = &H0101
1983Const HELP_COMMAND = &H0102
1984Const HELP_PARTIALKEY = &H0105
1985Const HELP_MULTIKEY = &H0201
1986Const HELP_SETWINPOS = &H0203
1987Const HELP_CONTEXTMENU = &H000a
1988Const HELP_FINDER = &H000b
1989Const HELP_WM_HELP = &H000c
1990Const HELP_SETPOPUP_POS = &H000d
1991Const HELP_TCARD = &H8000
1992Const HELP_TCARD_DATA = &H0010
1993Const HELP_TCARD_OTHER_CALLER = &H0011
1994
1995Const IDH_NO_HELP = 28440
1996Const IDH_MISSING_CONTEXT = 28441
1997Const IDH_GENERIC_HELP_BUTTON = 28442
1998Const IDH_OK = 28443
1999Const IDH_CANCEL = 28444
2000Const IDH_HELP = 28445
2001
2002Declare Function WinHelpA Lib "user32" (ByVal hWndMain As HWND, ByVal lpszHelp As LPCSTR, ByVal uCommand As DWord, ByVal dwData As ULONG_PTR) As BOOL
2003Declare Function WinHelpW Lib "user32" (ByVal hWndMain As HWND, ByVal lpszHelp As LPCWSTR, ByVal uCommand As DWord, ByVal dwData As ULONG_PTR) As BOOL
2004#ifdef UNICODE
2005Declare 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
2006#else
2007Declare 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
2008#endif ' !UNICODE
2009
2010Declare Function wsprintf cdecl Lib "user32" Alias _FuncName_wsprintf (pText As PTSTR, pFormat As PCTSTR, ...) As Long
2011Declare Function wvsprintf Lib "user32" Alias _FuncName_wvsprintf (pOutput As PTSTR, pFormat As PCTSTR, arglist As DWordPtr) As Long
2012
2013Type GUITHREADINFO
2014    cbSize As DWord
2015    flags As DWord
2016    hwndActive As HWND
2017    hwndFocus As HWND
2018    hwndCapture As HWND
2019    hwndMenuOwner As HWND
2020    hwndMoveSize As HWND
2021    hwndCaret As HWND
2022    rcCaret As RECT
2023End Type
2024TypeDef PGUITHREADINFO = *GUITHREADINFO
2025TypeDef LPGUITHREADINFO = *GUITHREADINFO
2026
2027Const GUI_CARETBLINKING = &H00000001
2028Const GUI_INMOVESIZE = &H00000002
2029Const GUI_INMENUMODE = &H00000004
2030Const GUI_SYSTEMMENUMODE = &H00000008
2031Const GUI_POPUPMENUMODE = &H00000010
2032Const GUI_16BITTASK = &H00000020
2033
2034Declare Function GetGUIThreadInfo Lib "user32" (ByVal idThread As DWord, ByRef pgui As GUITHREADINFO) As BOOL
2035
2036Const STATE_SYSTEM_UNAVAILABLE = &H00000001
2037Const STATE_SYSTEM_SELECTED = &H00000002
2038Const STATE_SYSTEM_FOCUSED = &H00000004
2039Const STATE_SYSTEM_PRESSED = &H00000008
2040Const STATE_SYSTEM_CHECKED = &H00000010
2041Const STATE_SYSTEM_MIXED = &H00000020
2042Const STATE_SYSTEM_INDETERMINATE = STATE_SYSTEM_MIXED
2043Const STATE_SYSTEM_READONLY = &H00000040
2044Const STATE_SYSTEM_HOTTRACKED = &H00000080
2045Const STATE_SYSTEM_DEFAULT = &H00000100
2046Const STATE_SYSTEM_EXPANDED = &H00000200
2047Const STATE_SYSTEM_COLLAPSED = &H00000400
2048Const STATE_SYSTEM_BUSY = &H00000800
2049Const STATE_SYSTEM_FLOATING = &H00001000
2050Const STATE_SYSTEM_MARQUEED = &H00002000
2051Const STATE_SYSTEM_ANIMATED = &H00004000
2052Const STATE_SYSTEM_INVISIBLE = &H00008000
2053Const STATE_SYSTEM_OFFSCREEN = &H00010000
2054Const STATE_SYSTEM_SIZEABLE = &H00020000
2055Const STATE_SYSTEM_MOVEABLE = &H00040000
2056Const STATE_SYSTEM_SELFVOICING = &H00080000
2057Const STATE_SYSTEM_FOCUSABLE = &H00100000
2058Const STATE_SYSTEM_SELECTABLE = &H00200000
2059Const STATE_SYSTEM_LINKED = &H00400000
2060Const STATE_SYSTEM_TRAVERSED = &H00800000
2061Const STATE_SYSTEM_MULTISELECTABLE = &H01000000
2062Const STATE_SYSTEM_EXTSELECTABLE = &H02000000
2063Const STATE_SYSTEM_ALERT_LOW = &H04000000
2064Const STATE_SYSTEM_ALERT_MEDIUM = &H08000000
2065Const STATE_SYSTEM_ALERT_HIGH = &H10000000
2066Const STATE_SYSTEM_PROTECTED = &H20000000
2067Const STATE_SYSTEM_VALID = &H3FFFFFFF
2068
2069Const CCHILDREN_TITLEBAR = 5
2070Const CCHILDREN_SCROLLBAR = 5
2071
2072
2073Type CURSORINFO
2074    cbSize As DWord
2075    flags As DWord
2076    hCursor As HCURSOR
2077    ptScreenPos As POINTAPI
2078End Type
2079TypeDef PCURSORINFO=*CURSORINFO
2080TypeDef LPCURSORINFO=*CURSORINFO
2081
2082Const CURSOR_SHOWING = &H00000001
2083
2084Declare Function GetCursorInfo Lib "user32" (ByRef pci As CURSORINFO) As BOOL
2085
2086
2087Type MENUBARINFO
2088    cbSize As DWord
2089    rcBar As RECT
2090    hMenu As HMENU
2091    hwndMenu As HWND
2092    fields As BOOL
2093/*  fBarFocused As BOOL
2094    fFocused As BOOL*/
2095End Type
2096TypeDef PMENUBARINFO=*MENUBARINFO
2097TypeDef LPMENUBARINFO=*MENUBARINFO
2098
2099Declare Function GetMenuBarInfo Lib "user32" (ByVal hwnd As HWND, ByVal idObject As Long, ByVal idItem As Long, ByRef pmbi As MENUBARINFO) As BOOL
2100
2101Type COMBOBOXINFO
2102    cbSize As DWord
2103    rcItem As RECT
2104    rcButton As RECT
2105    stateButton As DWord
2106    hwndCombo As HWND
2107    hwndItem As HWND
2108    hwndList As HWND
2109End Type
2110TypeDef PCOMBOBOXINFO=*COMBOBOXINFO
2111TypeDef LPCOMBOBOXINFO=*COMBOBOXINFO
2112
2113Declare Function GetComboBoxInfo Lib "user32" (ByVal hwndCombo As HWND, ByRef pcbi As COMBOBOXINFO) As BOOL
2114
2115
2116Const GA_PARENT = 1
2117Const GA_ROOT = 2
2118Const GA_ROOTOWNER = 3
2119
2120Declare Function GetAncestor Lib "user32" (ByVal hwnd As HWND, ByVal gaFlags As DWord) As HWND
2121
2122
2123Declare Function RealGetWindowClassA Lib "user32" (ByVal hwnd As HWND, ByVal ptszClassName As LPSTR, ByVal cchClassNameMax As DWord) As DWord
2124Declare Function RealGetWindowClassW Lib "user32" (ByVal hwnd As HWND, ByVal ptszClassName As LPWSTR, ByVal cchClassNameMax As DWord) As DWord
2125#ifdef UNICODE
2126Declare Function RealGetWindowClass Lib "user32" Alias "RealGetWindowClassW" (ByVal hwnd As HWND, ByVal ptszClassName As LPWSTR, ByVal cchClassNameMax As DWord) As DWord
2127#else
2128Declare Function RealGetWindowClass Lib "user32" Alias "RealGetWindowClassA" (ByVal hwnd As HWND, ByVal ptszClassName As LPSTR, ByVal cchClassNameMax As DWord) As DWord
2129#endif ' !UNICODE
2130
2131
2132Type ALTTABINFO
2133    cbSize As DWord
2134    cItems As Long
2135    cColumns As Long
2136    cRows As Long
2137    iColFocus As Long
2138    iRowFocus As Long
2139    cxItem As Long
2140    cyItem As Long
2141    ptStart As POINTAPI
2142End Type
2143TypeDef PALTTABINFO=*ALTTABINFO
2144TypeDef LPALTTABINFO=*ALTTABINFO
2145
2146Declare 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
2147Declare 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
2148#ifdef UNICODE
2149Declare 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
2150#else
2151Declare 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
2152#endif ' !UNICODE
Note: See TracBrowser for help on using the repository browser.