source: Include/api_window.sbp@ 160

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

API宣言の追加(主にフォーラムに投稿されたものより)

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
434
435Declare Function BringWindowToTop Lib "user32" (hWnd As HWND) As Long
436Declare Function CallNextHookEx Lib "user32" (hHook As HHOOK, nCode As Long, wParam As WPARAM, lParam As LPARAM) As LRESULT
437Declare Function CallWindowProc Lib "user32" Alias _FuncName_CallWindowProc (lpPrevWndFunc As WNDPROC, hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
438Declare Function ChangeClipboardChain Lib "user32" (hwndRemove As HWND, hwndNewNext As HWND) As BOOL
439Declare Function CharLower Lib "user32" Alias _FuncName_CharLower (psz As PTSTR) As DWord
440Declare Function CharNext Lib "user32" Alias _FuncName_CharNext (lpszCurrent As LPCTSTR) As LPTSTR
441Declare Function CharNextExA Lib "user32" (CodePage As Word, lpCurrentChar As LPCSTR, dwFlags As DWord) As LPSTR
442Declare Function CharPrev Lib "user32" Alias _FuncName_CharPrev (lpszStart As LPCTSTR, lpszCurrent As LPCTSTR) As LPTSTR
443Declare Function CharPrevExA Lib "user32" (CodePage As Word, lpStart As LPCSTR, lpCurrentChar As LPCSTR, dwFlags As DWord) As LPSTR
444Declare Function CharUpper Lib "user32" Alias _FuncName_CharUpper (psz As PTSTR) As DWord
445Declare Function CheckMenuItem Lib "user32" (hMenu As HMENU, uIDCheckItem As DWord, uCheck As DWord) As DWord
446Declare Function CheckMenuRadioItem Lib "user32" (hMenu As HMENU, idFirst As DWord, idLast As DWord, idCheck As DWord, uFlags As DWord) As BOOL
447Declare Function CheckDlgButton Lib "user32" (hDlg As HWND, nIDButton As Long, uCheck As DWord) As BOOL
448Declare Function CheckRadioButton Lib "user32" (hDlg As HWND, nIDFirstButton As Long, nIDLastButton As Long, nIDCheckButton As Long) As BOOL
449Declare Function ChildWindowFromPoint Lib "user32" (hWndParent As HWND, x As Long, y As Long) As HWND
450Const CWP_ALL = &H0000
451Const CWP_SKIPINVISIBLE = &H0001
452Const CWP_SKIPDISABLED = &H0002
453Const CWP_SKIPTRANSPARENT = &H0004
454Declare Function ChildWindowFromPointEx Lib "user32" (hWndParent As HWND, x As Long, y As Long, uFlags As DWord) As HWND
455
456Declare Function ClientToScreen Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
457Declare Function ClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
458Declare Function CloseClipboard Lib "user32" () As BOOL
459Declare Function CloseWindow Lib "user32" (hWnd As HWND) As BOOL
460Declare Function CopyImage Lib "user32" (hImage As HANDLE, uType As DWord, cxDesired As Long, cyDesired As Long, fuFlags As DWord) As HANDLE
461Declare Function CountClipboardFormats Lib "user32" () As Long
462Const FVIRTKEY = &H01
463Const FNOINVERT = &H02
464Const FSHIFT = &H04
465Const FCONTROL = &H08
466Const FALT = &H10
467Type ACCEL
468 fVirt As Byte
469 key As Word
470 cmd As Word
471End Type
472Declare Function CreateAcceleratorTable Lib "user32" Alias _FuncName_CreateAcceleratorTable (ByRef acl As ACCEL, i As Long) As HACCEL
473Declare Function CreateCaret Lib "user32" (hWnd As HWND, hBitmap As HBITMAP, nWidth As Long, nHeight As Long) As BOOL
474Declare 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
475Declare 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
476
477Type ICONINFO
478 fIcon As BOOL
479 xHotspot As DWord
480 yHotspot As DWord
481 hbmMask As HBITMAP
482 hbmColor As HBITMAP
483End Type
484Declare Function CreateIconIndirect Lib "user32" (ByRef pIconInfo As ICONINFO) As HICON
485
486Declare Function CreateMenu Lib "user32" () As HMENU
487Declare Function CreatePopupMenu Lib "user32" () As HMENU
488
489Const CW_USEDEFAULT = &H80000000
490Declare 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
491
492Declare Function DefDlgProc Lib "user32" Alias _FuncName_DefWindowProc (hDlg As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
493Declare Function DefWindowProc Lib "user32" Alias _FuncName_DefWindowProc (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
494Declare Function DeleteMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
495Declare Function DestroyAcceleratorTable Lib "user32" (hAccel As HACCEL) As BOOL
496Declare Function DestroyCaret Lib "user32" () As BOOL
497Declare Function DestroyCursor Lib "user32" (hCursor As HCURSOR) As BOOL
498Declare Function DestroyIcon Lib "user32" (hIcon As HICON) As BOOL
499Declare Function DestroyMenu Lib "user32" (hMenu As HMENU) As BOOL
500Declare Function DestroyWindow Lib "user32" (hWnd As HWND) As BOOL
501Type DLGITEMTEMPLATE
502 style As DWord
503 dwExtendedStyle As DWord
504 x As Integer
505 y As Integer
506 cx As Integer
507 cy As Integer
508 id As Word
509End Type
510Type DLGTEMPLATE
511 style As DWord
512 dwExtendedStyle As DWord
513 cdit As Word
514 x As Integer
515 y As Integer
516 cx As Integer
517 cy As Integer
518End Type
519Declare 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
520Declare Function DispatchMessage Lib "user32" Alias _FuncName_DispatchMessage (ByRef Msg As MSG) As LRESULT
521Declare Function DlgDirList Lib "user32" Alias _FuncName_DlgDirList (hDlg As HWND, lpPathSpec As LPTSTR, nIDListBox As Long, nIDStaticPath As Long, uFileType As DWord) As Long
522Declare Function DlgDirListComboBox Lib "user32" Alias _FuncName_DlgDirListComboBox (hDlg As HWND, lpPathSpec As LPTSTR, nIDComboBox As Long, nIDStaticPath As Long,uFileType As DWord) As Long
523Declare Function DlgDirSelectComboBoxEx Lib "user32" Alias _FuncName_DlgDirSelectComboBoxEx (hDlg As HWND, lpString As LPTSTR, nCount As Long, nIDComboBox As Long) As BOOL
524Declare Function DlgDirSelectEx Lib "user32" Alias _FuncName_DlgDirSelectEx (hDlg As HWND, lpString As LPTSTR, nCount As Long, nIDListBox As Long) As BOOL
525Const BDR_RAISEDOUTER = &H0001
526Const BDR_SUNKENOUTER = &H0002
527Const BDR_RAISEDINNER = &H0004
528Const BDR_SUNKENINNER = &H0008
529Const BDR_OUTER = &H0003
530Const BDR_INNER = &H000c
531Const EDGE_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER
532Const EDGE_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER
533Const EDGE_ETCHED = BDR_SUNKENOUTER or BDR_RAISEDINNER
534Const EDGE_BUMP = BDR_RAISEDOUTER or BDR_SUNKENINNER
535Const BF_LEFT = &H0001
536Const BF_TOP = &H0002
537Const BF_RIGHT = &H0004
538Const BF_BOTTOM = &H0008
539Const BF_TOPLEFT = BF_TOP or BF_LEFT
540Const BF_TOPRIGHT = BF_TOP or BF_RIGHT
541Const BF_BOTTOMLEFT = BF_BOTTOM or BF_LEFT
542Const BF_BOTTOMRIGHT = BF_BOTTOM or BF_RIGHT
543Const BF_RECT = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM
544Const BF_DIAGONAL = &H0010
545Const BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL or BF_TOP or BF_RIGHT
546Const BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL or BF_TOP or BF_LEFT
547Const BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL or BF_BOTTOM or BF_LEFT
548Const BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT
549Const BF_MIDDLE = &H0800
550Const BF_SOFT = &H1000
551Const BF_ADJUST = &H2000
552Const BF_FLAT = &H4000
553Const BF_MONO = &H8000
554Declare Function DrawEdge Lib "user32" (hdc As HDC, ByRef lpRect As RECT, edge As DWord, grfFlags As DWord) As BOOL
555
556Const DFC_CAPTION = 1
557Const DFC_MENU = 2
558Const DFC_SCROLL = 3
559Const DFC_BUTTON = 4
560Const DFC_POPUPMENU = 5
561Const DFCS_CAPTIONCLOSE = &H0000
562Const DFCS_CAPTIONMIN = &H0001
563Const DFCS_CAPTIONMAX = &H0002
564Const DFCS_CAPTIONRESTORE = &H0003
565Const DFCS_CAPTIONHELP = &H0004
566Const DFCS_MENUARROW = &H0000
567Const DFCS_MENUCHECK = &H0001
568Const DFCS_MENUBULLET = &H0002
569Const DFCS_MENUARROWRIGHT = &H0004
570Const DFCS_SCROLLUP = &H0000
571Const DFCS_SCROLLDOWN = &H0001
572Const DFCS_SCROLLLEFT = &H0002
573Const DFCS_SCROLLRIGHT = &H0003
574Const DFCS_SCROLLCOMBOBOX = &H0005
575Const DFCS_SCROLLSIZEGRIP = &H0008
576Const DFCS_SCROLLSIZEGRIPRIGHT = &H0010
577Const DFCS_BUTTONCHECK = &H0000
578Const DFCS_BUTTONRADIOIMAGE = &H0001
579Const DFCS_BUTTONRADIOMASK = &H0002
580Const DFCS_BUTTONRADIO = &H0004
581Const DFCS_BUTTON3STATE = &H0008
582Const DFCS_BUTTONPUSH = &H0010
583Const DFCS_INACTIVE = &H0100
584Const DFCS_PUSHED = &H0200
585Const DFCS_CHECKED = &H0400
586Const DFCS_TRANSPARENT = &H0800
587Const DFCS_HOT = &H1000
588Const DFCS_ADJUSTRECT = &H2000
589Const DFCS_FLAT = &H4000
590Const DFCS_MONO = &H8000
591Declare Function DrawFrameControl Lib "user32" (hdc As HDC, ByRef lpRect As RECT, uType As DWord, uState As DWord) As BOOL
592
593Declare Function DrawIcon Lib "user32" (hdc As HDC, x As Long, y As Long, hIcon As HICON) As BOOL
594
595Const DI_MASK = &H0001
596Const DI_IMAGE = &H0002
597Const DI_NORMAL = &H0003
598Const DI_COMPAT = &H0004
599Const DI_DEFAULTSIZE = &H0008
600Declare 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
601
602Declare Function DrawMenuBar Lib "user32" (hwnd As HWND) As BOOL
603
604Const DT_TOP = &H00000000
605Const DT_LEFT = &H00000000
606Const DT_CENTER = &H00000001
607Const DT_RIGHT = &H00000002
608Const DT_VCENTER = &H00000004
609Const DT_BOTTOM = &H00000008
610Const DT_WORDBREAK = &H00000010
611Const DT_SINGLELINE = &H00000020
612Const DT_EXPANDTABS = &H00000040
613Const DT_TABSTOP = &H00000080
614Const DT_NOCLIP = &H00000100
615Const DT_EXTERNALLEADING =&H00000200
616Const DT_CALCRECT = &H00000400
617Const DT_NOPREFIX = &H00000800
618Const DT_INTERNAL = &H00001000
619Const DT_EDITCONTROL = &H00002000
620Const DT_PATH_ELLIPSIS = &H00004000
621Const DT_END_ELLIPSIS = &H00008000
622Const DT_MODIFYSTRING = &H00010000
623Const DT_RTLREADING = &H00020000
624Const DT_WORD_ELLIPSIS = &H00040000
625Declare 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
626
627Type DRAWTEXTPARAMS
628 cbSize As DWord
629 iTabLength As Long
630 iLeftMargin As Long
631 iRightMargin As Long
632 uiLengthDrawn As DWord
633End Type
634Declare 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
635
636Declare Function EmptyClipboard Lib "user32" () As BOOL
637Declare Function EnableMenuItem Lib "user32" (hMenu As HMENU, uIDEnableItem As DWord, uEnable As DWord) As BOOL
638
639Const ESB_ENABLE_BOTH = &H0000
640Const ESB_DISABLE_BOTH = &H0003
641Const ESB_DISABLE_LEFT = &H0001
642Const ESB_DISABLE_RIGHT = &H0002
643Const ESB_DISABLE_UP = &H0001
644Const ESB_DISABLE_DOWN = &H0002
645Const ESB_DISABLE_LTUP = ESB_DISABLE_LEFT
646Const ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT
647Declare Function EnableScrollBar Lib "user32" (hWnd As HWND, dwSBflags As DWord, dwArrows As DWord) As BOOL
648
649Declare Function EnableWindow Lib "user32" (hWnd As HWND, bEnable As BOOL) As BOOL
650Declare Function EndDialogAPI Lib "user32" Alias "EndDialog" (hwndDlg As HWND, nRet As Long) As BOOL
651Declare Function EndPaint Lib "user32" (hWnd As HWND, ByRef lpPaint As PAINTSTRUCT) As BOOL
652Declare Function EnumClipboardFormats Lib "user32" (uFormat As DWord) As DWord
653Declare Function EnumChildWindows Lib "user32" (hwndParent As HWND, pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
654Declare Function EnumDisplayMonitors Lib "user32.dll" (ByVal hdc As HDC, lprcClip As *RECT, ByVal lpfnEnum As MONITORENUMPROC, dwData As LPARAM) As BOOL
655Declare Function EnumThreadWindows Lib "user32" (dwThreadId As DWord, pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
656Declare Function EnumWindows Lib "user32" (pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
657Declare Function ExitWindowsEx Lib "user32" (uFlags As DWord, dwReserved As DWord) As BOOL
658Declare Function FillRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As BOOL
659Declare Function FindWindow Lib "user32" Alias _FuncName_FindWindow (pClassName As PCTSTR, lpWindowName As PCTSTR) As HWND
660Declare Function FindWindowEx Lib "user32" Alias _FuncName_FindWindowEx (hwndParent As HWND, hwndChildAfter As HWND, pszClass As PCTSTR, pszWindow As PCTSTR) As HWND
661Declare Function FlashWindow Lib "user32" (hWnd As HWND, bInvert As BOOL) As BOOL
662Const FLASHW_STOP = 0
663Const FLASHW_CAPTION = 1
664Const FLASHW_TRAY = 2
665Const FLASHW_ALL = (FLASHW_CAPTION Or FLASHW_TRAY)
666Const FLASHW_TIMER = 4
667Const FLASHW_TIMERNOFG = 12
668Type FLASHWINFO
669 cbSize As DWord
670 hWnd As HWND
671 dwFlags As DWord
672 uCount As DWord
673 dwTimeout As DWord
674End Type
675Declare Function FlashWindowEx Lib "user32" (ByRef fwi As FLASHWINFO) As Long
676Declare Function FrameRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As Long
677Declare Function GetActiveWindow Lib "user32" () As HWND
678Declare Function GetAsyncKeyState Lib "user32" (vKey As Long) As Integer
679Declare Function GetCapture Lib "user32" () As HWND
680Declare Function GetCaretPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
681Declare Function GetClassInfoEx Lib "user32" Alias _FuncName_GetClassInfoEx (hInst As HINSTANCE, pszClass As PCTSTR, ByRef lpwcx As WNDCLASSEX) As BOOL
682
683Const GCL_MENUNAME = -8
684Const GCL_HBRBACKGROUND = -10
685Const GCL_HCURSOR = -12
686Const GCL_HICON = -14
687Const GCL_HMODULE = -16
688Const GCL_CBWNDEXTRA = -18
689Const GCL_CBCLSEXTRA = -20
690Const GCL_WNDPROC = -24
691Const GCL_STYLE = -26
692Const GCW_ATOM = -32
693Const GCL_HICONSM = -34
694#ifdef _WIN64
695Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
696Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
697#else
698Declare Function GetClassLong Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
699Declare Function GetClassLongPtr Lib "user32" Alias _FuncName_GetClassLong (hWnd As HWND, nIndex As Long) As LONG_PTR
700#endif
701
702Declare Function GetClassName Lib "user32" Alias _FuncName_GetClassName (hWnd As HWND, lpClassName As PTSTR, nMaxCount As Long) As Long
703Declare Function GetClientRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
704Declare Function GetClipboardData Lib "user32" (uFormat As DWord) As HANDLE
705Declare Function GetClipboardFormatName Lib "user32" Alias _FuncName_GetClipboardFormatName (uFormat As DWord, pszFormatName As PTSTR, cchMaxCount As Long) As BOOL
706Declare Function GetClipboardOwner Lib "user32" () As HWND
707Declare Function GetClipboardViewer Lib "user32" () As HWND
708Declare Function GetClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
709Declare Function GetCursor Lib "user32" () As HCURSOR
710Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
711Declare Function GetDC Lib "user32" (hWnd As HWND) As HDC
712
713Const DCX_WINDOW = &H00000001
714Const DCX_CACHE = &H00000002
715Const DCX_NORESETATTRS = &H00000004
716Const DCX_CLIPCHILDREN = &H00000008
717Const DCX_CLIPSIBLINGS = &H00000010
718Const DCX_PARENTCLIP = &H00000020
719Const DCX_EXCLUDERGN = &H00000040
720Const DCX_INTERSECTRGN = &H00000080
721Const DCX_EXCLUDEUPDATE = &H00000100
722Const DCX_INTERSECTUPDATE = &H00000200
723Const DCX_LOCKWINDOWUPDATE = &H00000400
724Const DCX_VALIDATE = &H00200000
725Declare Function GetDCEx Lib "user32" (hWnd As HWND, hrgnClip As HRGN, dwFlags As DWord) As HDC
726
727Declare Function GetDesktopWindow Lib "user32" () As HWND
728Declare Function GetDialogBaseUnits Lib "user32" () As Long
729Declare Function GetDlgCtrlID Lib "user32" (hWnd As HWND) As Long
730Declare Function GetDlgItem Lib "user32" (hDlg As HWND, nIDDlgItem As Long) As HWND
731Declare Function GetDlgItemInt Lib "user32" (hDlg As HWND, nIDDlgItem As Long, lpTranslated As *BOOL, bSigned As BOOL) As DWord
732Declare Function GetDlgItemText Lib "user32" Alias _FuncName_GetDlgItemText (hDlg As HWND, nIDDlgItem As Long, pString As PTSTR, nMaxCount As Long) As Long
733Declare Function GetDoubleClickTime Lib "user32" () As DWord
734Declare Function GetFocus Lib "user32" () As HWND
735Declare Function GetForegroundWindow Lib "user32" () As HWND
736Declare Function GetIconInfo Lib "user32" (hIcon As HICON, ByRef pIconInfo As ICONINFO) As Long
737Declare Function GetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
738Declare Function GetKeyState Lib "user32" (nVirtKey As Long) As Integer
739Declare Function GetListBoxInfo Lib "user32" (ByVal hwnd As HWND) As DWord
740Declare Function GetMenu Lib "user32" (hWnd As HWND) As HMENU
741
742Declare Function GetMenuContextHelpId Lib "user32" (hmenu As HMENU) As DWord
743Const GMDI_USEDISABLED = &H0001
744Const GMDI_GOINTOPOPUPS = &H0002
745Declare Function GetMenuDefaultItem Lib "user32" (hMenu As HMENU, fByPos As DWord, gmdiFlags As DWord) As DWord
746
747Declare Function GetMenuItemID Lib "user32" (hMenu As HMENU, nPos As Long) As DWord
748Declare Function GetMenuItemCount Lib "user32" (hMenu As HMENU) As Long
749Declare Function GetMenuItemInfo Lib "user32" Alias _FuncName_GetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As DWord, ByRef mii As MENUITEMINFO) As BOOL
750Declare Function GetMessage Lib "user32" Alias _FuncName_GetMessage (ByRef Msg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord) As Long
751Const CCHDEVICENAME = 32
752Type MONITORINFO
753 cbSize As DWord
754 rcMonitor As RECT
755 rcWork As RECT
756 dwFlags As DWord
757End Type
758Type MONITORINFOEXA
759 cbSize As DWord
760 rcMonitor As RECT
761 rcWork As RECT
762 dwFlags As DWord
763 szDevice[ELM(CCHDEVICENAME)] As SByte
764End Type
765Type MONITORINFOEXW
766 cbSize As DWord
767 rcMonitor As RECT
768 rcWork As RECT
769 dwFlags As DWord
770 szDevice[ELM(CCHDEVICENAME)] As WCHAR
771End Type
772Declare Function GetMonitorInfo Lib "user32.dll" Alias _FuncName_GetMonitorInfo (hMonitor As HMONITOR, ByRef mi As Any /*MONITORINFO*/) As BOOL
773Declare Function GetNextDlgGroupItem Lib "user32" (hDlg As HWND, hCtl As HWND, bPrevious As BOOL) As HWND
774Declare Function GetNextDlgTabItem Lib "user32" (hDlg As HWND, hCtl As HWND, bPrevious As BOOL) As HWND
775Declare Function GetOpenClipboardWindow Lib "user32" () As HWND
776Declare Function GetParent Lib "user32" (hWnd As HWND) As HWND
777Declare Function GetPriorityClipboardFormat Lib "user32" (lpFormatList As *DWord, FormatNum As Long) As Long
778Declare Function GetProp Lib "user32" Alias _FuncName_GetProp (hWnd As HWND, pString As PCTSTR) As HANDLE
779Declare Function GetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO) As BOOL
780Declare Function GetSubMenu Lib "user32" (hMenu As HMENU, nPos As Long) As HMENU
781
782Const COLOR_SCROLLBAR = 0
783Const COLOR_BACKGROUND = 1
784Const COLOR_ACTIVECAPTION = 2
785Const COLOR_INACTIVECAPTION = 3
786Const COLOR_MENU = 4
787Const COLOR_WINDOW = 5
788Const COLOR_WINDOWFRAME = 6
789Const COLOR_MENUTEXT = 7
790Const COLOR_WINDOWTEXT = 8
791Const COLOR_CAPTIONTEXT = 9
792Const COLOR_ACTIVEBORDER = 10
793Const COLOR_INACTIVEBORDER = 11
794Const COLOR_APPWORKSPACE = 12
795Const COLOR_HIGHLIGHT = 13
796Const COLOR_HIGHLIGHTTEXT = 14
797Const COLOR_BTNFACE = 15
798Const COLOR_BTNSHADOW = 16
799Const COLOR_GRAYTEXT = 17
800Const COLOR_BTNTEXT = 18
801Const COLOR_INACTIVECAPTIONTEXT = 19
802Const COLOR_BTNHIGHLIGHT = 20
803Const COLOR_3DDKSHADOW = 21
804Const COLOR_3DLIGHT = 22
805Const COLOR_INFOTEXT = 23
806Const COLOR_INFOBK = 24
807Const COLOR_HOTLIGHT = 26
808Const COLOR_GRADIENTACTIVECAPTION = 27
809Const COLOR_GRADIENTINACTIVECAPTION = 28
810Const COLOR_DESKTOP = COLOR_BACKGROUND
811Const COLOR_3DFACE = COLOR_BTNFACE
812Const COLOR_3DSHADOW = COLOR_BTNSHADOW
813Const COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT
814Const COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT
815Const COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT
816Declare Function GetSysColor Lib "user32" (nIndex As Long) As DWord
817Declare Function GetSysColorBrush Lib "user32" (nIndex As Long) As HBRUSH
818
819Declare Function GetSystemMenu Lib "user32" (hWnd As HWND, bRevert As BOOL) As HMENU
820
821Const SM_CXSCREEN = 0
822Const SM_CYSCREEN = 1
823Const SM_CXVSCROLL = 2
824Const SM_CYHSCROLL = 3
825Const SM_CYCAPTION = 4
826Const SM_CXBORDER = 5
827Const SM_CYBORDER = 6
828Const SM_CXDLGFRAME = 7
829Const SM_CYDLGFRAME = 8
830Const SM_CYVTHUMB = 9
831Const SM_CXHTHUMB = 10
832Const SM_CXICON = 11
833Const SM_CYICON = 12
834Const SM_CXCURSOR = 13
835Const SM_CYCURSOR = 14
836Const SM_CYMENU = 15
837Const SM_CXFULLSCREEN = 16
838Const SM_CYFULLSCREEN = 17
839Const SM_CYKANJIWINDOW = 18
840Const SM_MOUSEPRESENT = 19
841Const SM_CYVSCROLL = 20
842Const SM_CXHSCROLL = 21
843Const SM_DEBUG = 22
844Const SM_SWAPBUTTON = 23
845Const SM_RESERVED1 = 24
846Const SM_RESERVED2 = 25
847Const SM_RESERVED3 = 26
848Const SM_RESERVED4 = 27
849Const SM_CXMIN = 28
850Const SM_CYMIN = 29
851Const SM_CXSIZE = 30
852Const SM_CYSIZE = 31
853Const SM_CXFRAME = 32
854Const SM_CYFRAME = 33
855Const SM_CXMINTRACK = 34
856Const SM_CYMINTRACK = 35
857Const SM_CXDOUBLECLK = 36
858Const SM_CYDOUBLECLK = 37
859Const SM_CXICONSPACING = 38
860Const SM_CYICONSPACING = 39
861Const SM_MENUDROPALIGNMENT = 40
862Const SM_PENWINDOWS = 41
863Const SM_DBCSENABLED = 42
864Const SM_CMOUSEBUTTONS = 43
865Const SM_CXFIXEDFRAME = SM_CXDLGFRAME
866Const SM_CYFIXEDFRAME = SM_CYDLGFRAME
867Const SM_CXSIZEFRAME = SM_CXFRAME
868Const SM_CYSIZEFRAME = SM_CYFRAME
869Const SM_SECURE = 44
870Const SM_CXEDGE = 45
871Const SM_CYEDGE = 46
872Const SM_CXMINSPACING = 47
873Const SM_CYMINSPACING = 48
874Const SM_CXSMICON = 49
875Const SM_CYSMICON = 50
876Const SM_CYSMCAPTION = 51
877Const SM_CXSMSIZE = 52
878Const SM_CYSMSIZE = 53
879Const SM_CXMENUSIZE = 54
880Const SM_CYMENUSIZE = 55
881Const SM_ARRANGE = 56
882Const SM_CXMINIMIZED = 57
883Const SM_CYMINIMIZED = 58
884Const SM_CXMAXTRACK = 59
885Const SM_CYMAXTRACK = 60
886Const SM_CXMAXIMIZED = 61
887Const SM_CYMAXIMIZED = 62
888Const SM_NETWORK = 63
889Const SM_CLEANBOOT = 67
890Const SM_CXDRAG = 68
891Const SM_CYDRAG = 69
892Const SM_SHOWSOUNDS = 70
893Const SM_CXMENUCHECK = 71
894Const SM_CYMENUCHECK = 72
895Const SM_SLOWMACHINE = 73
896Const SM_MIDEASTENABLED = 74
897Const SM_MOUSEWHEELPRESENT = 75
898Declare Function GetSystemMetrics Lib "user32" (nIndex As Long) As Long
899
900Declare Function GetUpdateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT, bErase As BOOL) As BOOL
901Declare Function GetUpdateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
902
903Const GW_HWNDFIRST = 0
904Const GW_HWNDLAST = 1
905Const GW_HWNDNEXT = 2
906Const GW_HWNDPREV = 3
907Const GW_OWNER = 4
908Const GW_CHILD = 5
909Declare Function GetWindow Lib "user32" (hWnd As HWND, uCmd As DWord) As HWND
910
911Declare Function GetWindowContextHelpId Lib "user32" (hwnd As HWND) As DWord
912
913Declare Function GetWindowDC Lib "user32" (hWnd As HWND) As HDC
914
915#ifndef _WIN64
916Const GWL_WNDPROC = -4
917Const GWL_HINSTANCE = -6
918Const GWL_HWNDPARENT = -8
919Const GWL_USERDATA = -21
920Const GWL_ID = -12
921#endif
922
923Const GWL_STYLE = -16
924Const GWL_EXSTYLE = -20
925
926Const GWLP_WNDPROC = -4
927Const GWLP_HINSTANCE = -6
928Const GWLP_HWNDPARENT = -8
929Const GWLP_USERDATA = -21
930Const GWLP_ID = -12
931
932
933#ifdef _WIN64
934Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
935Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLongPtr (hWnd As HWND, nIndex As Long) As LONG_PTR
936#else
937Declare Function GetWindowLong Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
938Declare Function GetWindowLongPtr Lib "user32" Alias _FuncName_GetWindowLong (hWnd As HWND, nIndex As Long) As LONG_PTR
939#endif
940Declare Function GetWindowModuleFileName Lib "user32" Alias _FuncName_GetWindowModuleFileName (hwnd As HWND, pszFileName As LPTSTR, cchFileNameMax As DWord) As DWord
941
942Const WPF_SETMINPOSITION = &H0001
943Const WPF_RESTORETOMAXIMIZED = &H0002
944Type WINDOWPLACEMENT
945 length As DWord
946 flags As DWord
947 showCmd As DWord
948 ptMinPosition As POINTAPI
949 ptMaxPosition As POINTAPI
950 rcNormalPosition As RECT
951End Type
952Declare Function GetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
953
954Declare Function GetWindowRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
955Declare Function GetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As Long
956Declare Function GetWindowText Lib "user32" Alias _FuncName_GetWindowText (hWnd As HWND, lpString As PTSTR, nMaxCount As Long) As Long
957Declare Function GetWindowTextLength Lib "user32" Alias _FuncName_GetWindowTextLength (hWnd As HWND) As Long
958Declare Function GetWindowThreadProcessId Lib "user32" (hWnd As HWND, pdwProcessId As *DWord) As DWord
959Declare Function HideCaret Lib "user32" (hWnd As HWND) As BOOL
960Declare Function InsertMenuItem Lib "user32" Alias _FuncName_InsertMenuItem (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
961Declare Function InvalidateRect Lib "user32" (hWnd As HWND, ByRef Rect As RECT, bErase As BOOL) As BOOL
962Declare Function InvalidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
963Declare Function InvertRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT) As BOOL
964Declare Function IsCharAlpha Lib "user32" Alias _FuncName_IsCharAlpha (ch As TCHAR) As BOOL
965Declare Function IsCharAlphaNumeric Lib "user32" Alias _FuncName_IsCharAlphaNumeric (ch As TCHAR) As BOOL
966Declare Function IsCharLower Lib "user32" Alias _FuncName_IsCharLower (ch As TCHAR) As BOOL
967Declare Function IsCharUpper Lib "user32" Alias _FuncName_IsCharUpper (ch As TCHAR) As BOOL
968Declare Function IsChild Lib "user32" (hWndParent As HWND, hWnd As HWND) As BOOL
969Declare Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As DWord) As BOOL
970Declare Function IsDialogMessage Lib "user32" Alias _FuncName_IsDialogMessage (hDlg As HWND, ByRef msg As MSG) As BOOL
971Declare Function IsDlgButtonChecked Lib "user32" (hDlg As HWND, nIDButton As Long) As DWord
972Declare Function IsIconic Lib "user32" (hWnd As HWND) As BOOL
973Declare Function IsWindow Lib "user32" (hWnd As HWND) As BOOL
974Declare Function IsWindowEnabled Lib "user32" (hWnd As HWND) As BOOL
975Declare Function IsWindowUnicode Lib "user32" (hWnd As HWND) As BOOL
976Declare Function IsWindowVisible Lib "user32" (hWnd As HWND) As BOOL
977Declare Function IsZoomed Lib "user32" (hWnd As HWND) As BOOL
978
979Const KEYEVENTF_EXTENDEDKEY = &H0001
980Const KEYEVENTF_KEYUP = &H0002
981Declare Sub keybd_event Lib "user32" (bVk As Byte, bScan As Byte, dwFlags As DWord, dwExtraInfo As DWord)
982
983Declare Function KillTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR) As BOOL
984Declare Function LoadBitmap Lib "user32" Alias _FuncName_LoadBitmap (hInst As HINSTANCE, pBitmapName As PCTSTR) As HBITMAP
985
986Const IDC_ARROW = 32512
987Const IDC_IBEAM = 32513
988Const IDC_WAIT = 32514
989Const IDC_CROSS = 32515
990Const IDC_UPARROW = 32516
991Const IDC_SIZE = 32640
992Const IDC_ICON = 32641
993Const IDC_SIZENWSE = 32642
994Const IDC_SIZENESW = 32643
995Const IDC_SIZEWE = 32644
996Const IDC_SIZENS = 32645
997Const IDC_SIZEALL = 32646
998Const IDC_NO = 32648
999Const IDC_HAND = 32649
1000Const IDC_APPSTARTING = 32650
1001Const IDC_HELP = 32651
1002Declare Function LoadCursor Lib "user32" Alias _FuncName_LoadCursor (hInst As HINSTANCE, pCursorName As PCTSTR) As HCURSOR
1003
1004Declare Function LoadCursorFromFile Lib "user32" Alias _FuncName_LoadCursorFromFile (pFileName As PCTSTR) As HCURSOR
1005
1006Const IDI_APPLICATION = 32512
1007Const IDI_HAND = 32513
1008Const IDI_QUESTION = 32514
1009Const IDI_EXCLAMATION = 32515
1010Const IDI_ASTERISK = 32516
1011Const IDI_WINLOGO = 32517
1012Declare Function LoadIcon Lib "user32" Alias _FuncName_LoadIcon (hInst As HINSTANCE, pIconName As PCTSTR) As HICON
1013
1014Const IMAGE_BITMAP = 0
1015Const IMAGE_ICON = 1
1016Const IMAGE_CURSOR = 2
1017Const IMAGE_ENHMETAFILE = 3
1018Const LR_DEFAULTCOLOR = &H0000
1019Const LR_MONOCHROME = &H0001
1020Const LR_COLOR = &H0002
1021Const LR_COPYRETURNORG = &H0004
1022Const LR_COPYDELETEORG = &H0008
1023Const LR_LOADFROMFILE = &H0010
1024Const LR_LOADTRANSPARENT = &H0020
1025Const LR_DEFAULTSIZE = &H0040
1026Const LR_VGACOLOR = &H0080
1027Const LR_LOADMAP3DCOLORS = &H1000
1028Const LR_CREATEDIBSECTION = &H2000
1029Const LR_COPYFROMRESOURCE = &H4000
1030Const LR_SHARED = &H8000
1031Declare 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
1032Declare Function LoadString Lib "user32" Alias _FuncName_LoadString (hInstance As HINSTANCE, uID As DWord, lpBuffer As LPTSTR, nBufferMax As Long) As Long
1033Declare Function LockWindowUpdate Lib "user32" (hWnd As HWND) As BOOL
1034Declare Function MapVirtualKey Lib "user32" Alias _FuncName_MapVirtualKey (wCode As DWord, wMapType As DWord) As DWord
1035Declare Function MapWindowPoints Lib "user32" (
1036 hWndFrom As HWND,
1037 hWndTo As HWND,
1038 pPoints As *POINTAPI,
1039 cPoints As DWord) As Long
1040Declare Function MessageBeep Lib "user32" (uType As DWord) As BOOL
1041
1042Const MB_OK = &H00000000
1043Const MB_OKCANCEL = &H00000001
1044Const MB_ABORTRETRYIGNORE = &H00000002
1045Const MB_YESNOCANCEL = &H00000003
1046Const MB_YESNO = &H00000004
1047Const MB_RETRYCANCEL = &H00000005
1048Const MB_ICONHAND = &H00000010
1049Const MB_ICONQUESTION = &H00000020
1050Const MB_ICONEXCLAMATION = &H00000030
1051Const MB_ICONASTERISK = &H00000040
1052Const MB_USERICON = &H00000080
1053Const MB_ICONWARNING = MB_ICONEXCLAMATION
1054Const MB_ICONERROR = MB_ICONHAND
1055Const MB_ICONINFORMATION = MB_ICONASTERISK
1056Const MB_ICONSTOP = MB_ICONHAND
1057Const MB_DEFBUTTON1 = &H00000000
1058Const MB_DEFBUTTON2 = &H00000100
1059Const MB_DEFBUTTON3 = &H00000200
1060Const MB_DEFBUTTON4 = &H00000300
1061Const MB_APPLMODAL = &H00000000
1062Const MB_SYSTEMMODAL = &H00001000
1063Const MB_TASKMODAL = &H00002000
1064Const MB_HELP = &H00004000
1065Const MB_NOFOCUS = &H00008000
1066Const MB_SETFOREGROUND = &H00010000
1067Const MB_DEFAULT_DESKTOP_ONLY = &H00020000
1068Const MB_TOPMOST = &H00040000
1069Const MB_RIGHT = &H00080000
1070Const MB_RTLREADING = &H00100000
1071#ifdef UNICODE
1072Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hwnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
1073#else
1074Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hwnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
1075#endif
1076Declare Function MessageBoxW Lib "user32" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
1077Declare Function MessageBoxA Lib "user32" (hWnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
1078Const MOUSEEVENTF_MOVE = &H0001
1079Const MOUSEEVENTF_LEFTDOWN = &H0002
1080Const MOUSEEVENTF_LEFTUP = &H0004
1081Const MOUSEEVENTF_RIGHTDOWN = &H0008
1082Const MOUSEEVENTF_RIGHTUP = &H0010
1083Const MOUSEEVENTF_MIDDLEDOWN = &H0020
1084Const MOUSEEVENTF_MIDDLEUP = &H0040
1085Const MOUSEEVENTF_WHEEL = &H0800
1086Const MOUSEEVENTF_ABSOLUTE = &H8000
1087Declare Sub mouse_event Lib "user32" (dwFlags As DWord, dx As DWord, dy As DWord, dwData As DWord, dwExtraInfo As DWord)
1088
1089Declare Function MoveWindow Lib "user32" (hWnd As HWND, x As Long, y As Long, nWidth As Long, nHight As Long, bRepaint As BOOL) As BOOL
1090Declare Function OpenClipboard Lib "user32" (hWndNewOwner As HWND) As BOOL
1091Declare Function OpenIcon Lib "user32" (hWnd As HWND) As BOOL
1092
1093Const PM_NOREMOVE = &H0000
1094Const PM_REMOVE = &H0001
1095Declare 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
1096
1097Const HWND_BROADCAST = &HFFFF
1098Declare Function PostMessage Lib "user32" Alias _FuncName_PostMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
1099
1100Declare Sub PostQuitMessage Lib "user32" (nExitCode As Long)
1101Declare Function PostThreadMessage Lib "user32" Alias _FuncName_PostThreadMessage (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
1102Declare Function RealChildWindowFromPoint Lib "user32" (hwndParent As HWND, xPoint As Long, yPoint As Long) As HWND
1103
1104Const RDW_INVALIDATE = &H0001
1105Const RDW_INTERNALPAINT = &H0002
1106Const RDW_ERASE = &H0004
1107Const RDW_VALIDATE = &H0008
1108Const RDW_NOINTERNALPAINT = &H0010
1109Const RDW_NOERASE = &H0020
1110Const RDW_NOCHILDREN = &H0040
1111Const RDW_ALLCHILDREN = &H0080
1112Const RDW_UPDATENOW = &H0100
1113Const RDW_ERASENOW = &H0200
1114Const RDW_FRAME = &H0400
1115Const RDW_NOFRAME = &H0800
1116Declare Function RedrawWindow Lib "user32" (hWnd As HWND, ByRef lprcUpdate As RECT, hrgnUpdate As HRGN, flags As DWord) As BOOL
1117
1118Declare Function RegisterClassEx Lib "user32" Alias _FuncName_RegisterClassEx (ByRef wcx As WNDCLASSEX) As ATOM
1119Declare Function RegisterClipboardFormat Lib "user32" Alias _FuncName_RegisterClipboardFormat (pszFormat As PCTSTR) As DWord
1120Declare Function RegisterHotKey lib "user32.dll" (hwnd As HWND, id As Long, dwModufuers As DWord, vk As DWord) As BOOL
1121Declare Function RegisterWindowMessage Lib "user32" Alias _FuncName_RegisterWindowMessage (pString As PCTSTR) As DWord
1122Declare Function ReleaseCapture Lib "user32" () As BOOL
1123Declare Function ReleaseDC Lib "user32" (hWnd As HWND, hdc As HDC) As BOOL
1124Declare Function RemoveMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
1125Declare Function RemoveProp Lib "user32" Alias _FuncName_RemoveProp (hWnd As HWND, pString As PCTSTR) As HANDLE
1126Declare Function TranslateAccelerator Lib "user32" Alias _FuncName_TranslateAccelerator (hwnd As HWND, hAccTable As HACCEL, ByRef msg As MSG) As Long
1127Declare Function TranslateMessage Lib "user32" (ByRef msg As MSG) As Long
1128Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef Point As POINTAPI) As BOOL
1129Declare 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
1130
1131Const SW_SCROLLCHILDREN = &H0001
1132Const SW_INVALIDATE = &H0002
1133Const SW_ERASE = &H0004
1134Declare 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
1135
1136Declare Function SendDlgItemMessage Lib "user32" Alias _FuncName_SendDlgItemMessage (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1137Declare Function SendMessage Lib "user32" Alias _FuncName_SendMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1138Declare Function SendNotifyMessage Lib "user32" Alias _FuncName_SendNotifyMessage (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
1139Declare Function SetActiveWindow Lib "user32" (hWnd As HWND) As HWND
1140Declare Function SetDlgItemInt Lib "user32" (hDlg As HWND, nIDDlgItem As Long, uValue As DWord, bSigned As BOOL) As BOOL
1141Declare Function SetDlgItemText Lib "user32" Alias _FuncName_SetDlgItemText (hDlg As HWND, nIDDlgItem As Long, lpString As PCTSTR) As BOOL
1142Declare Function SetCapture Lib "user32" (hWnd As HWND) As HWND
1143Declare Function SetCaretPos Lib "user32" (x As Long, y As Long) As BOOL
1144
1145#ifdef _WIN64
1146Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1147Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1148#else
1149Declare Function SetClassLong Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1150Declare Function SetClassLongPtr Lib "user32" Alias _FuncName_SetClassLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1151#endif
1152
1153Declare Function SetClipboardData Lib "user32" (uFormat As DWord, hMem As HANDLE) As HANDLE
1154Declare Function SetClipboardViewer Lib "user32" (ByVal hWndNewViewer As HWND) As HWND
1155Declare Function SetCursor Lib "user32" (hCursor As HCURSOR) As HCURSOR
1156Declare Function SetCursorPos Lib "user32" (x As Long, y As Long) As BOOL
1157Declare Function SetDoubleClickTime Lib "user32" (uInterval As DWord) As BOOL
1158Declare Function SetFocus Lib "user32" (hWnd As HWND) As HWND
1159Declare Function SetForegroundWindow Lib "user32" (hWnd As HWND) As BOOL
1160Declare Function SetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
1161Declare Function SetMenu Lib "user32" (hWnd As HWND, hMenu As HMENU) As BOOL
1162Declare Function SetMenuContextHelpId Lib "user32" (hmenu As HMENU, dwContextHelpId As DWord) As BOOL
1163Declare Function SetMenuDefaultItem Lib "user32" (hMenu As HMENU, uItem As DWord, fByPos As DWord) As BOOL
1164Declare Function SetMenuItemInfo Lib "user32" Alias _FuncName_SetMenuItemInfo (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef mii As MENUITEMINFO) As BOOL
1165Declare Function SetParent Lib "user32" (hWndChild As HWND, hWndNewParent As HWND) As HWND
1166Declare Function SetProp Lib "user32" Alias _FuncName_SetProp (hWnd As HWND, pString As PCTSTR, hData As HANDLE) As BOOL
1167Declare Function SetRect Lib "User32" (ByRef rc As RECT, xLeft As Long, yTop As Long, xRight As Long, yBottom As Long) As Long
1168Declare Function SetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL
1169Declare Function SetSysColors Lib "user32" (cElements As Long, lpaElements As *DWord, lpaRgbValues As *DWord) As BOOL
1170
1171TypeDef TIMERPROC = *Sub(hwnd As HWND, msg As DWord, idEvent As ULONG_PTR, dwTime As DWord)
1172Declare Function SetTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR, nElapse As DWord, lpTimerFunc As TIMERPROC) As ULONG_PTR
1173
1174Declare Function SetWindowContextHelpId Lib "user32"(hwnd As HWND, dwContextHelpId As DWord) As BOOL
1175#ifdef _WIN64
1176Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1177Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLongPtr (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1178#else
1179Declare Function SetWindowLong Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1180Declare Function SetWindowLongPtr Lib "user32" Alias _FuncName_SetWindowLong (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
1181#endif
1182
1183Declare Function SetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
1184
1185Const HWND_TOP = 0 As HWND
1186Const HWND_BOTTOM = 1 As HWND
1187Const HWND_TOPMOST = -1 As HWND
1188Const HWND_NOTOPMOST = -2 As HWND
1189Const SWP_NOSIZE = &H0001
1190Const SWP_NOMOVE = &H0002
1191Const SWP_NOZORDER = &H0004
1192Const SWP_NOREDRAW = &H0008
1193Const SWP_NOACTIVATE = &H0010
1194Const SWP_FRAMECHANGED = &H0020
1195Const SWP_SHOWWINDOW = &H0040
1196Const SWP_HIDEWINDOW = &H0080
1197Const SWP_NOCOPYBITS = &H0100
1198Const SWP_NOOWNERZORDER = &H0200
1199Const SWP_NOSENDCHANGING = &H0400
1200Const SWP_DRAWFRAME = SWP_FRAMECHANGED
1201Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
1202Const SWP_DEFERERASE = &H2000
1203Const SWP_ASYNCWINDOWPOS = &H4000
1204Declare 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
1205
1206Declare Function SetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bRedraw As BOOL) As BOOL
1207Declare Function SetWindowsHookEx Lib "user32" Alias _FuncName_SetWindowsHookEx (idHook As Long, lpfn As HOOKPROC, hMod As HINSTANCE, dwThreadId As DWord) As HHOOK
1208Declare Function SetWindowText Lib "user32" Alias _FuncName_SetWindowText (hWnd As HWND, pString As PCTSTR) As BOOL
1209Declare Function ShowCaret Lib "user32" (hWnd As HWND) As BOOL
1210Declare Function ShowCursor Lib "user32" (bShow As Long) As BOOL
1211Declare Function ShowScrollBar Lib "user32" (hWnd As HWND, wBar As DWord, bShow As BOOL) As BOOL
1212
1213Const SW_HIDE = 0
1214Const SW_SHOWNORMAL = 1
1215Const SW_NORMAL = 1
1216Const SW_SHOWMINIMIZED = 2
1217Const SW_SHOWMAXIMIZED = 3
1218Const SW_MAXIMIZE = 3
1219Const SW_SHOWNOACTIVATE = 4
1220Const SW_SHOW = 5
1221Const SW_MINIMIZE = 6
1222Const SW_SHOWMINNOACTIVE = 7
1223Const SW_SHOWNA = 8
1224Const SW_RESTORE = 9
1225Const SW_SHOWDEFAULT = 10
1226Const SW_FORCEMINIMIZE = 11
1227Const SW_MAX = 11
1228Declare Function ShowWindow Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
1229Declare Function ShowWindowAsync Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
1230
1231Type NONCLIENTMETRICSW
1232 cbSize As DWord
1233 iBorderWidth As Long
1234 iScrollWidth As Long
1235 iScrollHeight As Long
1236 iCaptionWidth As Long
1237 iCaptionHeight As Long
1238 lfCaptionFont As LOGFONTW
1239 iSmCaptionWidth As Long
1240 iSmCaptionHeight As Long
1241 lfSmCaptionFont As LOGFONTW
1242 iMenuWidth As Long
1243 iMenuHeight As Long
1244 lfMenuFont As LOGFONTW
1245 lfStatusFont As LOGFONTW
1246 lfMessageFont As LOGFONTW
1247End Type
1248Type NONCLIENTMETRICSA
1249 cbSize As DWord
1250 iBorderWidth As Long
1251 iScrollWidth As Long
1252 iScrollHeight As Long
1253 iCaptionWidth As Long
1254 iCaptionHeight As Long
1255 lfCaptionFont As LOGFONTA
1256 iSmCaptionWidth As Long
1257 iSmCaptionHeight As Long
1258 lfSmCaptionFont As LOGFONTA
1259 iMenuWidth As Long
1260 iMenuHeight As Long
1261 lfMenuFont As LOGFONTA
1262 lfStatusFont As LOGFONTA
1263 lfMessageFont As LOGFONTA
1264End Type
1265#ifdef
1266TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSW
1267#else
1268TypeDef NONCLIENTMETRICS = NONCLIENTMETRICSA
1269#endif
1270Const SPI_GETBEEP = 1
1271Const SPI_SETBEEP = 2
1272Const SPI_GETMOUSE = 3
1273Const SPI_SETMOUSE = 4
1274Const SPI_GETBORDER = 5
1275Const SPI_SETBORDER = 6
1276Const SPI_GETKEYBOARDSPEED = 10
1277Const SPI_SETKEYBOARDSPEED = 11
1278Const SPI_LANGDRIVER = 12
1279Const SPI_ICONHORIZONTALSPACING = 13
1280Const SPI_GETSCREENSAVETIMEOUT = 14
1281Const SPI_SETSCREENSAVETIMEOUT = 15
1282Const SPI_GETSCREENSAVEACTIVE = 16
1283Const SPI_SETSCREENSAVEACTIVE = 17
1284Const SPI_GETGRIDGRANULARITY = 18
1285Const SPI_SETGRIDGRANULARITY = 19
1286Const SPI_SETDESKWALLPAPER = 20
1287Const SPI_SETDESKPATTERN = 21
1288Const SPI_GETKEYBOARDDELAY = 22
1289Const SPI_SETKEYBOARDDELAY = 23
1290Const SPI_ICONVERTICALSPACING = 24
1291Const SPI_GETICONTITLEWRAP = 25
1292Const SPI_SETICONTITLEWRAP = 26
1293Const SPI_GETMENUDROPALIGNMENT = 27
1294Const SPI_SETMENUDROPALIGNMENT = 28
1295Const SPI_SETDOUBLECLKWIDTH = 29
1296Const SPI_SETDOUBLECLKHEIGHT = 30
1297Const SPI_GETICONTITLELOGFONT = 31
1298Const SPI_SETDOUBLECLICKTIME = 32
1299Const SPI_SETMOUSEBUTTONSWAP = 33
1300Const SPI_SETICONTITLELOGFONT = 34
1301Const SPI_GETFASTTASKSWITCH = 35
1302Const SPI_SETFASTTASKSWITCH = 36
1303Const SPI_SETDRAGFULLWINDOWS = 37
1304Const SPI_GETDRAGFULLWINDOWS = 38
1305Const SPI_GETNONCLIENTMETRICS = 41
1306Const SPI_SETNONCLIENTMETRICS = 42
1307Const SPI_GETMINIMIZEDMETRICS = 43
1308Const SPI_SETMINIMIZEDMETRICS = 44
1309Const SPI_GETICONMETRICS = 45
1310Const SPI_SETICONMETRICS = 46
1311Const SPI_SETWORKAREA = 47
1312Const SPI_GETWORKAREA = 48
1313Const SPI_SETPENWINDOWS = 49
1314Const SPI_GETHIGHCONTRAST = 66
1315Const SPI_SETHIGHCONTRAST = 67
1316Const SPI_GETKEYBOARDPREF = 68
1317Const SPI_SETKEYBOARDPREF = 69
1318Const SPI_GETSCREENREADER = 70
1319Const SPI_SETSCREENREADER = 71
1320Const SPI_GETANIMATION = 72
1321Const SPI_SETANIMATION = 73
1322Const SPI_GETFONTSMOOTHING = 74
1323Const SPI_SETFONTSMOOTHING = 75
1324Const SPI_SETDRAGWIDTH = 76
1325Const SPI_SETDRAGHEIGHT = 77
1326Const SPI_SETHANDHELD = 78
1327Const SPI_GETLOWPOWERTIMEOUT = 79
1328Const SPI_GETPOWEROFFTIMEOUT = 80
1329Const SPI_SETLOWPOWERTIMEOUT = 81
1330Const SPI_SETPOWEROFFTIMEOUT = 82
1331Const SPI_GETLOWPOWERACTIVE = 83
1332Const SPI_GETPOWEROFFACTIVE = 84
1333Const SPI_SETLOWPOWERACTIVE = 85
1334Const SPI_SETPOWEROFFACTIVE = 86
1335Const SPI_SETCURSORS = 87
1336Const SPI_SETICONS = 88
1337Const SPI_GETDEFAULTINPUTLANG = 89
1338Const SPI_SETDEFAULTINPUTLANG = 90
1339Const SPI_SETLANGTOGGLE = 91
1340Const SPI_GETWINDOWSEXTENSION = 92
1341Const SPI_SETMOUSETRAILS = 93
1342Const SPI_GETMOUSETRAILS = 94
1343Const SPI_SETSCREENSAVERRUNNING = 97
1344Const SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING
1345Const SPI_GETFILTERKEYS = 50
1346Const SPI_SETFILTERKEYS = 51
1347Const SPI_GETTOGGLEKEYS = 52
1348Const SPI_SETTOGGLEKEYS = 53
1349Const SPI_GETMOUSEKEYS = 54
1350Const SPI_SETMOUSEKEYS = 55
1351Const SPI_GETSHOWSOUNDS = 56
1352Const SPI_SETSHOWSOUNDS = 57
1353Const SPI_GETSTICKYKEYS = 58
1354Const SPI_SETSTICKYKEYS = 59
1355Const SPI_GETACCESSTIMEOUT = 60
1356Const SPI_SETACCESSTIMEOUT = 61
1357Const SPI_GETSERIALKEYS = 62
1358Const SPI_SETSERIALKEYS = 63
1359Const SPI_GETSOUNDSENTRY = 64
1360Const SPI_SETSOUNDSENTRY = 65
1361Const SPI_GETMOUSEHOVERWIDTH = 98
1362Const SPI_SETMOUSEHOVERWIDTH = 99
1363Const SPI_GETMOUSEHOVERHEIGHT = 100
1364Const SPI_SETMOUSEHOVERHEIGHT = 101
1365Const SPI_GETMOUSEHOVERTIME = 102
1366Const SPI_SETMOUSEHOVERTIME = 103
1367Const SPI_GETWHEELSCROLLLINES = 104
1368Const SPI_SETWHEELSCROLLLINES = 105
1369Const SPI_GETSHOWIMEUI = 110
1370Const SPI_SETSHOWIMEUI = 111
1371Const SPI_GETMOUSESPEED = 112
1372Const SPI_SETMOUSESPEED = 113
1373Const SPI_GETSCREENSAVERRUNNING = 114
1374Const SPI_GETACTIVEWINDOWTRACKING = &H1000 'Windows 2000 or later
1375Const SPI_SETACTIVEWINDOWTRACKING = &H1001
1376Const SPI_GETMENUANIMATION = &H1002
1377Const SPI_SETMENUANIMATION = &H1003
1378Const SPI_GETCOMBOBOXANIMATION = &H1004
1379Const SPI_SETCOMBOBOXANIMATION = &H1005
1380Const SPI_GETLISTBOXSMOOTHSCROLLING = &H1006
1381Const SPI_SETLISTBOXSMOOTHSCROLLING = &H1007
1382Const SPI_GETGRADIENTCAPTIONS = &H1008
1383Const SPI_SETGRADIENTCAPTIONS = &H1009
1384Const SPI_GETMENUUNDERLINES = &H100A
1385Const SPI_SETMENUUNDERLINES = &H100B
1386Const SPI_GETACTIVEWNDTRKZORDER = &H100C
1387Const SPI_SETACTIVEWNDTRKZORDER = &H100D
1388Const SPI_GETHOTTRACKING = &H100E
1389Const SPI_SETHOTTRACKING = &H100F
1390Const SPI_GETFOREGROUNDLOCKTIMEOUT = &H2000
1391Const SPI_SETFOREGROUNDLOCKTIMEOUT = &H2001
1392Const SPI_GETACTIVEWNDTRKTIMEOUT = &H2002
1393Const SPI_SETACTIVEWNDTRKTIMEOUT = &H2003
1394Const SPI_GETFOREGROUNDFLASHCOUNT = &H2004
1395Const SPI_SETFOREGROUNDFLASHCOUNT = &H2005
1396Const SPIF_UPDATEINIFILE = &H0001
1397Const SPIF_SENDWININICHANGE = &H0002
1398Const SPIF_SENDCHANGE = SPIF_SENDWININICHANGE
1399Declare Function SystemParametersInfo Lib "user32" Alias _FuncName_SystemParametersInfo (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
1400
1401Const TME_HOVER = &H00000001
1402Const TME_LEAVE = &H00000002
1403Const TME_NONCLIENT = &H00000010
1404Const TME_QUERY = &H40000000
1405Const TME_CANCEL = &H80000000
1406Const HOVER_DEFAULT = &HFFFFFFFF
1407Type TRACKMOUSEEVENT
1408 cbSize As DWord
1409 dwFlags As DWord
1410 hwndTrack As HWND
1411 dwHoverTime As DWord
1412End Type
1413Declare Function TrackMouseEvent Lib "user32" (ByRef EventTrack As TRACKMOUSEEVENT) As BOOL
1414
1415Const TPM_LEFTBUTTON = &H0000
1416Const TPM_RIGHTBUTTON = &H0002
1417Const TPM_LEFTALIGN = &H0000
1418Const TPM_CENTERALIGN = &H0004
1419Const TPM_RIGHTALIGN = &H0008
1420Const TPM_TOPALIGN = &H0000
1421Const TPM_VCENTERALIGN = &H0010
1422Const TPM_BOTTOMALIGN = &H0020
1423Const TPM_HORIZONTAL = &H0000
1424Const TPM_VERTICAL = &H0040
1425Const TPM_NONOTIFY = &H0080
1426Const TPM_RETURNCMD = &H0100
1427Const TPM_RECURSE = &H0001
1428Declare 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
1429
1430declare function UnhookWindowsHookEx lib "user32" (ByVal hhk As HHOOK) As BOOL
1431Declare Function UnregisterClass Lib "user32" Alias _FuncName_UnregisterClass (pClassName As PCTSTR, hinst As HINSTANCE) As BOOL
1432Declare Function UnregisterHotKey Lib "user32" (hwnd As HWND, id As Long) As BOOL
1433Declare Function UpdateWindow Lib "user32" (hWnd As HWND) As BOOL
1434Declare Function ValidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
1435Declare Function ValidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As BOOL
1436Declare Function WaitForInputIdle Lib "user32" (hProcess As HANDLE, dwMilliseconds As DWord) As DWord
1437
1438Declare Function WaitMessage Lib "user32" () As BOOL
1439Declare Function WindowFromDC Lib "user32" (hDC As HDC) As HWND
1440Declare Function WindowFromPoint Lib "user32" (ptX As Long, ptY As Long) As HWND
1441Declare Function wsprintf cdecl Lib "user32" Alias _FuncName_wsprintf (pText As PTSTR, pFormat As PCTSTR, ...) As Long
1442Declare Function wvsprintf Lib "user32" Alias _FuncName_wvsprintf (pOutput As PTSTR, pFormat As PCTSTR, arglist As DWordPtr) As Long
1443
1444
1445#endif '_INC_WINDOW
Note: See TracBrowser for help on using the repository browser.