source: Include/api_window.sbp@ 170

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

winnt.ab, windef.ab, guiddef.abを導入

File size: 65.7 KB
Line 
1' api_window.sbp - Window Control API
2
3
4#ifndef _INC_WINDOW
5#define _INC_WINDOW
6
7'-------------
8' Window API Function Names
9#ifdef UNICODE
10Const _FuncName_CallWindowProc = "CallWindowProcW"
11Const _FuncName_CharLower = "CharLowerW"
12Const _FuncName_CharNext = "CharNextW"
13Const _FuncName_CharPrev = "CharPrevW"
14Const _FuncName_CharUpper = "CharUpperW"
15Const _FuncName_CreateAcceleratorTable = "CreateAcceleratorTableW"
16Const _FuncName_CreateWindowEx = "CreateWindowExW"
17Const _FuncName_DefDlgProc = "DefDlgProcW"
18Const _FuncName_DefWindowProc = "DefWindowProcW"
19Const _FuncName_DialogBoxIndirectParam = "DialogBoxIndirectParamW"
20Const _FuncName_DispatchMessage = "DispatchMessageW"
21Const _FuncName_DlgDirList = "DlgDirListW"
22Const _FuncName_DlgDirListComboBox = "DlgDirListComboBoxW"
23Const _FuncName_DlgDirSelectComboBoxEx = "DlgDirSelectComboBoxExW"
24Const _FuncName_DlgDirSelectEx = "DlgDirSelectExW"
25Const _FuncName_DrawText = "DrawTextW"
26Const _FuncName_DrawTextEx = "DrawTextExW"
27Const _FuncName_FindWindow = "FindWindowW"
28Const _FuncName_FindWindowEx = "FindWindowExW"
29Const _FuncName_GetClassInfoEx = "GetClassInfoExW"
30Const _FuncName_GetClassLong = "GetClassLongW"
31Const _FuncName_GetClassLongPtr = "GetClassLongPtrW"
32Const _FuncName_GetClassName = "GetClassNameW"
33Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameW"
34Const _FuncName_GetDlgItemText = "GetDlgItemTextW"
35Const _FuncName_GetMonitorInfo = "GetMonitorInfoW"
36Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoW"
37Const _FuncName_GetMessage = "GetMessageW"
38Const _FuncName_GetProp = "GetPropW"
39Const _FuncName_GetWindowLong = "GetWindowLongW"
40Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrW"
41Const _FuncName_GetWindowText = "GetWindowTextW"
42Const _FuncName_GetWindowTextLength = "GetWindowTextLengthW"
43Const _FuncName_GetWindowModuleFileName = "GetWindowModuleFileNameW"
44Const _FuncName_InsertMenuItem = "InsertMenuItemW"
45Const _FuncName_IsCharAlpha = "IsCharAlphaW"
46Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericW"
47Const _FuncName_IsCharLower = "IsCharLowerW"
48Const _FuncName_IsCharUpper = "IsCharUpperW"
49Const _FuncName_IsDialogMessage = "IsDialogMessageW"
50Const _FuncName_LoadBitmap = "LoadBitmapW"
51Const _FuncName_LoadCursor = "LoadCursorW"
52Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileW"
53Const _FuncName_LoadIcon = "LoadIconW"
54Const _FuncName_LoadImage = "LoadImageW"
55Const _FuncName_LoadString = "LoadStringW"
56Const _FuncName_MapVirtualKey = "MapVirtualKeyW"
57Const _FuncName_PeekMessage = "PeekMessageW"
58Const _FuncName_PostMessage = "PostMessageW"
59Const _FuncName_PostThreadMessage = "PostThreadMessageW"
60Const _FuncName_RegisterClassEx = "RegisterClassExW"
61Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatW"
62Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageW"
63Const _FuncName_RemoveProp = "RemovePropW"
64Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageW"
65Const _FuncName_SendMessage = "SendMessageW"
66Const _FuncName_SendNotifyMessage = "SendNotifyMessageW"
67Const _FuncName_SetDlgItemText = "SetDlgItemTextW"
68Const _FuncName_SetClassLong = "SetClassLongW"
69Const _FuncName_SetClassLongPtr = "SetClassLongPtrW"
70Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoW"
71Const _FuncName_SetProp = "SetPropW"
72Const _FuncName_SetWindowLong = "SetWindowLongW"
73Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrW"
74Const _FuncName_SetWindowText = "SetWindowTextW"
75Const _FuncName_SetWindowsHookEx = "SetWindowsHookExW"
76Const _FuncName_SystemParametersInfo = "SystemParametersInfoW"
77Const _FuncName_TranslateAccelerator = "TranslateAcceleratorW"
78Const _FuncName_UnregisterClass = "UnregisterClassW"
79Const _FuncName_wsprintf = "wsprintfW"
80Const _FuncName_wvsprintf = "wvsprintfW"
81#else
82Const _FuncName_CallWindowProc = "CallWindowProcA"
83Const _FuncName_CharLower = "CharLowerA"
84Const _FuncName_CharNext = "CharNextA"
85Const _FuncName_CharPrev = "CharPrevA"
86Const _FuncName_CharUpper = "CharUpperA"
87Const _FuncName_CreateAcceleratorTable = "CreateAcceleratorTableA"
88Const _FuncName_CreateWindowEx = "CreateWindowExA"
89Const _FuncName_DefDlgProc = "DefDlgProcA"
90Const _FuncName_DefWindowProc = "DefWindowProcA"
91Const _FuncName_DialogBoxIndirectParam = "DialogBoxIndirectParamA"
92Const _FuncName_DispatchMessage = "DispatchMessageA"
93Const _FuncName_DlgDirList = "DlgDirListA"
94Const _FuncName_DlgDirListComboBox = "DlgDirListComboBoxA"
95Const _FuncName_DlgDirSelectComboBoxEx = "DlgDirSelectComboBoxExA"
96Const _FuncName_DlgDirSelectEx = "DlgDirSelectExA"
97Const _FuncName_DrawText = "DrawTextA"
98Const _FuncName_DrawTextEx = "DrawTextExA"
99Const _FuncName_FindWindow = "FindWindowA"
100Const _FuncName_FindWindowEx = "FindWindowExA"
101Const _FuncName_GetClassInfoEx = "GetClassInfoExA"
102Const _FuncName_GetClassLong = "GetClassLongA"
103Const _FuncName_GetClassLongPtr = "GetClassLongPtrA"
104Const _FuncName_GetClassName = "GetClassNameA"
105Const _FuncName_GetClipboardFormatName = "GetClipboardFormatNameA"
106Const _FuncName_GetDlgItemText = "GetDlgItemTextA"
107Const _FuncName_GetMenuItemInfo = "GetMenuItemInfoA"
108Const _FuncName_GetMessage = "GetMessageA"
109Const _FuncName_GetMonitorInfo = "GetMonitorInfoA"
110Const _FuncName_GetProp = "GetPropA"
111Const _FuncName_GetWindowLong = "GetWindowLongA"
112Const _FuncName_GetWindowLongPtr = "GetWindowLongPtrA"
113Const _FuncName_GetWindowText = "GetWindowTextA"
114Const _FuncName_GetWindowTextLength = "GetWindowTextLengthA"
115Const _FuncName_GetWindowModuleFileName = "GetWindowModuleFileNameA"
116Const _FuncName_InsertMenuItem = "InsertMenuItemA"
117Const _FuncName_IsCharAlpha = "IsCharAlphaA"
118Const _FuncName_IsCharAlphaNumeric = "IsCharAlphaNumericA"
119Const _FuncName_IsCharLower = "IsCharLowerA"
120Const _FuncName_IsCharUpper = "IsCharUpperA"
121Const _FuncName_IsDialogMessage = "IsDialogMessageA"
122Const _FuncName_LoadBitmap = "LoadBitmapA"
123Const _FuncName_LoadCursor = "LoadCursorA"
124Const _FuncName_LoadCursorFromFile = "LoadCursorFromFileA"
125Const _FuncName_LoadIcon = "LoadIconA"
126Const _FuncName_LoadImage = "LoadImageA"
127Const _FuncName_LoadString = "LoadStringA"
128Const _FuncName_MapVirtualKey = "MapVirtualKeyA"
129Const _FuncName_PeekMessage = "PeekMessageA"
130Const _FuncName_PostMessage = "PostMessageA"
131Const _FuncName_PostThreadMessage = "PostThreadMessageA"
132Const _FuncName_RegisterClassEx = "RegisterClassExA"
133Const _FuncName_RegisterClipboardFormat = "RegisterClipboardFormatA"
134Const _FuncName_RegisterWindowMessage = "RegisterWindowMessageA"
135Const _FuncName_RemoveProp = "RemovePropA"
136Const _FuncName_SendDlgItemMessage = "SendDlgItemMessageA"
137Const _FuncName_SendMessage = "SendMessageA"
138Const _FuncName_SendNotifyMessage = "SendNotifyMessageA"
139Const _FuncName_SetDlgItemText = "SetDlgItemTextA"
140Const _FuncName_SetClassLong = "SetClassLongA"
141Const _FuncName_SetClassLongPtr = "SetClassLongPtrA"
142Const _FuncName_SetMenuItemInfo = "SetMenuItemInfoA"
143Const _FuncName_SetProp = "SetPropA"
144Const _FuncName_SetWindowLong = "SetWindowLongA"
145Const _FuncName_SetWindowLongPtr = "SetWindowLongPtrA"
146Const _FuncName_SetWindowsHookEx = "SetWindowsHookExA"
147Const _FuncName_SetWindowText = "SetWindowTextA"
148Const _FuncName_SystemParametersInfo = "SystemParametersInfoA"
149Const _FuncName_TranslateAccelerator = "TranslateAcceleratorA"
150Const _FuncName_UnregisterClass = "UnregisterClassA"
151Const _FuncName_wsprintf = "wsprintfA"
152Const _FuncName_wvsprintf = "wvsprintfA"
153#endif
154
155Type _System_DeclareHandle_HDWP:unused As DWord:End Type
156TypeDef HDWP = *_System_DeclareHandle_HDWP
157
158Type MSG
159 hwnd As HWND
160 message As DWord
161 wParam As WPARAM
162 lParam As LPARAM
163 time As DWord
164 pt As POINTAPI
165End Type
166
167Const IS_INTRESOURCE(_r) = ((((_r) As ULONG_PTR) >> 16) = 0)
168Const MAKEINTRESOURCEW(i) = ((((i) As Word) As ULONG_PTR) As PCWSTR)
169Const MAKEINTRESOURCEA(i) = ((((i) As Word) As ULONG_PTR) As PCSTR)
170Const MAKEINTRESOURCE(i) = ((((i) As Word) As ULONG_PTR) As PCTSTR)
171
172Const RT_CURSOR = MAKEINTRESOURCE(1)
173Const RT_BITMAP = MAKEINTRESOURCE(2)
174Const RT_ICON = MAKEINTRESOURCE(3)
175Const RT_MENU = MAKEINTRESOURCE(4)
176Const RT_DIALOG = MAKEINTRESOURCE(5)
177Const RT_STRING = MAKEINTRESOURCE(6)
178Const RT_FONTDIR = MAKEINTRESOURCE(7)
179Const RT_FONT = MAKEINTRESOURCE(8)
180Const RT_ACCELERATOR = MAKEINTRESOURCE(9)
181Const RT_RCDATA = MAKEINTRESOURCE(10)
182Const RT_MESSAGETABLE = MAKEINTRESOURCE(11)
183
184Const DIFFERENCE = 11
185Const RT_GROUP_CURSOR = MAKEINTRESOURCE((RT_CURSOR) As ULONG_PTR + DIFFERENCE)
186Const RT_GROUP_ICON = MAKEINTRESOURCE((RT_ICON) As ULONG_PTR + DIFFERENCE)
187Const RT_VERSION = MAKEINTRESOURCE(16)
188Const RT_DLGINCLUDE = MAKEINTRESOURCE(17)
189Const RT_PLUGPLAY = MAKEINTRESOURCE(19)
190Const RT_VXD = MAKEINTRESOURCE(20)
191Const RT_ANICURSOR = MAKEINTRESOURCE(21)
192Const RT_ANIICON = MAKEINTRESOURCE(22)
193Const RT_HTML = MAKEINTRESOURCE(23)
194Const RT_MANIFEST = MAKEINTRESOURCE(24)
195Const CREATEPROCESS_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(1)
196Const ISOLATIONAWARE_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(2)
197Const ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(3)
198Const MINIMUM_RESERVED_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(1)
199Const MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID = MAKEINTRESOURCE(16)
200
201TypeDef WNDENUMPROC = *Function(hwnd As HWND, lParam As LPARAM) As BOOL
202TypeDef HOOKPROC = *Function(code As Long, wParam As WPARAM, lParam As LPARAM) As LRESULT
203TypeDef MONITORENUMPROC = *Function(hm As HMONITOR, hdc As HDC, ByRef rc As RECT, dwData As LPARAM) As BOOL
204
205Const CS_VREDRAW = &H0001
206Const CS_HREDRAW = &H0002
207Const CS_DBLCLKS = &H0008
208Const CS_OWNDC = &H0020
209Const CS_CLASSDC = &H0040
210Const CS_PARENTDC = &H0080
211Const CS_NOCLOSE = &H0200
212Const CS_SAVEBITS = &H0800
213Const CS_BYTEALIGNCLIENT = &H1000
214Const CS_BYTEALIGNWINDOW = &H2000
215Const CS_GLOBALCLASS = &H4000
216Type WNDCLASSEXA
217 cbSize As DWord
218 style As DWord
219 lpfnWndProc As WNDPROC
220 cbClsExtra As Long
221 cbWndExtra As Long
222 hInstance As HINSTANCE
223 hIcon As HICON
224 hCursor As HCURSOR
225 hbrBackground As HBRUSH
226 lpszMenuName As LPCSTR
227 lpszClassName As LPCSTR
228 hIconSm As HICON
229End Type
230Type WNDCLASSEXW
231 cbSize As DWord
232 style As DWord
233 lpfnWndProc As WNDPROC
234 cbClsExtra As Long
235 cbWndExtra As Long
236 hInstance As HINSTANCE
237 hIcon As HICON
238 hCursor As HCURSOR
239 hbrBackground As HBRUSH
240 lpszMenuName As LPCWSTR
241 lpszClassName As LPCWSTR
242 hIconSm As HICON
243End Type
244#ifdef UNICODE
245TypeDef WNDCLASSEX = WNDCLASSEXW
246#else
247TypeDef WNDCLASSEX = WNDCLASSEXA
248#endif
249
250'------------------------
251' Dialog Box Command IDs
252Const IDOK = 1
253Const IDCANCEL = 2
254Const IDABORT = 3
255Const IDRETRY = 4
256Const IDIGNORE = 5
257Const IDYES = 6
258Const IDNO = 7
259Const IDCLOSE = 8
260Const IDHELP = 9
261
262
263'------------------------
264' Menu flags and structs
265Const MF_INSERT = &H00000000
266Const MF_CHANGE = &H00000080
267Const MF_APPEND = &H00000100
268Const MF_DELETE = &H00000200
269Const MF_REMOVE = &H00001000
270Const MF_BYCOMMAND = &H00000000
271Const MF_BYPOSITION = &H00000400
272Const MF_SEPARATOR = &H00000800
273Const MF_ENABLED = &H00000000
274Const MF_GRAYED = &H00000001
275Const MF_DISABLED = &H00000002
276Const MF_UNCHECKED = &H00000000
277Const MF_CHECKED = &H00000008
278Const MF_USECHECKBITMAPS = &H00000200
279Const MF_STRING = &H00000000
280Const MF_BITMAP = &H00000004
281Const MF_OWNERDRAW = &H00000100
282Const MF_POPUP = &H00000010
283Const MF_MENUBARBREAK = &H00000020
284Const MF_MENUBREAK = &H00000040
285Const MF_UNHILITE = &H00000000
286Const MF_HILITE = &H00000080
287Const MF_DEFAULT = &H00001000
288Const MF_SYSMENU = &H00002000
289Const MF_HELP = &H00004000
290Const MF_RIGHTJUSTIFY = &H00004000
291Const MF_MOUSESELECT = &H00008000
292
293Const MFS_GRAYED = &H00000003
294Const MFS_DISABLED = MFS_GRAYED
295Const MFS_CHECKED = MF_CHECKED
296Const MFS_HILITE = MF_HILITE
297Const MFS_ENABLED = MF_ENABLED
298Const MFS_UNCHECKED = MF_UNCHECKED
299Const MFS_UNHILITE = MF_UNHILITE
300Const MFS_DEFAULT = MF_DEFAULT
301Const MFS_MASK = &H0000108B
302Const MFS_HOTTRACKDRAWN = &H10000000
303Const MFS_CACHEDBMP = &H20000000
304Const MFS_BOTTOMGAPDROP = &H40000000
305Const MFS_TOPGAPDROP = &H80000000
306Const MFS_GAPDROP = &HC0000000
307
308Const MIIM_STATE = &H00000001
309Const MIIM_ID = &H00000002
310Const MIIM_SUBMENU = &H00000004
311Const MIIM_CHECKMARKS = &H00000008
312Const MIIM_TYPE = &H00000010
313Const MIIM_DATA = &H00000020
314Const MIIM_STRING = &H00000040
315Const MIIM_BITMAP = &H00000080
316Const MIIM_FTYPE = &H00000100
317Const MFT_STRING = MF_STRING
318Const MFT_BITMAP = MF_BITMAP
319Const MFT_MENUBARBREAK = MF_MENUBARBREAK
320Const MFT_MENUBREAK = MF_MENUBREAK
321Const MFT_OWNERDRAW = MF_OWNERDRAW
322Const MFT_RADIOCHECK = &H00000200
323Const MFT_SEPARATOR = MF_SEPARATOR
324Const MFT_RIGHTORDER = &H00002000
325Const MFT_RIGHTJUSTIFY = MF_RIGHTJUSTIFY
326
327Type MENUITEMINFOW
328 cbSize As DWord
329 fMask As DWord
330 fType As DWord
331 fState As DWord
332 wID As DWord
333 hSubMenu As HMENU
334 hbmpChecked As HBITMAP
335 hbmpUnchecked As HBITMAP
336 dwItemData As ULONG_PTR
337 dwTypeData As LPWSTR
338 cch As DWord
339End Type
340Type MENUITEMINFOA
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 LPSTR
351 cch As DWord
352End Type
353#ifdef UNICODE
354TypeDef MENUITEMINFO = MENUITEMINFOW
355#else
356TypeDef MENUITEMINFO = MENUITEMINFOA
357#endif
358
359'------------
360' Scroll Bar
361Const SB_HORZ = 0
362Const SB_VERT = 1
363Const SB_CTL = 2
364Const SB_BOTH = 3
365
366' SCROLLINFO struct
367Const SIF_RANGE = &H0001
368Const SIF_PAGE = &H0002
369Const SIF_POS = &H0004
370Const SIF_DISABLENOSCROLL = &H0008
371Const SIF_TRACKPOS = &H0010
372Const SIF_ALL = SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS
373Type SCROLLINFO
374 cbSize As DWord
375 fMask As DWord
376 nMin As Long
377 nMax As Long
378 nPage As DWord
379 nPos As Long
380 nTrackPos As Long
381End Type
382
383
384' combo box
385Const CB_ERR = -1
386Const CB_ERRSPACE = -2
387
388
389' Clipboard Formats
390Const CF_TEXT = 1
391Const CF_BITMAP = 2
392Const CF_METAFILEPICT = 3
393Const CF_SYLK = 4
394Const CF_DIF = 5
395Const CF_TIFF = 6
396Const CF_OEMTEXT = 7
397Const CF_DIB = 8
398Const CF_PALETTE = 9
399Const CF_PENDATA = 10
400Const CF_RIFF = 11
401Const CF_WAVE = 12
402Const CF_UNICODETEXT = 13
403Const CF_ENHMETAFILE = 14
404Const CF_HDROP = 15
405Const CF_LOCALE = 16
406Const CF_MAX = 17
407Const CF_OWNERDISPLAY = &H0080
408Const CF_DSPTEXT = &H0081
409Const CF_DSPBITMAP = &H0082
410Const CF_DSPMETAFILEPICT = &H0083
411Const CF_DSPENHMETAFILE = &H008E
412Const CF_PRIVATEFIRST = &H0200
413Const CF_PRIVATELAST = &H02FF
414Const CF_GDIOBJFIRST = &H0300
415Const CF_GDIOBJLAST = &H03FF
416
417'-------------
418' Window API
419
420Declare Function AdjustWindowRect Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL) As BOOL
421Declare Function AdjustWindowRectEx Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL, dwExStyle As DWord) As BOOL
422Declare Function AnyPopup Lib "user32" () As BOOL
423Declare Function ArrangeIconicWindows Lib "user32" (hWnd As HWND) As DWord
424
425Type PAINTSTRUCT
426 hdc As HDC
427 fErase As BOOL
428 rcPaint As RECT
429 fRestore As BOOL
430 fIncUpdate As BOOL
431 rgbReserved[ELM(32)] As Byte
432End Type
433Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef Paint As PAINTSTRUCT) As HDC
434Declare Function BringWindowToTop Lib "user32" (hWnd As HWND) As Long
435Declare Function CallNextHookEx Lib "user32" (hHook As HHOOK, nCode As Long, wParam As WPARAM, lParam As LPARAM) As LRESULT
436Declare Function CallWindowProc Lib "user32" Alias _FuncName_CallWindowProc (lpPrevWndFunc As WNDPROC, hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
437Declare Function ChangeClipboardChain Lib "user32" (hwndRemove As HWND, hwndNewNext As HWND) As BOOL
438Declare Function CharLower Lib "user32" Alias _FuncName_CharLower (psz As PTSTR) As DWord
439Declare Function CharNext Lib "user32" Alias _FuncName_CharNext (lpszCurrent As LPCTSTR) As LPTSTR
440Declare Function CharNextExA Lib "user32" (CodePage As Word, lpCurrentChar As LPCSTR, dwFlags As DWord) As LPSTR
441Declare Function CharPrev Lib "user32" Alias _FuncName_CharPrev (lpszStart As LPCTSTR, lpszCurrent As LPCTSTR) As LPTSTR
442Declare Function CharPrevExA Lib "user32" (CodePage As Word, lpStart As LPCSTR, lpCurrentChar As LPCSTR, dwFlags As DWord) As LPSTR
443Declare Function CharUpper Lib "user32" Alias _FuncName_CharUpper (psz As PTSTR) As DWord
444Declare Function CheckMenuItem Lib "user32" (hMenu As HMENU, uIDCheckItem As DWord, uCheck As DWord) As DWord
445Declare Function CheckMenuRadioItem Lib "user32" (hMenu As HMENU, idFirst As DWord, idLast As DWord, idCheck As DWord, uFlags As DWord) As BOOL
446Declare Function CheckDlgButton Lib "user32" (hDlg As HWND, nIDButton As Long, uCheck As DWord) As BOOL
447Declare Function CheckRadioButton Lib "user32" (hDlg As HWND, nIDFirstButton As Long, nIDLastButton As Long, nIDCheckButton As Long) As BOOL
448Declare Function ChildWindowFromPoint Lib "user32" (hWndParent As HWND, x As Long, y As Long) As HWND
449Const CWP_ALL = &H0000
450Const CWP_SKIPINVISIBLE = &H0001
451Const CWP_SKIPDISABLED = &H0002
452Const CWP_SKIPTRANSPARENT = &H0004
453Declare Function ChildWindowFromPointEx Lib "user32" (hWndParent As HWND, x As Long, y As Long, uFlags As DWord) As HWND
454
455Declare Function ClientToScreen Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
456Declare Function ClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
457Declare Function CloseClipboard Lib "user32" () As BOOL
458Declare Function CloseWindow Lib "user32" (hWnd As HWND) As BOOL
459Declare Function CopyImage Lib "user32" (hImage As HANDLE, uType As DWord, cxDesired As Long, cyDesired As Long, fuFlags As DWord) As HANDLE
460Declare Function CountClipboardFormats Lib "user32" () As Long
461Const FVIRTKEY = &H01
462Const FNOINVERT = &H02
463Const FSHIFT = &H04
464Const FCONTROL = &H08
465Const FALT = &H10
466Type ACCEL
467 fVirt As Byte
468 key As Word
469 cmd As Word
470End Type
471Declare Function CreateAcceleratorTable Lib "user32" Alias _FuncName_CreateAcceleratorTable (ByRef acl As ACCEL, i As Long) As HACCEL
472Declare Function CreateCaret Lib "user32" (hWnd As HWND, hBitmap As HBITMAP, nWidth As Long, nHeight As Long) As BOOL
473Declare 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
474Declare 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
475
476Type ICONINFO
477 fIcon As BOOL
478 xHotspot As DWord
479 yHotspot As DWord
480 hbmMask As HBITMAP
481 hbmColor As HBITMAP
482End Type
483Declare Function CreateIconIndirect Lib "user32" (ByRef pIconInfo As ICONINFO) As HICON
484
485Declare Function CreateMenu Lib "user32" () As HMENU
486Declare Function CreatePopupMenu Lib "user32" () As HMENU
487
488Const CW_USEDEFAULT = &H80000000
489Declare 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
490
491Declare Function DefDlgProc Lib "user32" Alias _FuncName_DefWindowProc (hDlg As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
492Declare Function DefWindowProc Lib "user32" Alias _FuncName_DefWindowProc (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
493Declare Function DeleteMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
494Declare Function DestroyAcceleratorTable Lib "user32" (hAccel As HACCEL) As BOOL
495Declare Function DestroyCaret Lib "user32" () As BOOL
496Declare Function DestroyCursor Lib "user32" (hCursor As HCURSOR) As BOOL
497Declare Function DestroyIcon Lib "user32" (hIcon As HICON) As BOOL
498Declare Function DestroyMenu Lib "user32" (hMenu As HMENU) As BOOL
499Declare Function DestroyWindow Lib "user32" (hWnd As HWND) As BOOL
500Type DLGITEMTEMPLATE
501 style As DWord
502 dwExtendedStyle As DWord
503 x As Integer
504 y As Integer
505 cx As Integer
506 cy As Integer
507 id As Word
508End Type
509Type DLGTEMPLATE
510 style As DWord
511 dwExtendedStyle As DWord
512 cdit As Word
513 x As Integer
514 y As Integer
515 cx As Integer
516 cy As Integer
517End Type
518Declare 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
519Declare Function DispatchMessage Lib "user32" Alias _FuncName_DispatchMessage (ByRef Msg As MSG) As LRESULT
520Declare Function DlgDirList Lib "user32" Alias _FuncName_DlgDirList (hDlg As HWND, lpPathSpec As LPTSTR, nIDListBox As Long, nIDStaticPath As Long, uFileType As DWord) As Long
521Declare Function DlgDirListComboBox Lib "user32" Alias _FuncName_DlgDirListComboBox (hDlg As HWND, lpPathSpec As LPTSTR, nIDComboBox As Long, nIDStaticPath As Long,uFileType As DWord) As Long
522Declare Function DlgDirSelectComboBoxEx Lib "user32" Alias _FuncName_DlgDirSelectComboBoxEx (hDlg As HWND, lpString As LPTSTR, nCount As Long, nIDComboBox As Long) As BOOL
523Declare Function DlgDirSelectEx Lib "user32" Alias _FuncName_DlgDirSelectEx (hDlg As HWND, lpString As LPTSTR, nCount As Long, nIDListBox As Long) As BOOL
524Const BDR_RAISEDOUTER = &H0001
525Const BDR_SUNKENOUTER = &H0002
526Const BDR_RAISEDINNER = &H0004
527Const BDR_SUNKENINNER = &H0008
528Const BDR_OUTER = &H0003
529Const BDR_INNER = &H000c
530Const EDGE_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER
531Const EDGE_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER
532Const EDGE_ETCHED = BDR_SUNKENOUTER or BDR_RAISEDINNER
533Const EDGE_BUMP = BDR_RAISEDOUTER or BDR_SUNKENINNER
534Const BF_LEFT = &H0001
535Const BF_TOP = &H0002
536Const BF_RIGHT = &H0004
537Const BF_BOTTOM = &H0008
538Const BF_TOPLEFT = BF_TOP or BF_LEFT
539Const BF_TOPRIGHT = BF_TOP or BF_RIGHT
540Const BF_BOTTOMLEFT = BF_BOTTOM or BF_LEFT
541Const BF_BOTTOMRIGHT = BF_BOTTOM or BF_RIGHT
542Const BF_RECT = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM
543Const BF_DIAGONAL = &H0010
544Const BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL or BF_TOP or BF_RIGHT
545Const BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL or BF_TOP or BF_LEFT
546Const BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL or BF_BOTTOM or BF_LEFT
547Const BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT
548Const BF_MIDDLE = &H0800
549Const BF_SOFT = &H1000
550Const BF_ADJUST = &H2000
551Const BF_FLAT = &H4000
552Const BF_MONO = &H8000
553Declare Function DrawEdge Lib "user32" (hdc As HDC, ByRef lpRect As RECT, edge As DWord, grfFlags As DWord) As BOOL
554
555Const DFC_CAPTION = 1
556Const DFC_MENU = 2
557Const DFC_SCROLL = 3
558Const DFC_BUTTON = 4
559Const DFC_POPUPMENU = 5
560Const DFCS_CAPTIONCLOSE = &H0000
561Const DFCS_CAPTIONMIN = &H0001
562Const DFCS_CAPTIONMAX = &H0002
563Const DFCS_CAPTIONRESTORE = &H0003
564Const DFCS_CAPTIONHELP = &H0004
565Const DFCS_MENUARROW = &H0000
566Const DFCS_MENUCHECK = &H0001
567Const DFCS_MENUBULLET = &H0002
568Const DFCS_MENUARROWRIGHT = &H0004
569Const DFCS_SCROLLUP = &H0000
570Const DFCS_SCROLLDOWN = &H0001
571Const DFCS_SCROLLLEFT = &H0002
572Const DFCS_SCROLLRIGHT = &H0003
573Const DFCS_SCROLLCOMBOBOX = &H0005
574Const DFCS_SCROLLSIZEGRIP = &H0008
575Const DFCS_SCROLLSIZEGRIPRIGHT = &H0010
576Const DFCS_BUTTONCHECK = &H0000
577Const DFCS_BUTTONRADIOIMAGE = &H0001
578Const DFCS_BUTTONRADIOMASK = &H0002
579Const DFCS_BUTTONRADIO = &H0004
580Const DFCS_BUTTON3STATE = &H0008
581Const DFCS_BUTTONPUSH = &H0010
582Const DFCS_INACTIVE = &H0100
583Const DFCS_PUSHED = &H0200
584Const DFCS_CHECKED = &H0400
585Const DFCS_TRANSPARENT = &H0800
586Const DFCS_HOT = &H1000
587Const DFCS_ADJUSTRECT = &H2000
588Const DFCS_FLAT = &H4000
589Const DFCS_MONO = &H8000
590Declare Function DrawFrameControl Lib "user32" (hdc As HDC, ByRef lpRect As RECT, uType As DWord, uState As DWord) As BOOL
591
592Declare Function DrawIcon Lib "user32" (hdc As HDC, x As Long, y As Long, hIcon As HICON) As BOOL
593
594Const DI_MASK = &H0001
595Const DI_IMAGE = &H0002
596Const DI_NORMAL = &H0003
597Const DI_COMPAT = &H0004
598Const DI_DEFAULTSIZE = &H0008
599Declare 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
600
601Declare Function DrawMenuBar Lib "user32" (hwnd As HWND) As BOOL
602
603Const DT_TOP = &H00000000
604Const DT_LEFT = &H00000000
605Const DT_CENTER = &H00000001
606Const DT_RIGHT = &H00000002
607Const DT_VCENTER = &H00000004
608Const DT_BOTTOM = &H00000008
609Const DT_WORDBREAK = &H00000010
610Const DT_SINGLELINE = &H00000020
611Const DT_EXPANDTABS = &H00000040
612Const DT_TABSTOP = &H00000080
613Const DT_NOCLIP = &H00000100
614Const DT_EXTERNALLEADING =&H00000200
615Const DT_CALCRECT = &H00000400
616Const DT_NOPREFIX = &H00000800
617Const DT_INTERNAL = &H00001000
618Const DT_EDITCONTROL = &H00002000
619Const DT_PATH_ELLIPSIS = &H00004000
620Const DT_END_ELLIPSIS = &H00008000
621Const DT_MODIFYSTRING = &H00010000
622Const DT_RTLREADING = &H00020000
623Const DT_WORD_ELLIPSIS = &H00040000
624Declare 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
625
626Type DRAWTEXTPARAMS
627 cbSize As DWord
628 iTabLength As Long
629 iLeftMargin As Long
630 iRightMargin As Long
631 uiLengthDrawn As DWord
632End Type
633Declare 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
634
635Declare Function EmptyClipboard Lib "user32" () As BOOL
636Declare Function EnableMenuItem Lib "user32" (hMenu As HMENU, uIDEnableItem As DWord, uEnable As DWord) As BOOL
637
638Const ESB_ENABLE_BOTH = &H0000
639Const ESB_DISABLE_BOTH = &H0003
640Const ESB_DISABLE_LEFT = &H0001
641Const ESB_DISABLE_RIGHT = &H0002
642Const ESB_DISABLE_UP = &H0001
643Const ESB_DISABLE_DOWN = &H0002
644Const ESB_DISABLE_LTUP = ESB_DISABLE_LEFT
645Const ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT
646Declare Function EnableScrollBar Lib "user32" (hWnd As HWND, dwSBflags As DWord, dwArrows As DWord) As BOOL
647
648Declare Function EnableWindow Lib "user32" (hWnd As HWND, bEnable As BOOL) As BOOL
649Declare Function EndDialogAPI Lib "user32" Alias "EndDialog" (hwndDlg As HWND, nRet As Long) As BOOL
650Declare Function EndPaint Lib "user32" (hWnd As HWND, ByRef lpPaint As PAINTSTRUCT) As BOOL
651Declare Function EnumClipboardFormats Lib "user32" (uFormat As DWord) As DWord
652Declare Function EnumChildWindows Lib "user32" (hwndParent As HWND, pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
653Declare Function EnumDisplayMonitors Lib "user32.dll" (ByVal hdc As HDC, lprcClip As *RECT, ByVal lpfnEnum As MONITORENUMPROC, dwData As LPARAM) As BOOL
654Declare Function EnumThreadWindows Lib "user32" (dwThreadId As DWord, pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
655Declare Function EnumWindows Lib "user32" (pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
656Declare Function ExitWindowsEx Lib "user32" (uFlags As DWord, dwReserved As DWord) As BOOL
657Declare Function FillRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As BOOL
658Declare Function FindWindow Lib "user32" Alias _FuncName_FindWindow (pClassName As PCTSTR, lpWindowName As PCTSTR) As HWND
659Declare Function FindWindowEx Lib "user32" Alias _FuncName_FindWindowEx (hwndParent As HWND, hwndChildAfter As HWND, pszClass As PCTSTR, pszWindow As PCTSTR) As HWND
660Declare Function FlashWindow Lib "user32" (hWnd As HWND, bInvert As BOOL) As BOOL
661Const FLASHW_STOP = 0
662Const FLASHW_CAPTION = 1
663Const FLASHW_TRAY = 2
664Const FLASHW_ALL = (FLASHW_CAPTION Or FLASHW_TRAY)
665Const FLASHW_TIMER = 4
666Const FLASHW_TIMERNOFG = 12
667Type FLASHWINFO
668 cbSize As DWord
669 hWnd As HWND
670 dwFlags As DWord
671 uCount As DWord
672 dwTimeout As DWord
673End Type
674Declare Function FlashWindowEx Lib "user32" (ByRef fwi As FLASHWINFO) As Long
675Declare Function FrameRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As Long
676Declare Function GetActiveWindow Lib "user32" () As HWND
677Declare Function GetAsyncKeyState Lib "user32" (vKey As Long) As Integer
678Declare Function GetCapture Lib "user32" () As HWND
679Declare Function GetCaretPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
680Declare Function GetClassInfoEx Lib "user32" Alias _FuncName_GetClassInfoEx (hInst As HINSTANCE, pszClass As PCTSTR, ByRef lpwcx As WNDCLASSEX) As BOOL
681
682Const GCL_MENUNAME = -8
683Const GCL_HBRBACKGROUND = -10
684Const GCL_HCURSOR = -12
685Const GCL_HICON = -14
686Const GCL_HMODULE = -16
687Const GCL_CBWNDEXTRA = -18
688Const GCL_CBCLSEXTRA = -20
689Const GCL_WNDPROC = -24
690Const GCL_STYLE = -26
691Const GCW_ATOM = -32
692Const GCL_HICONSM = -34
693#ifdef _WIN64
694Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
695Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
696#else
697Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
698Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
699#endif
700
701Declare Function GetClassName Lib "user32" Alias _FuncName_GetClassName (hWnd As HWND, lpClassName As PTSTR, nMaxCount As Long) As Long
702Declare Function GetClientRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
703Declare Function GetClipboardData Lib "user32" (uFormat As DWord) As HANDLE
704Declare Function GetClipboardFormatName Lib "user32" Alias _FuncName_GetClipboardFormatName (uFormat As DWord, pszFormatName As PTSTR, cchMaxCount As Long) As BOOL
705Declare Function GetClipboardOwner Lib "user32" () As HWND
706Declare Function GetClipboardViewer Lib "user32" () As HWND
707Declare Function GetClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
708Declare Function GetCursor Lib "user32" () As HCURSOR
709Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
710Declare Function GetDC Lib "user32" (hWnd As HWND) As HDC
711
712Const DCX_WINDOW = &H00000001
713Const DCX_CACHE = &H00000002
714Const DCX_NORESETATTRS = &H00000004
715Const DCX_CLIPCHILDREN = &H00000008
716Const DCX_CLIPSIBLINGS = &H00000010
717Const DCX_PARENTCLIP = &H00000020
718Const DCX_EXCLUDERGN = &H00000040
719Const DCX_INTERSECTRGN = &H00000080
720Const DCX_EXCLUDEUPDATE = &H00000100
721Const DCX_INTERSECTUPDATE = &H00000200
722Const DCX_LOCKWINDOWUPDATE = &H00000400
723Const DCX_VALIDATE = &H00200000
724Declare Function GetDCEx Lib "user32" (hWnd As HWND, hrgnClip As HRGN, dwFlags As DWord) As HDC
725
726Declare Function GetDesktopWindow Lib "user32" () As HWND
727Declare Function GetDialogBaseUnits Lib "user32" () As Long
728Declare Function GetDlgCtrlID Lib "user32" (hWnd As HWND) As Long
729Declare Function GetDlgItem Lib "user32" (hDlg As HWND, nIDDlgItem As Long) As HWND
730Declare Function GetDlgItemInt Lib "user32" (hDlg As HWND, nIDDlgItem As Long, lpTranslated As *BOOL, bSigned As BOOL) As DWord
731Declare Function GetDlgItemText Lib "user32" Alias _FuncName_GetDlgItemText (hDlg As HWND, nIDDlgItem As Long, pString As PTSTR, nMaxCount As Long) As Long
732Declare Function GetDoubleClickTime Lib "user32" () As DWord
733Declare Function GetFocus Lib "user32" () As HWND
734Declare Function GetForegroundWindow Lib "user32" () As HWND
735Declare Function GetIconInfo Lib "user32" (hIcon As HICON, ByRef pIconInfo As ICONINFO) As Long
736Declare Function GetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
737Declare Function GetKeyState Lib "user32" (nVirtKey As Long) As Integer
738Declare Function GetListBoxInfo Lib "user32" (ByVal hwnd As HWND) As DWord
739Declare Function GetMenu Lib "user32" (hWnd As HWND) As HMENU
740
741Declare Function GetMenuContextHelpId Lib "user32" (hmenu As HMENU) As DWord
742Const GMDI_USEDISABLED = &H0001
743Const GMDI_GOINTOPOPUPS = &H0002
744Declare Function GetMenuDefaultItem Lib "user32" (hMenu As HMENU, fByPos As DWord, gmdiFlags As DWord) As DWord
745
746Declare Function GetMenuItemID Lib "user32" (hMenu As HMENU, nPos As Long) As DWord
747Declare Function GetMenuItemCount Lib "user32" (hMenu As HMENU) As Long
748Declare Function GetMenuItemInfo Lib "user32" Alias _FuncName_GetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As DWord, ByRef mii As MENUITEMINFO) As BOOL
749Declare Function GetMessage Lib "user32" Alias _FuncName_GetMessage (ByRef Msg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord) As Long
750Const CCHDEVICENAME = 32
751Type MONITORINFO
752 cbSize As DWord
753 rcMonitor As RECT
754 rcWork As RECT
755 dwFlags As DWord
756End Type
757Type MONITORINFOEXA
758 cbSize As DWord
759 rcMonitor As RECT
760 rcWork As RECT
761 dwFlags As DWord
762 szDevice[ELM(CCHDEVICENAME)] As SByte
763End Type
764Type MONITORINFOEXW
765 cbSize As DWord
766 rcMonitor As RECT
767 rcWork As RECT
768 dwFlags As DWord
769 szDevice[ELM(CCHDEVICENAME)] As WCHAR
770End Type
771Declare Function GetMonitorInfo Lib "user32.dll" Alias _FuncName_GetMonitorInfo (hMonitor As HMONITOR, ByRef mi As Any /*MONITORINFO*/) As BOOL
772Declare Function GetNextDlgGroupItem Lib "user32" (hDlg As HWND, hCtl As HWND, bPrevious As BOOL) As HWND
773Declare Function GetNextDlgTabItem Lib "user32" (hDlg As HWND, hCtl As HWND, bPrevious As BOOL) As HWND
774Declare Function GetOpenClipboardWindow Lib "user32" () As HWND
775Declare Function GetParent Lib "user32" (hWnd As HWND) As HWND
776Declare Function GetPriorityClipboardFormat Lib "user32" (lpFormatList As *DWord, FormatNum As Long) As Long
777Declare Function GetProp Lib "user32" Alias _FuncName_GetProp (hWnd As HWND, pString As PCTSTR) As HANDLE
778Declare Function GetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO) As BOOL
779Declare Function GetSubMenu Lib "user32" (hMenu As HMENU, nPos As Long) As HMENU
780
781Const COLOR_SCROLLBAR = 0
782Const COLOR_BACKGROUND = 1
783Const COLOR_ACTIVECAPTION = 2
784Const COLOR_INACTIVECAPTION = 3
785Const COLOR_MENU = 4
786Const COLOR_WINDOW = 5
787Const COLOR_WINDOWFRAME = 6
788Const COLOR_MENUTEXT = 7
789Const COLOR_WINDOWTEXT = 8
790Const COLOR_CAPTIONTEXT = 9
791Const COLOR_ACTIVEBORDER = 10
792Const COLOR_INACTIVEBORDER = 11
793Const COLOR_APPWORKSPACE = 12
794Const COLOR_HIGHLIGHT = 13
795Const COLOR_HIGHLIGHTTEXT = 14
796Const COLOR_BTNFACE = 15
797Const COLOR_BTNSHADOW = 16
798Const COLOR_GRAYTEXT = 17
799Const COLOR_BTNTEXT = 18
800Const COLOR_INACTIVECAPTIONTEXT = 19
801Const COLOR_BTNHIGHLIGHT = 20
802Const COLOR_3DDKSHADOW = 21
803Const COLOR_3DLIGHT = 22
804Const COLOR_INFOTEXT = 23
805Const COLOR_INFOBK = 24
806Const COLOR_HOTLIGHT = 26
807Const COLOR_GRADIENTACTIVECAPTION = 27
808Const COLOR_GRADIENTINACTIVECAPTION = 28
809Const COLOR_DESKTOP = COLOR_BACKGROUND
810Const COLOR_3DFACE = COLOR_BTNFACE
811Const COLOR_3DSHADOW = COLOR_BTNSHADOW
812Const COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT
813Const COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT
814Const COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT
815Declare Function GetSysColor Lib "user32" (nIndex As Long) As DWord
816Declare Function GetSysColorBrush Lib "user32" (nIndex As Long) As HBRUSH
817
818Declare Function GetSystemMenu Lib "user32" (hWnd As HWND, bRevert As BOOL) As HMENU
819
820Const SM_CXSCREEN = 0
821Const SM_CYSCREEN = 1
822Const SM_CXVSCROLL = 2
823Const SM_CYHSCROLL = 3
824Const SM_CYCAPTION = 4
825Const SM_CXBORDER = 5
826Const SM_CYBORDER = 6
827Const SM_CXDLGFRAME = 7
828Const SM_CYDLGFRAME = 8
829Const SM_CYVTHUMB = 9
830Const SM_CXHTHUMB = 10
831Const SM_CXICON = 11
832Const SM_CYICON = 12
833Const SM_CXCURSOR = 13
834Const SM_CYCURSOR = 14
835Const SM_CYMENU = 15
836Const SM_CXFULLSCREEN = 16
837Const SM_CYFULLSCREEN = 17
838Const SM_CYKANJIWINDOW = 18
839Const SM_MOUSEPRESENT = 19
840Const SM_CYVSCROLL = 20
841Const SM_CXHSCROLL = 21
842Const SM_DEBUG = 22
843Const SM_SWAPBUTTON = 23
844Const SM_RESERVED1 = 24
845Const SM_RESERVED2 = 25
846Const SM_RESERVED3 = 26
847Const SM_RESERVED4 = 27
848Const SM_CXMIN = 28
849Const SM_CYMIN = 29
850Const SM_CXSIZE = 30
851Const SM_CYSIZE = 31
852Const SM_CXFRAME = 32
853Const SM_CYFRAME = 33
854Const SM_CXMINTRACK = 34
855Const SM_CYMINTRACK = 35
856Const SM_CXDOUBLECLK = 36
857Const SM_CYDOUBLECLK = 37
858Const SM_CXICONSPACING = 38
859Const SM_CYICONSPACING = 39
860Const SM_MENUDROPALIGNMENT = 40
861Const SM_PENWINDOWS = 41
862Const SM_DBCSENABLED = 42
863Const SM_CMOUSEBUTTONS = 43
864Const SM_CXFIXEDFRAME = SM_CXDLGFRAME
865Const SM_CYFIXEDFRAME = SM_CYDLGFRAME
866Const SM_CXSIZEFRAME = SM_CXFRAME
867Const SM_CYSIZEFRAME = SM_CYFRAME
868Const SM_SECURE = 44
869Const SM_CXEDGE = 45
870Const SM_CYEDGE = 46
871Const SM_CXMINSPACING = 47
872Const SM_CYMINSPACING = 48
873Const SM_CXSMICON = 49
874Const SM_CYSMICON = 50
875Const SM_CYSMCAPTION = 51
876Const SM_CXSMSIZE = 52
877Const SM_CYSMSIZE = 53
878Const SM_CXMENUSIZE = 54
879Const SM_CYMENUSIZE = 55
880Const SM_ARRANGE = 56
881Const SM_CXMINIMIZED = 57
882Const SM_CYMINIMIZED = 58
883Const SM_CXMAXTRACK = 59
884Const SM_CYMAXTRACK = 60
885Const SM_CXMAXIMIZED = 61
886Const SM_CYMAXIMIZED = 62
887Const SM_NETWORK = 63
888Const SM_CLEANBOOT = 67
889Const SM_CXDRAG = 68
890Const SM_CYDRAG = 69
891Const SM_SHOWSOUNDS = 70
892Const SM_CXMENUCHECK = 71
893Const SM_CYMENUCHECK = 72
894Const SM_SLOWMACHINE = 73
895Const SM_MIDEASTENABLED = 74
896Const SM_MOUSEWHEELPRESENT = 75
897Declare Function GetSystemMetrics Lib "user32" (nIndex As Long) As Long
898
899Declare Function GetUpdateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT, bErase As BOOL) As BOOL
900Declare Function GetUpdateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
901
902Const GW_HWNDFIRST = 0
903Const GW_HWNDLAST = 1
904Const GW_HWNDNEXT = 2
905Const GW_HWNDPREV = 3
906Const GW_OWNER = 4
907Const GW_CHILD = 5
908Declare Function GetWindow Lib "user32" (hWnd As HWND, uCmd As DWord) As HWND
909
910Declare Function GetWindowContextHelpId Lib "user32" (hwnd As HWND) As DWord
911
912Declare Function GetWindowDC Lib "user32" (hWnd As HWND) As HDC
913
914#ifndef _WIN64
915Const GWL_WNDPROC = -4
916Const GWL_HINSTANCE = -6
917Const GWL_HWNDPARENT = -8
918Const GWL_USERDATA = -21
919Const GWL_ID = -12
920#endif
921
922Const GWL_STYLE = -16
923Const GWL_EXSTYLE = -20
924
925Const GWLP_WNDPROC = -4
926Const GWLP_HINSTANCE = -6
927Const GWLP_HWNDPARENT = -8
928Const GWLP_USERDATA = -21
929Const GWLP_ID = -12
930
931
932#ifdef _WIN64
933Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
934Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
935#else
936Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
937Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
938#endif
939Declare Function GetWindowModuleFileName Lib "user32" Alias _FuncName_GetWindowModuleFileName (hwnd As HWND, pszFileName As LPTSTR, cchFileNameMax As DWord) As DWord
940
941Const WPF_SETMINPOSITION = &H0001
942Const WPF_RESTORETOMAXIMIZED = &H0002
943Type WINDOWPLACEMENT
944 length As DWord
945 flags As DWord
946 showCmd As DWord
947 ptMinPosition As POINTAPI
948 ptMaxPosition As POINTAPI
949 rcNormalPosition As RECT
950End Type
951Declare Function GetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
952
953Declare Function GetWindowRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
954Declare Function GetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As Long
955Declare Function GetWindowText Lib "user32" Alias _FuncName_GetWindowText (hWnd As HWND, lpString As PTSTR, nMaxCount As Long) As Long
956Declare Function GetWindowTextLength Lib "user32" Alias _FuncName_GetWindowTextLength (hWnd As HWND) As Long
957Declare Function GetWindowThreadProcessId Lib "user32" (hWnd As HWND, pdwProcessId As *DWord) As DWord
958Declare Function HideCaret Lib "user32" (hWnd As HWND) As BOOL
959Declare Function InsertMenuItem Lib "user32" Alias _FuncName_InsertMenuItem (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
960Declare Function InvalidateRect Lib "user32" (hWnd As HWND, ByRef Rect As RECT, bErase As BOOL) As BOOL
961Declare Function InvalidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
962Declare Function InvertRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT) As BOOL
963Declare Function IsCharAlpha Lib "user32" Alias _FuncName_IsCharAlpha (ch As TCHAR) As BOOL
964Declare Function IsCharAlphaNumeric Lib "user32" Alias _FuncName_IsCharAlphaNumeric (ch As TCHAR) As BOOL
965Declare Function IsCharLower Lib "user32" Alias _FuncName_IsCharLower (ch As TCHAR) As BOOL
966Declare Function IsCharUpper Lib "user32" Alias _FuncName_IsCharUpper (ch As TCHAR) As BOOL
967Declare Function IsChild Lib "user32" (hWndParent As HWND, hWnd As HWND) As BOOL
968Declare Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As DWord) As BOOL
969Declare Function IsDialogMessage Lib "user32" Alias _FuncName_IsDialogMessage (hDlg As HWND, ByRef msg As MSG) As BOOL
970Declare Function IsDlgButtonChecked Lib "user32" (hDlg As HWND, nIDButton As Long) As DWord
971Declare Function IsIconic Lib "user32" (hWnd As HWND) As BOOL
972Declare Function IsWindow Lib "user32" (hWnd As HWND) As BOOL
973Declare Function IsWindowEnabled Lib "user32" (hWnd As HWND) As BOOL
974Declare Function IsWindowUnicode Lib "user32" (hWnd As HWND) As BOOL
975Declare Function IsWindowVisible Lib "user32" (hWnd As HWND) As BOOL
976Declare Function IsZoomed Lib "user32" (hWnd As HWND) As BOOL
977
978Const KEYEVENTF_EXTENDEDKEY = &H0001
979Const KEYEVENTF_KEYUP = &H0002
980Declare Sub keybd_event Lib "user32" (bVk As Byte, bScan As Byte, dwFlags As DWord, dwExtraInfo As DWord)
981
982Declare Function KillTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR) As BOOL
983Declare Function LoadBitmap Lib "user32" Alias _FuncName_LoadBitmap (hInst As HINSTANCE, pBitmapName As PCTSTR) As HBITMAP
984
985Const IDC_ARROW = 32512
986Const IDC_IBEAM = 32513
987Const IDC_WAIT = 32514
988Const IDC_CROSS = 32515
989Const IDC_UPARROW = 32516
990Const IDC_SIZE = 32640
991Const IDC_ICON = 32641
992Const IDC_SIZENWSE = 32642
993Const IDC_SIZENESW = 32643
994Const IDC_SIZEWE = 32644
995Const IDC_SIZENS = 32645
996Const IDC_SIZEALL = 32646
997Const IDC_NO = 32648
998Const IDC_HAND = 32649
999Const IDC_APPSTARTING = 32650
1000Const IDC_HELP = 32651
1001Declare Function LoadCursor Lib "user32" Alias _FuncName_LoadCursor (hInst As HINSTANCE, pCursorName As PCTSTR) As HCURSOR
1002
1003Declare Function LoadCursorFromFile Lib "user32" Alias _FuncName_LoadCursorFromFile (pFileName As PCTSTR) As HCURSOR
1004
1005Const IDI_APPLICATION = 32512
1006Const IDI_HAND = 32513
1007Const IDI_QUESTION = 32514
1008Const IDI_EXCLAMATION = 32515
1009Const IDI_ASTERISK = 32516
1010Const IDI_WINLOGO = 32517
1011Declare Function LoadIcon Lib "user32" Alias _FuncName_LoadIcon (hInst As HINSTANCE, pIconName As PCTSTR) As HICON
1012
1013Const IMAGE_BITMAP = 0
1014Const IMAGE_ICON = 1
1015Const IMAGE_CURSOR = 2
1016Const IMAGE_ENHMETAFILE = 3
1017Const LR_DEFAULTCOLOR = &H0000
1018Const LR_MONOCHROME = &H0001
1019Const LR_COLOR = &H0002
1020Const LR_COPYRETURNORG = &H0004
1021Const LR_COPYDELETEORG = &H0008
1022Const LR_LOADFROMFILE = &H0010
1023Const LR_LOADTRANSPARENT = &H0020
1024Const LR_DEFAULTSIZE = &H0040
1025Const LR_VGACOLOR = &H0080
1026Const LR_LOADMAP3DCOLORS = &H1000
1027Const LR_CREATEDIBSECTION = &H2000
1028Const LR_COPYFROMRESOURCE = &H4000
1029Const LR_SHARED = &H8000
1030Declare 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
1031Declare Function LoadString Lib "user32" Alias _FuncName_LoadString (hInstance As HINSTANCE, uID As DWord, lpBuffer As LPTSTR, nBufferMax As Long) As Long
1032Declare Function LockWindowUpdate Lib "user32" (hWnd As HWND) As BOOL
1033Declare Function MapVirtualKey Lib "user32" Alias _FuncName_MapVirtualKey (wCode As DWord, wMapType As DWord) As DWord
1034Declare Function MapWindowPoints Lib "user32" (
1035 hWndFrom As HWND,
1036 hWndTo As HWND,
1037 pPoints As *POINTAPI,
1038 cPoints As DWord) As Long
1039Declare Function MessageBeep Lib "user32" (uType As DWord) As BOOL
1040
1041Const MB_OK = &H00000000
1042Const MB_OKCANCEL = &H00000001
1043Const MB_ABORTRETRYIGNORE = &H00000002
1044Const MB_YESNOCANCEL = &H00000003
1045Const MB_YESNO = &H00000004
1046Const MB_RETRYCANCEL = &H00000005
1047Const MB_ICONHAND = &H00000010
1048Const MB_ICONQUESTION = &H00000020
1049Const MB_ICONEXCLAMATION = &H00000030
1050Const MB_ICONASTERISK = &H00000040
1051Const MB_USERICON = &H00000080
1052Const MB_ICONWARNING = MB_ICONEXCLAMATION
1053Const MB_ICONERROR = MB_ICONHAND
1054Const MB_ICONINFORMATION = MB_ICONASTERISK
1055Const MB_ICONSTOP = MB_ICONHAND
1056Const MB_DEFBUTTON1 = &H00000000
1057Const MB_DEFBUTTON2 = &H00000100
1058Const MB_DEFBUTTON3 = &H00000200
1059Const MB_DEFBUTTON4 = &H00000300
1060Const MB_APPLMODAL = &H00000000
1061Const MB_SYSTEMMODAL = &H00001000
1062Const MB_TASKMODAL = &H00002000
1063Const MB_HELP = &H00004000
1064Const MB_NOFOCUS = &H00008000
1065Const MB_SETFOREGROUND = &H00010000
1066Const MB_DEFAULT_DESKTOP_ONLY = &H00020000
1067Const MB_TOPMOST = &H00040000
1068Const MB_RIGHT = &H00080000
1069Const MB_RTLREADING = &H00100000
1070#ifdef UNICODE
1071Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hwnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
1072#else
1073Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hwnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
1074#endif
1075Declare Function MessageBoxW Lib "user32" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
1076Declare Function MessageBoxA Lib "user32" (hWnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
1077Const MOUSEEVENTF_MOVE = &H0001
1078Const MOUSEEVENTF_LEFTDOWN = &H0002
1079Const MOUSEEVENTF_LEFTUP = &H0004
1080Const MOUSEEVENTF_RIGHTDOWN = &H0008
1081Const MOUSEEVENTF_RIGHTUP = &H0010
1082Const MOUSEEVENTF_MIDDLEDOWN = &H0020
1083Const MOUSEEVENTF_MIDDLEUP = &H0040
1084Const MOUSEEVENTF_WHEEL = &H0800
1085Const MOUSEEVENTF_ABSOLUTE = &H8000
1086Declare Sub mouse_event Lib "user32" (dwFlags As DWord, dx As DWord, dy As DWord, dwData As DWord, dwExtraInfo As DWord)
1087
1088Declare Function MoveWindow Lib "user32" (hWnd As HWND, x As Long, y As Long, nWidth As Long, nHight As Long, bRepaint As BOOL) As BOOL
1089Declare Function OpenClipboard Lib "user32" (hWndNewOwner As HWND) As BOOL
1090Declare Function OpenIcon Lib "user32" (hWnd As HWND) As BOOL
1091
1092Const PM_NOREMOVE = &H0000
1093Const PM_REMOVE = &H0001
1094Declare 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
1095
1096Const HWND_BROADCAST = &HFFFF
1097Declare Function PostMessage Lib "user32" Alias _FuncName_PostMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
1098
1099Declare Sub PostQuitMessage Lib "user32" (nExitCode As Long)
1100Declare Function PostThreadMessage Lib "user32" Alias _FuncName_PostThreadMessage (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
1101Declare Function RealChildWindowFromPoint Lib "user32" (hwndParent As HWND, xPoint As Long, yPoint As Long) As HWND
1102
1103Const RDW_INVALIDATE = &H0001
1104Const RDW_INTERNALPAINT = &H0002
1105Const RDW_ERASE = &H0004
1106Const RDW_VALIDATE = &H0008
1107Const RDW_NOINTERNALPAINT = &H0010
1108Const RDW_NOERASE = &H0020
1109Const RDW_NOCHILDREN = &H0040
1110Const RDW_ALLCHILDREN = &H0080
1111Const RDW_UPDATENOW = &H0100
1112Const RDW_ERASENOW = &H0200
1113Const RDW_FRAME = &H0400
1114Const RDW_NOFRAME = &H0800
1115Declare Function RedrawWindow Lib "user32" (hWnd As HWND, ByRef lprcUpdate As RECT, hrgnUpdate As HRGN, flags As DWord) As BOOL
1116
1117Declare Function RegisterClassEx Lib "user32" Alias _FuncName_RegisterClassEx (ByRef wcx As WNDCLASSEX) As ATOM
1118Declare Function RegisterClipboardFormat Lib "user32" Alias _FuncName_RegisterClipboardFormat (pszFormat As PCTSTR) As DWord
1119Declare Function RegisterHotKey lib "user32.dll" (hwnd As HWND, id As Long, dwModufuers As DWord, vk As DWord) As BOOL
1120Declare Function RegisterWindowMessage Lib "user32" Alias _FuncName_RegisterWindowMessage (pString As PCTSTR) As DWord
1121Declare Function ReleaseCapture Lib "user32" () As BOOL
1122Declare Function ReleaseDC Lib "user32" (hWnd As HWND, hdc As HDC) As BOOL
1123Declare Function RemoveMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
1124Declare Function RemoveProp Lib "user32" Alias _FuncName_RemoveProp (hWnd As HWND, pString As PCTSTR) As HANDLE
1125Declare Function TranslateAccelerator Lib "user32" Alias _FuncName_TranslateAccelerator (hwnd As HWND, hAccTable As HACCEL, ByRef msg As MSG) As Long
1126Declare Function TranslateMessage Lib "user32" (ByRef msg As MSG) As Long
1127Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef Point As POINTAPI) As BOOL
1128Declare 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
1129
1130Const SW_SCROLLCHILDREN = &H0001
1131Const SW_INVALIDATE = &H0002
1132Const SW_ERASE = &H0004
1133Declare 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
1134
1135Declare Function SendDlgItemMessage Lib "user32" Alias _FuncName_SendDlgItemMessage (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1136Declare Function SendMessage Lib "user32" Alias _FuncName_SendMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1137Declare Function SendNotifyMessage Lib "user32" Alias _FuncName_SendNotifyMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1138Declare Function SetActiveWindow Lib "user32" (hWnd As HWND) As HWND
1139Declare Function SetDlgItemInt Lib "user32" (hDlg As HWND, nIDDlgItem As Long, uValue As DWord, bSigned As BOOL) As BOOL
1140Declare Function SetDlgItemText Lib "user32" Alias _FuncName_SetDlgItemText (hDlg As HWND, nIDDlgItem As Long, lpString As PCTSTR) As BOOL
1141Declare Function SetCapture Lib "user32" (hWnd As HWND) As HWND
1142Declare Function SetCaretPos Lib "user32" (x As Long, y As Long) As BOOL
1143
1144#ifdef _WIN64
1145Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1146Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1147#else
1148Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1149Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1150#endif
1151
1152Declare Function SetClipboardData Lib "user32" (uFormat As DWord, hMem As HANDLE) As HANDLE
1153Declare Function SetClipboardViewer Lib "user32" (ByVal hWndNewViewer As HWND) As HWND
1154Declare Function SetCursor Lib "user32" (hCursor As HCURSOR) As HCURSOR
1155Declare Function SetCursorPos Lib "user32" (x As Long, y As Long) As BOOL
1156Declare Function SetDoubleClickTime Lib "user32" (uInterval As DWord) As BOOL
1157Declare Function SetFocus Lib "user32" (hWnd As HWND) As HWND
1158Declare Function SetForegroundWindow Lib "user32" (hWnd As HWND) As BOOL
1159Declare Function SetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
1160Declare Function SetMenu Lib "user32" (hWnd As HWND, hMenu As HMENU) As BOOL
1161Declare Function SetMenuContextHelpId Lib "user32" (hmenu As HMENU, dwContextHelpId As DWord) As BOOL
1162Declare Function SetMenuDefaultItem Lib "user32" (hMenu As HMENU, uItem As DWord, fByPos As DWord) As BOOL
1163Declare Function SetMenuItemInfo Lib "user32" Alias _FuncName_SetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
1164Declare Function SetParent Lib "user32" (hWndChild As HWND, hWndNewParent As HWND) As HWND
1165Declare Function SetProp Lib "user32" Alias _FuncName_SetProp (hWnd As HWND, pString As PCTSTR, hData As HANDLE) As BOOL
1166Declare Function SetRect Lib "User32" (ByRef rc As RECT, xLeft As Long, yTop As Long, xRight As Long, yBottom As Long) As Long
1167Declare Function SetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL
1168Declare Function SetSysColors Lib "user32" (cElements As Long, lpaElements As *DWord, lpaRgbValues As *DWord) As BOOL
1169
1170TypeDef TIMERPROC = *Sub(hwnd As HWND, msg As DWord, idEvent As ULONG_PTR, dwTime As DWord)
1171Declare Function SetTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR, nElapse As DWord, lpTimerFunc As TIMERPROC) As ULONG_PTR
1172
1173Declare Function SetWindowContextHelpId Lib "user32"(hwnd As HWND, dwContextHelpId As DWord) As BOOL
1174#ifdef _WIN64
1175Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1176Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1177#else
1178Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1179Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1180#endif
1181
1182Declare Function SetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
1183
1184Const HWND_TOP = 0 As HWND
1185Const HWND_BOTTOM = 1 As HWND
1186Const HWND_TOPMOST = -1 As HWND
1187Const HWND_NOTOPMOST = -2 As HWND
1188Const SWP_NOSIZE = &H0001
1189Const SWP_NOMOVE = &H0002
1190Const SWP_NOZORDER = &H0004
1191Const SWP_NOREDRAW = &H0008
1192Const SWP_NOACTIVATE = &H0010
1193Const SWP_FRAMECHANGED = &H0020
1194Const SWP_SHOWWINDOW = &H0040
1195Const SWP_HIDEWINDOW = &H0080
1196Const SWP_NOCOPYBITS = &H0100
1197Const SWP_NOOWNERZORDER = &H0200
1198Const SWP_NOSENDCHANGING = &H0400
1199Const SWP_DRAWFRAME = SWP_FRAMECHANGED
1200Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
1201Const SWP_DEFERERASE = &H2000
1202Const SWP_ASYNCWINDOWPOS = &H4000
1203Declare 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
1204
1205Declare Function SetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bRedraw As BOOL) As BOOL
1206Declare Function SetWindowsHookEx Lib "user32" Alias _FuncName_SetWindowsHookEx (idHook As Long, lpfn As HOOKPROC, hMod As HINSTANCE, dwThreadId As DWord) As HHOOK
1207Declare Function SetWindowText Lib "user32" Alias _FuncName_SetWindowText (hWnd As HWND, pString As PCTSTR) As BOOL
1208Declare Function ShowCaret Lib "user32" (hWnd As HWND) As BOOL
1209Declare Function ShowCursor Lib "user32" (bShow As Long) As BOOL
1210Declare Function ShowScrollBar Lib "user32" (hWnd As HWND, wBar As DWord, bShow As BOOL) As BOOL
1211
1212Const SW_HIDE = 0
1213Const SW_SHOWNORMAL = 1
1214Const SW_NORMAL = 1
1215Const SW_SHOWMINIMIZED = 2
1216Const SW_SHOWMAXIMIZED = 3
1217Const SW_MAXIMIZE = 3
1218Const SW_SHOWNOACTIVATE = 4
1219Const SW_SHOW = 5
1220Const SW_MINIMIZE = 6
1221Const SW_SHOWMINNOACTIVE = 7
1222Const SW_SHOWNA = 8
1223Const SW_RESTORE = 9
1224Const SW_SHOWDEFAULT = 10
1225Const SW_FORCEMINIMIZE = 11
1226Const SW_MAX = 11
1227Declare Function ShowWindow Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
1228Declare Function ShowWindowAsync Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
1229
1230Type NONCLIENTMETRICSW
1231 cbSize As DWord
1232 iBorderWidth As Long
1233 iScrollWidth As Long
1234 iScrollHeight As Long
1235 iCaptionWidth As Long
1236 iCaptionHeight As Long
1237 lfCaptionFont As LOGFONTW
1238 iSmCaptionWidth As Long
1239 iSmCaptionHeight As Long
1240 lfSmCaptionFont As LOGFONTW
1241 iMenuWidth As Long
1242 iMenuHeight As Long
1243 lfMenuFont As LOGFONTW
1244 lfStatusFont As LOGFONTW
1245 lfMessageFont As LOGFONTW
1246End Type
1247Type NONCLIENTMETRICSA
1248 cbSize As DWord
1249 iBorderWidth As Long
1250 iScrollWidth As Long
1251 iScrollHeight As Long
1252 iCaptionWidth As Long
1253 iCaptionHeight As Long
1254 lfCaptionFont As LOGFONTA
1255 iSmCaptionWidth As Long
1256 iSmCaptionHeight As Long
1257 lfSmCaptionFont As LOGFONTA
1258 iMenuWidth As Long
1259 iMenuHeight As Long
1260 lfMenuFont As LOGFONTA
1261 lfStatusFont As LOGFONTA
1262 lfMessageFont As LOGFONTA
1263End Type
1264#ifdef
1265TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSW
1266#else
1267TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSA
1268#endif
1269Const SPI_GETBEEP = 1
1270Const SPI_SETBEEP = 2
1271Const SPI_GETMOUSE = 3
1272Const SPI_SETMOUSE = 4
1273Const SPI_GETBORDER = 5
1274Const SPI_SETBORDER = 6
1275Const SPI_GETKEYBOARDSPEED = 10
1276Const SPI_SETKEYBOARDSPEED = 11
1277Const SPI_LANGDRIVER = 12
1278Const SPI_ICONHORIZONTALSPACING = 13
1279Const SPI_GETSCREENSAVETIMEOUT = 14
1280Const SPI_SETSCREENSAVETIMEOUT = 15
1281Const SPI_GETSCREENSAVEACTIVE = 16
1282Const SPI_SETSCREENSAVEACTIVE = 17
1283Const SPI_GETGRIDGRANULARITY = 18
1284Const SPI_SETGRIDGRANULARITY = 19
1285Const SPI_SETDESKWALLPAPER = 20
1286Const SPI_SETDESKPATTERN = 21
1287Const SPI_GETKEYBOARDDELAY = 22
1288Const SPI_SETKEYBOARDDELAY = 23
1289Const SPI_ICONVERTICALSPACING = 24
1290Const SPI_GETICONTITLEWRAP = 25
1291Const SPI_SETICONTITLEWRAP = 26
1292Const SPI_GETMENUDROPALIGNMENT = 27
1293Const SPI_SETMENUDROPALIGNMENT = 28
1294Const SPI_SETDOUBLECLKWIDTH = 29
1295Const SPI_SETDOUBLECLKHEIGHT = 30
1296Const SPI_GETICONTITLELOGFONT = 31
1297Const SPI_SETDOUBLECLICKTIME = 32
1298Const SPI_SETMOUSEBUTTONSWAP = 33
1299Const SPI_SETICONTITLELOGFONT = 34
1300Const SPI_GETFASTTASKSWITCH = 35
1301Const SPI_SETFASTTASKSWITCH = 36
1302Const SPI_SETDRAGFULLWINDOWS = 37
1303Const SPI_GETDRAGFULLWINDOWS = 38
1304Const SPI_GETNONCLIENTMETRICS = 41
1305Const SPI_SETNONCLIENTMETRICS = 42
1306Const SPI_GETMINIMIZEDMETRICS = 43
1307Const SPI_SETMINIMIZEDMETRICS = 44
1308Const SPI_GETICONMETRICS = 45
1309Const SPI_SETICONMETRICS = 46
1310Const SPI_SETWORKAREA = 47
1311Const SPI_GETWORKAREA = 48
1312Const SPI_SETPENWINDOWS = 49
1313Const SPI_GETHIGHCONTRAST = 66
1314Const SPI_SETHIGHCONTRAST = 67
1315Const SPI_GETKEYBOARDPREF = 68
1316Const SPI_SETKEYBOARDPREF = 69
1317Const SPI_GETSCREENREADER = 70
1318Const SPI_SETSCREENREADER = 71
1319Const SPI_GETANIMATION = 72
1320Const SPI_SETANIMATION = 73
1321Const SPI_GETFONTSMOOTHING = 74
1322Const SPI_SETFONTSMOOTHING = 75
1323Const SPI_SETDRAGWIDTH = 76
1324Const SPI_SETDRAGHEIGHT = 77
1325Const SPI_SETHANDHELD = 78
1326Const SPI_GETLOWPOWERTIMEOUT = 79
1327Const SPI_GETPOWEROFFTIMEOUT = 80
1328Const SPI_SETLOWPOWERTIMEOUT = 81
1329Const SPI_SETPOWEROFFTIMEOUT = 82
1330Const SPI_GETLOWPOWERACTIVE = 83
1331Const SPI_GETPOWEROFFACTIVE = 84
1332Const SPI_SETLOWPOWERACTIVE = 85
1333Const SPI_SETPOWEROFFACTIVE = 86
1334Const SPI_SETCURSORS = 87
1335Const SPI_SETICONS = 88
1336Const SPI_GETDEFAULTINPUTLANG = 89
1337Const SPI_SETDEFAULTINPUTLANG = 90
1338Const SPI_SETLANGTOGGLE = 91
1339Const SPI_GETWINDOWSEXTENSION = 92
1340Const SPI_SETMOUSETRAILS = 93
1341Const SPI_GETMOUSETRAILS = 94
1342Const SPI_SETSCREENSAVERRUNNING = 97
1343Const SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING
1344Const SPI_GETFILTERKEYS = 50
1345Const SPI_SETFILTERKEYS = 51
1346Const SPI_GETTOGGLEKEYS = 52
1347Const SPI_SETTOGGLEKEYS = 53
1348Const SPI_GETMOUSEKEYS = 54
1349Const SPI_SETMOUSEKEYS = 55
1350Const SPI_GETSHOWSOUNDS = 56
1351Const SPI_SETSHOWSOUNDS = 57
1352Const SPI_GETSTICKYKEYS = 58
1353Const SPI_SETSTICKYKEYS = 59
1354Const SPI_GETACCESSTIMEOUT = 60
1355Const SPI_SETACCESSTIMEOUT = 61
1356Const SPI_GETSERIALKEYS = 62
1357Const SPI_SETSERIALKEYS = 63
1358Const SPI_GETSOUNDSENTRY = 64
1359Const SPI_SETSOUNDSENTRY = 65
1360Const SPI_GETMOUSEHOVERWIDTH = 98
1361Const SPI_SETMOUSEHOVERWIDTH = 99
1362Const SPI_GETMOUSEHOVERHEIGHT = 100
1363Const SPI_SETMOUSEHOVERHEIGHT = 101
1364Const SPI_GETMOUSEHOVERTIME = 102
1365Const SPI_SETMOUSEHOVERTIME = 103
1366Const SPI_GETWHEELSCROLLLINES = 104
1367Const SPI_SETWHEELSCROLLLINES = 105
1368Const SPI_GETSHOWIMEUI = 110
1369Const SPI_SETSHOWIMEUI = 111
1370Const SPI_GETMOUSESPEED = 112
1371Const SPI_SETMOUSESPEED = 113
1372Const SPI_GETSCREENSAVERRUNNING = 114
1373Const SPI_GETACTIVEWINDOWTRACKING = &H1000 'Windows 2000 or later
1374Const SPI_SETACTIVEWINDOWTRACKING = &H1001
1375Const SPI_GETMENUANIMATION = &H1002
1376Const SPI_SETMENUANIMATION = &H1003
1377Const SPI_GETCOMBOBOXANIMATION = &H1004
1378Const SPI_SETCOMBOBOXANIMATION = &H1005
1379Const SPI_GETLISTBOXSMOOTHSCROLLING = &H1006
1380Const SPI_SETLISTBOXSMOOTHSCROLLING = &H1007
1381Const SPI_GETGRADIENTCAPTIONS = &H1008
1382Const SPI_SETGRADIENTCAPTIONS = &H1009
1383Const SPI_GETMENUUNDERLINES = &H100A
1384Const SPI_SETMENUUNDERLINES = &H100B
1385Const SPI_GETACTIVEWNDTRKZORDER = &H100C
1386Const SPI_SETACTIVEWNDTRKZORDER = &H100D
1387Const SPI_GETHOTTRACKING = &H100E
1388Const SPI_SETHOTTRACKING = &H100F
1389Const SPI_GETFOREGROUNDLOCKTIMEOUT = &H2000
1390Const SPI_SETFOREGROUNDLOCKTIMEOUT = &H2001
1391Const SPI_GETACTIVEWNDTRKTIMEOUT = &H2002
1392Const SPI_SETACTIVEWNDTRKTIMEOUT = &H2003
1393Const SPI_GETFOREGROUNDFLASHCOUNT = &H2004
1394Const SPI_SETFOREGROUNDFLASHCOUNT = &H2005
1395Const SPIF_UPDATEINIFILE = &H0001
1396Const SPIF_SENDWININICHANGE = &H0002
1397Const SPIF_SENDCHANGE = SPIF_SENDWININICHANGE
1398Declare Function SystemParametersInfo Lib "user32" Alias _FuncName_SystemParametersInfo (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
1399
1400Const TME_HOVER = &H00000001
1401Const TME_LEAVE = &H00000002
1402Const TME_NONCLIENT = &H00000010
1403Const TME_QUERY = &H40000000
1404Const TME_CANCEL = &H80000000
1405Const HOVER_DEFAULT = &HFFFFFFFF
1406Type TRACKMOUSEEVENT
1407 cbSize As DWord
1408 dwFlags As DWord
1409 hwndTrack As HWND
1410 dwHoverTime As DWord
1411End Type
1412Declare Function TrackMouseEvent Lib "user32" (ByRef EventTrack As TRACKMOUSEEVENT) As BOOL
1413
1414Const TPM_LEFTBUTTON = &H0000
1415Const TPM_RIGHTBUTTON = &H0002
1416Const TPM_LEFTALIGN = &H0000
1417Const TPM_CENTERALIGN = &H0004
1418Const TPM_RIGHTALIGN = &H0008
1419Const TPM_TOPALIGN = &H0000
1420Const TPM_VCENTERALIGN = &H0010
1421Const TPM_BOTTOMALIGN = &H0020
1422Const TPM_HORIZONTAL = &H0000
1423Const TPM_VERTICAL = &H0040
1424Const TPM_NONOTIFY = &H0080
1425Const TPM_RETURNCMD = &H0100
1426Const TPM_RECURSE = &H0001
1427Declare Function TrackPopupMenu Lib "user32" (hMenu As HMENU, uFlags As DWord, x As Long, y As Long, nReserved As Long, hWnd As HWND, ByRef prcRect As RECT) As BOOL
1428
1429declare function UnhookWindowsHookEx lib "user32" (ByVal hhk As HHOOK) As BOOL
1430Declare Function UnregisterClass Lib "user32" Alias _FuncName_UnregisterClass (pClassName As PCTSTR, hinst As HINSTANCE) As BOOL
1431Declare Function UnregisterHotKey Lib "user32" (hwnd As HWND, id As Long) As BOOL
1432Declare Function UpdateWindow Lib "user32" (hWnd As HWND) As BOOL
1433Declare Function ValidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
1434Declare Function ValidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As BOOL
1435Declare Function WaitForInputIdle Lib "user32" (hProcess As HANDLE, dwMilliseconds As DWord) As DWord
1436
1437Declare Function WaitMessage Lib "user32" () As BOOL
1438Declare Function WindowFromDC Lib "user32" (hDC As HDC) As HWND
1439Declare Function WindowFromPoint Lib "user32" (ptX As Long, ptY As Long) As HWND
1440Declare Function wsprintf cdecl Lib "user32" Alias _FuncName_wsprintf (pText As PTSTR, pFormat As PCTSTR, ...) As Long
1441Declare Function wvsprintf Lib "user32" Alias _FuncName_wvsprintf (pOutput As PTSTR, pFormat As PCTSTR, arglist As DWordPtr) As Long
1442
1443
1444#endif '_INC_WINDOW
Note: See TracBrowser for help on using the repository browser.