source: branch/egtra-gdiplus/api_window.sbp@ 644

Last change on this file since 644 was 179, checked in by dai, 18 years ago

_SystemEnd関数を追加(コンパイラが内部的に使います)。
WCHAR、Charをbasic.sbpで定義した。
LONGLONG、LONG、DWORD、WORD、BYTEなどのTypeDefを有効にした(#92に関連する変更)。
その他タイプミスを修正。

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