source: Include/api_window.sbp@ 137

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

#55#73#75とりあえず完了

File size: 50.2 KB
Line 
1' api_window.sbp - Window Control API
2
3
4#ifndef _INC_WINDOW
5#define _INC_WINDOW
6
7#ifdef UNICODE
8Const _FuncName_CreateWindowEx = "CreateWindowExW"
9Const _FuncName_RegisterClassEx = "RegisterClassExW"
10#else
11Const _FuncName_CreateWindowEx = "CreateWindowExA"
12Const _FuncName_RegisterClassEx = "RegisterClassExA"
13#endif
14
15Const CREATEPROCESS_MANIFEST_RESOURCE_ID = 1
16
17
18Type MSG
19 hwnd As HWND
20 message As DWord
21 wParam As WPARAM
22 lParam As LPARAM
23 time As DWord
24 pt As POINTAPI
25End Type
26
27
28Const MAKEINTRESOURCE(i) = i As PCSTR
29
30TypeDef WNDENUMPROC = *Function(ByVal hwnd As HWND, ByVal lParam As LPARAM) As BOOL
31
32Const CS_VREDRAW = &H0001
33Const CS_HREDRAW = &H0002
34Const CS_DBLCLKS = &H0008
35Const CS_OWNDC = &H0020
36Const CS_CLASSDC = &H0040
37Const CS_PARENTDC = &H0080
38Const CS_NOCLOSE = &H0200
39Const CS_SAVEBITS = &H0800
40Const CS_BYTEALIGNCLIENT = &H1000
41Const CS_BYTEALIGNWINDOW = &H2000
42Const CS_GLOBALCLASS = &H4000
43Type WNDCLASSEXA
44 cbSize As DWord
45 style As DWord
46 lpfnWndProc As WNDPROC
47 cbClsExtra As Long
48 cbWndExtra As Long
49 hInstance As HINSTANCE
50 hIcon As HICON
51 hCursor As HCURSOR
52 hbrBackground As HBRUSH
53 lpszMenuName As LPCSTR
54 lpszClassName As LPCSTR
55 hIconSm As HICON
56End Type
57Type WNDCLASSEXW
58 cbSize As DWord
59 style As DWord
60 lpfnWndProc As WNDPROC
61 cbClsExtra As Long
62 cbWndExtra As Long
63 hInstance As HINSTANCE
64 hIcon As HICON
65 hCursor As HCURSOR
66 hbrBackground As HBRUSH
67 lpszMenuName As LPCWSTR
68 lpszClassName As LPCWSTR
69 hIconSm As HICON
70End Type
71#ifdef UNICODE
72TypeDef WNDCLASSEX = WNDCLASSEXW
73#else
74TypeDef WNDCLASSEX = WNDCLASSEXA
75#endif
76
77'------------------------
78' Dialog Box Command IDs
79Const IDOK = 1
80Const IDCANCEL = 2
81Const IDABORT = 3
82Const IDRETRY = 4
83Const IDIGNORE = 5
84Const IDYES = 6
85Const IDNO = 7
86Const IDCLOSE = 8
87Const IDHELP = 9
88
89
90'------------------------
91' Menu flags and structs
92Const MF_INSERT = &H00000000
93Const MF_CHANGE = &H00000080
94Const MF_APPEND = &H00000100
95Const MF_DELETE = &H00000200
96Const MF_REMOVE = &H00001000
97Const MF_BYCOMMAND = &H00000000
98Const MF_BYPOSITION = &H00000400
99Const MF_SEPARATOR = &H00000800
100Const MF_ENABLED = &H00000000
101Const MF_GRAYED = &H00000001
102Const MF_DISABLED = &H00000002
103Const MF_UNCHECKED = &H00000000
104Const MF_CHECKED = &H00000008
105Const MF_USECHECKBITMAPS = &H00000200
106Const MF_STRING = &H00000000
107Const MF_BITMAP = &H00000004
108Const MF_OWNERDRAW = &H00000100
109Const MF_POPUP = &H00000010
110Const MF_MENUBARBREAK = &H00000020
111Const MF_MENUBREAK = &H00000040
112Const MF_UNHILITE = &H00000000
113Const MF_HILITE = &H00000080
114Const MF_DEFAULT = &H00001000
115Const MF_SYSMENU = &H00002000
116Const MF_HELP = &H00004000
117Const MF_RIGHTJUSTIFY = &H00004000
118Const MF_MOUSESELECT = &H00008000
119
120Const MFS_GRAYED = &H00000003
121Const MFS_DISABLED = MFS_GRAYED
122Const MFS_CHECKED = MF_CHECKED
123Const MFS_HILITE = MF_HILITE
124Const MFS_ENABLED = MF_ENABLED
125Const MFS_UNCHECKED = MF_UNCHECKED
126Const MFS_UNHILITE = MF_UNHILITE
127Const MFS_DEFAULT = MF_DEFAULT
128Const MFS_MASK = &H0000108B
129Const MFS_HOTTRACKDRAWN = &H10000000
130Const MFS_CACHEDBMP = &H20000000
131Const MFS_BOTTOMGAPDROP = &H40000000
132Const MFS_TOPGAPDROP = &H80000000
133Const MFS_GAPDROP = &HC0000000
134
135Const MIIM_STATE = &H00000001
136Const MIIM_ID = &H00000002
137Const MIIM_SUBMENU = &H00000004
138Const MIIM_CHECKMARKS = &H00000008
139Const MIIM_TYPE = &H00000010
140Const MIIM_DATA = &H00000020
141Const MIIM_STRING = &H00000040
142Const MIIM_BITMAP = &H00000080
143Const MIIM_FTYPE = &H00000100
144Const MFT_STRING = MF_STRING
145Const MFT_BITMAP = MF_BITMAP
146Const MFT_MENUBARBREAK = MF_MENUBARBREAK
147Const MFT_MENUBREAK = MF_MENUBREAK
148Const MFT_OWNERDRAW = MF_OWNERDRAW
149Const MFT_RADIOCHECK = &H00000200
150Const MFT_SEPARATOR = MF_SEPARATOR
151Const MFT_RIGHTORDER = &H00002000
152Const MFT_RIGHTJUSTIFY = MF_RIGHTJUSTIFY
153
154Type MENUITEMINFO
155 cbSize As DWord
156 fMask As DWord
157 fType As DWord
158 fState As DWord
159 wID As DWord
160 hSubMenu As HMENU
161 hbmpChecked As HBITMAP
162 hbmpUnchecked As HBITMAP
163 dwItemData As ULONG_PTR
164 dwTypeData As LPSTR
165 cch As DWord
166End Type
167
168
169'------------
170' Scroll Bar
171Const SB_HORZ = 0
172Const SB_VERT = 1
173Const SB_CTL = 2
174Const SB_BOTH = 3
175
176' SCROLLINFO struct
177Const SIF_RANGE = &H0001
178Const SIF_PAGE = &H0002
179Const SIF_POS = &H0004
180Const SIF_DISABLENOSCROLL = &H0008
181Const SIF_TRACKPOS = &H0010
182Const SIF_ALL = SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS
183Type SCROLLINFO
184 cbSize As DWord
185 fMask As DWord
186 nMin As Long
187 nMax As Long
188 nPage As DWord
189 nPos As Long
190 nTrackPos As Long
191End Type
192
193
194' combo box
195Const CB_ERR = -1
196Const CB_ERRSPACE = -2
197
198
199' Clipboard Formats
200Const CF_TEXT = 1
201Const CF_BITMAP = 2
202Const CF_METAFILEPICT = 3
203Const CF_SYLK = 4
204Const CF_DIF = 5
205Const CF_TIFF = 6
206Const CF_OEMTEXT = 7
207Const CF_DIB = 8
208Const CF_PALETTE = 9
209Const CF_PENDATA = 10
210Const CF_RIFF = 11
211Const CF_WAVE = 12
212Const CF_UNICODETEXT = 13
213Const CF_ENHMETAFILE = 14
214Const CF_HDROP = 15
215Const CF_LOCALE = 16
216Const CF_MAX = 17
217Const CF_OWNERDISPLAY = &H0080
218Const CF_DSPTEXT = &H0081
219Const CF_DSPBITMAP = &H0082
220Const CF_DSPMETAFILEPICT = &H0083
221Const CF_DSPENHMETAFILE = &H008E
222Const CF_PRIVATEFIRST = &H0200
223Const CF_PRIVATELAST = &H02FF
224Const CF_GDIOBJFIRST = &H0300
225Const CF_GDIOBJLAST = &H03FF
226
227'-------------
228' Window API Function Names
229
230/*
231CreateWindowEx
232CallWindowProc
233DefWindowProc
234DispatchMessage
235DrawText
236DrawTextEx
237FindWindow
238FindWindowEx
239GetClassInfoEx
240GetClassLong
241GetClassLongPtr
242GetClassName
243GetClipboardFormatName
244GetDlgItemText
245GetMenuItemInfo
246GetMessage
247GetWindowLong
248GetWindowLongPtr
249GetWindowText
250GetWindowTextLength
251InsertMenuItem
252IsCharAlpha
253IsCharAlphaNumeric
254IsDialogMessage
255LoadBitmap
256LoadCursor
257LoadCursorFromFile
258LoadIcon
259LoadImage
260PeekMessage
261PostMessage
262PostThreadMessage
263RegisterClassEx
264RegisterClipboardFormat
265RegisterWindowMessage
266RemoveProp
267SendDlgItemMessage
268SendMessage
269SendNotifyMessage
270SetDlgItemText
271SetClassLong
272SetClassLong
273SetMenuItemInfo
274SetWindowLong
275SetWindowLongPtr
276SetWindowText
277SystemParametersInfo
278UnregisterClass
279wsprintf
280wvsprintf
281*/
282
283'-------------
284' Window API
285
286Declare Function AdjustWindowRect Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL) As BOOL
287Declare Function AdjustWindowRectEx Lib "user32" (ByRef Rect As RECT, dwStyle As DWord, bMenu As BOOL, dwExStyle As DWord) As BOOL
288Declare Function AnyPopup Lib "user32" () As BOOL
289Declare Function ArrangeIconicWindows Lib "user32" (hWnd As HWND) As DWord
290
291Type PAINTSTRUCT
292 hdc As HDC
293 fErase As BOOL
294 rcPaint As RECT
295 fRestore As BOOL
296 fIncUpdate As BOOL
297 rgbReserved(31) As Byte
298End Type
299Declare Function BeginPaint Lib "user32" (hWnd As HWND, ByRef Paint As PAINTSTRUCT) As HDC
300
301Declare Function BringWindowToTop Lib "user32" (hWnd As HWND) As Long
302Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (lpPrevWndFunc As WNDPROC, hWnd As HWND, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
303Declare Function CharLower Lib "user32" Alias "CharLowerA" (lpsz As BytePtr) As DWord
304Declare Function CharUpper Lib "user32" Alias "CharUpperA" (lpsz As BytePtr) As DWord
305Declare Function CheckMenuItem Lib "user32" (hMenu As HMENU, uIDCheckItem As DWord, uCheck As DWord) As DWord
306Declare Function CheckMenuRadioItem Lib "user32" (hMenu As HMENU, idFirst As DWord, idLast As DWord, idCheck As DWord, uFlags As DWord) As BOOL
307Declare Function ChildWindowFromPoint Lib "user32" (hWndParent As HWND, x As Long, y As Long) As HWND
308
309Const CWP_ALL = &H0000
310Const CWP_SKIPINVISIBLE = &H0001
311Const CWP_SKIPDISABLED = &H0002
312Const CWP_SKIPTRANSPARENT = &H0004
313Declare Function ChildWindowFromPointEx Lib "user32" (hWndParent As HWND, x As Long, y As Long, uFlags As DWord) As HWND
314
315Declare Function ClientToScreen Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
316Declare Function ClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
317Declare Function CloseClipboard Lib "user32" () As BOOL
318Declare Function CloseWindow Lib "user32" (hWnd As HWND) As BOOL
319Declare Function CopyImage Lib "user32" (hImage As HANDLE, uType As DWord, cxDesired As Long, cyDesired As Long, fuFlags As DWord) As HANDLE
320Declare Function CountClipboardFormats Lib "user32" () As Long
321Declare Function CreateCaret Lib "user32" (hWnd As HWND, hBitmap As HBITMAP, nWidth As Long, nHeight As Long) As BOOL
322Declare 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
323Declare 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
324
325Type ICONINFO
326 fIcon As BOOL
327 xHotspot As DWord
328 yHotspot As DWord
329 hbmMask As HBITMAP
330 hbmColor As HBITMAP
331End Type
332Declare Function CreateIconIndirect Lib "user32" (ByRef pIconInfo As ICONINFO) As HICON
333
334Declare Function CreateMenu Lib "user32" () As HMENU
335Declare Function CreatePopupMenu Lib "user32" () As HMENU
336
337Const CW_USEDEFAULT = &H80000000
338Declare 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
339
340Declare Function DefWindowProc Lib "user32" Alias "DefWindowProcA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
341Declare Function DeleteMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
342Declare Function DestroyCaret Lib "user32" () As BOOL
343Declare Function DestroyCursor Lib "user32" (hCursor As HCURSOR) As BOOL
344Declare Function DestroyIcon Lib "user32" (hIcon As HICON) As BOOL
345Declare Function DestroyMenu Lib "user32" (hMenu As HMENU) As BOOL
346Declare Function DestroyWindow Lib "user32" (hWnd As HWND) As BOOL
347Declare Function DispatchMessage Lib "user32" Alias "DispatchMessageA" (ByRef lpMsg As MSG) As LRESULT
348
349Const BDR_RAISEDOUTER = &H0001
350Const BDR_SUNKENOUTER = &H0002
351Const BDR_RAISEDINNER = &H0004
352Const BDR_SUNKENINNER = &H0008
353Const BDR_OUTER = &H0003
354Const BDR_INNER = &H000c
355Const EDGE_RAISED = BDR_RAISEDOUTER or BDR_RAISEDINNER
356Const EDGE_SUNKEN = BDR_SUNKENOUTER or BDR_SUNKENINNER
357Const EDGE_ETCHED = BDR_SUNKENOUTER or BDR_RAISEDINNER
358Const EDGE_BUMP = BDR_RAISEDOUTER or BDR_SUNKENINNER
359Const BF_LEFT = &H0001
360Const BF_TOP = &H0002
361Const BF_RIGHT = &H0004
362Const BF_BOTTOM = &H0008
363Const BF_TOPLEFT = BF_TOP or BF_LEFT
364Const BF_TOPRIGHT = BF_TOP or BF_RIGHT
365Const BF_BOTTOMLEFT = BF_BOTTOM or BF_LEFT
366Const BF_BOTTOMRIGHT = BF_BOTTOM or BF_RIGHT
367Const BF_RECT = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM
368Const BF_DIAGONAL = &H0010
369Const BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL or BF_TOP or BF_RIGHT
370Const BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL or BF_TOP or BF_LEFT
371Const BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL or BF_BOTTOM or BF_LEFT
372Const BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT
373Const BF_MIDDLE = &H0800
374Const BF_SOFT = &H1000
375Const BF_ADJUST = &H2000
376Const BF_FLAT = &H4000
377Const BF_MONO = &H8000
378Declare Function DrawEdge Lib "user32" (hdc As HDC, ByRef lpRect As RECT, edge As DWord, grfFlags As DWord) As BOOL
379
380Const DFC_CAPTION = 1
381Const DFC_MENU = 2
382Const DFC_SCROLL = 3
383Const DFC_BUTTON = 4
384Const DFC_POPUPMENU = 5
385Const DFCS_CAPTIONCLOSE = &H0000
386Const DFCS_CAPTIONMIN = &H0001
387Const DFCS_CAPTIONMAX = &H0002
388Const DFCS_CAPTIONRESTORE = &H0003
389Const DFCS_CAPTIONHELP = &H0004
390Const DFCS_MENUARROW = &H0000
391Const DFCS_MENUCHECK = &H0001
392Const DFCS_MENUBULLET = &H0002
393Const DFCS_MENUARROWRIGHT = &H0004
394Const DFCS_SCROLLUP = &H0000
395Const DFCS_SCROLLDOWN = &H0001
396Const DFCS_SCROLLLEFT = &H0002
397Const DFCS_SCROLLRIGHT = &H0003
398Const DFCS_SCROLLCOMBOBOX = &H0005
399Const DFCS_SCROLLSIZEGRIP = &H0008
400Const DFCS_SCROLLSIZEGRIPRIGHT = &H0010
401Const DFCS_BUTTONCHECK = &H0000
402Const DFCS_BUTTONRADIOIMAGE = &H0001
403Const DFCS_BUTTONRADIOMASK = &H0002
404Const DFCS_BUTTONRADIO = &H0004
405Const DFCS_BUTTON3STATE = &H0008
406Const DFCS_BUTTONPUSH = &H0010
407Const DFCS_INACTIVE = &H0100
408Const DFCS_PUSHED = &H0200
409Const DFCS_CHECKED = &H0400
410Const DFCS_TRANSPARENT = &H0800
411Const DFCS_HOT = &H1000
412Const DFCS_ADJUSTRECT = &H2000
413Const DFCS_FLAT = &H4000
414Const DFCS_MONO = &H8000
415Declare Function DrawFrameControl Lib "user32" (hdc As HDC, ByRef lpRect As RECT, uType As DWord, uState As DWord) As BOOL
416
417Declare Function DrawIcon Lib "user32" (hdc As HDC, x As Long, y As Long, hIcon As HICON) As BOOL
418
419Const DI_MASK = &H0001
420Const DI_IMAGE = &H0002
421Const DI_NORMAL = &H0003
422Const DI_COMPAT = &H0004
423Const DI_DEFAULTSIZE = &H0008
424Declare 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
425
426Declare Function DrawMenuBar Lib "user32" (hwnd As HWND) As BOOL
427
428Const DT_TOP = &H00000000
429Const DT_LEFT = &H00000000
430Const DT_CENTER = &H00000001
431Const DT_RIGHT = &H00000002
432Const DT_VCENTER = &H00000004
433Const DT_BOTTOM = &H00000008
434Const DT_WORDBREAK = &H00000010
435Const DT_SINGLELINE = &H00000020
436Const DT_EXPANDTABS = &H00000040
437Const DT_TABSTOP = &H00000080
438Const DT_NOCLIP = &H00000100
439Const DT_EXTERNALLEADING =&H00000200
440Const DT_CALCRECT = &H00000400
441Const DT_NOPREFIX = &H00000800
442Const DT_INTERNAL = &H00001000
443Const DT_EDITCONTROL = &H00002000
444Const DT_PATH_ELLIPSIS = &H00004000
445Const DT_END_ELLIPSIS = &H00008000
446Const DT_MODIFYSTRING = &H00010000
447Const DT_RTLREADING = &H00020000
448Const DT_WORD_ELLIPSIS = &H00040000
449Declare Function DrawText Lib "user32" Alias "DrawTextA" (hdc As HDC, lpStr As PCSTR, nCount As Long, ByRef lpRect As RECT, dwFormat As DWord) As BOOL
450
451Type DRAWTEXTPARAMS
452 cbSize As DWord
453 iTabLength As Long
454 iLeftMargin As Long
455 iRightMargin As Long
456 uiLengthDrawn As DWord
457End Type
458Declare Function DrawTextEx Lib "user32" Alias "DrawTextExA" (hdc As HDC, lpchText As PCSTR, cchText As Long, ByRef lpRect As RECT, dwDTFormat As DWord, ByRef lpDTParams As DRAWTEXTPARAMS) As BOOL
459
460Declare Function EmptyClipboard Lib "user32" () As BOOL
461Declare Function EnableMenuItem Lib "user32" (hMenu As HMENU, uIDEnableItem As DWord, uEnable As DWord) As BOOL
462
463Const ESB_ENABLE_BOTH = &H0000
464Const ESB_DISABLE_BOTH = &H0003
465Const ESB_DISABLE_LEFT = &H0001
466Const ESB_DISABLE_RIGHT = &H0002
467Const ESB_DISABLE_UP = &H0001
468Const ESB_DISABLE_DOWN = &H0002
469Const ESB_DISABLE_LTUP = ESB_DISABLE_LEFT
470Const ESB_DISABLE_RTDN = ESB_DISABLE_RIGHT
471Declare Function EnableScrollBar Lib "user32" (hWnd As HWND, dwSBflags As DWord, dwArrows As DWord) As BOOL
472
473Declare Function EnableWindow Lib "user32" (hWnd As HWND, bEnable As BOOL) As BOOL
474Declare Function EndPaint Lib "user32" (hWnd As HWND, ByRef lpPaint As PAINTSTRUCT) As BOOL
475Declare Function EnumClipboardFormats Lib "user32" (uFormat As DWord) As DWord
476Declare Function EnumChildWindows Lib "user32" (hwndParent As HWND, pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
477Declare Function EnumThreadWindows Lib "user32" (dwThreadId As DWord, pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
478Declare Function EnumWindows Lib "user32" (pEnumFunc As WNDENUMPROC, lParam As LPARAM) As BOOL
479Declare Function FillRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As BOOL
480Declare Function FindWindow Lib "user32" Alias "FindWindowA" (lpClassName As PCSTR, lpWindowName As PCSTR) As HWND
481Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (hwndParent As HWND, hwndChildAfter As HWND, pszClass As PCSTR, pszWindow As PCSTR) As HWND
482Declare Function FlashWindow Lib "user32" (hWnd As HWND, bInvert As BOOL) As BOOL
483Declare Function FrameRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT, hBrush As HBRUSH) As Long
484Declare Function GetActiveWindow Lib "user32" () As HWND
485Declare Function GetAsyncKeyState Lib "user32" (vKey As Long) As Integer
486Declare Function GetCapture Lib "user32" () As HWND
487Declare Function GetCaretPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
488Declare Function GetClassInfoEx Lib "user32" Alias "GetClassInfoExA" (hInst As HINSTANCE, lpszClass As PCSTR, ByRef lpwcx As WNDCLASSEX) As BOOL
489
490Const GCL_MENUNAME = -8
491Const GCL_HBRBACKGROUND = -10
492Const GCL_HCURSOR = -12
493Const GCL_HICON = -14
494Const GCL_HMODULE = -16
495Const GCL_CBWNDEXTRA = -18
496Const GCL_CBCLSEXTRA = -20
497Const GCL_WNDPROC = -24
498Const GCL_STYLE = -26
499Const GCW_ATOM = -32
500Const GCL_HICONSM = -34
501#ifdef _WIN64
502Declare Function GetClassLong Lib "user32" Alias "GetClassLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
503Declare Function GetClassLongPtr Lib "user32" Alias "GetClassLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
504#else
505Declare Function GetClassLong Lib "user32" Alias "GetClassLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
506Declare Function GetClassLongPtr Lib "user32" Alias "GetClassLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
507#endif
508
509Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (hWnd As HWND, lpClassName As PSTR, nMaxCount As Long) As Long
510Declare Function GetClientRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
511Declare Function GetClipboardData Lib "user32" (uFormat As DWord) As HANDLE
512Declare Function GetClipboardFormatName Lib "user32" Alias "GetClipboardFormatNameA" (uFormat As DWord, lpszFormatName As BytePtr, cchMaxCount As Long) As BOOL
513Declare Function GetClipCursor Lib "user32" (ByRef lpRect As RECT) As BOOL
514Declare Function GetCursor Lib "user32" () As HCURSOR
515Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As BOOL
516Declare Function GetDC Lib "user32" (hWnd As HWND) As HDC
517
518Const DCX_WINDOW = &H00000001
519Const DCX_CACHE = &H00000002
520Const DCX_NORESETATTRS = &H00000004
521Const DCX_CLIPCHILDREN = &H00000008
522Const DCX_CLIPSIBLINGS = &H00000010
523Const DCX_PARENTCLIP = &H00000020
524Const DCX_EXCLUDERGN = &H00000040
525Const DCX_INTERSECTRGN = &H00000080
526Const DCX_EXCLUDEUPDATE = &H00000100
527Const DCX_INTERSECTUPDATE = &H00000200
528Const DCX_LOCKWINDOWUPDATE = &H00000400
529Const DCX_VALIDATE = &H00200000
530Declare Function GetDCEx Lib "user32" (hWnd As HWND, hrgnClip As HRGN, dwFlags As DWord) As HDC
531
532Declare Function GetDesktopWindow Lib "user32" () As HWND
533Declare Function GetDlgCtrlID Lib "user32" (hWnd As HWND) As Long
534Declare Function GetDlgItem Lib "user32" (hDlg As HWND, nIDDlgItem As Long) As HWND
535Declare Function GetDlgItemText Lib "user32" Alias "GetDlgItemTextA" (hDlg As HWND, nIDDlgItem As Long, lpString As PSTR, nMaxCount As Long) As Long
536Declare Function GetDoubleClickTime Lib "user32" () As DWord
537Declare Function GetFocus Lib "user32" () As HWND
538Declare Function GetForegroundWindow Lib "user32" () As HWND
539Declare Function GetIconInfo Lib "user32" (hIcon As HICON, ByRef pIconInfo As ICONINFO) As Long
540Declare Function GetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
541Declare Function GetKeyState Lib "user32" (nVirtKey As Long) As Integer
542Declare Function GetMenu Lib "user32" (hWnd As HWND) As HMENU
543
544Declare Function GetMenuContextHelpId Lib "user32" (hmenu As HMENU) As DWord
545Const GMDI_USEDISABLED = &H0001
546Const GMDI_GOINTOPOPUPS = &H0002
547Declare Function GetMenuDefaultItem Lib "user32" (hMenu As HMENU, fByPos As DWord, gmdiFlags As DWord) As DWord
548
549Declare Function GetMenuItemID Lib "user32" (hMenu As HMENU, nPos As Long) As DWord
550Declare Function GetMenuItemCount Lib "user32" (hMenu As HMENU) As Long
551Declare Function GetMenuItemInfo Lib "user32" Alias "GetMenuItemInfoA" (hMenu As HMENU, uItem As DWord, fByPosition As DWord, ByRef lpmii As MENUITEMINFO) As BOOL
552Declare Function GetMessage Lib "user32" Alias "GetMessageA" (ByRef lpMsg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord) As Long
553Declare Function GetParent Lib "user32" (hWnd As HWND) As HWND
554Declare Function GetProp Lib "user32" Alias "GetPropA" (hWnd As HWND, pString As PCSTR) As HANDLE
555Declare Function GetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO) As BOOL
556Declare Function GetSubMenu Lib "user32" (hMenu As HMENU, nPos As Long) As HMENU
557
558Const COLOR_SCROLLBAR = 0
559Const COLOR_BACKGROUND = 1
560Const COLOR_ACTIVECAPTION = 2
561Const COLOR_INACTIVECAPTION = 3
562Const COLOR_MENU = 4
563Const COLOR_WINDOW = 5
564Const COLOR_WINDOWFRAME = 6
565Const COLOR_MENUTEXT = 7
566Const COLOR_WINDOWTEXT = 8
567Const COLOR_CAPTIONTEXT = 9
568Const COLOR_ACTIVEBORDER = 10
569Const COLOR_INACTIVEBORDER = 11
570Const COLOR_APPWORKSPACE = 12
571Const COLOR_HIGHLIGHT = 13
572Const COLOR_HIGHLIGHTTEXT = 14
573Const COLOR_BTNFACE = 15
574Const COLOR_BTNSHADOW = 16
575Const COLOR_GRAYTEXT = 17
576Const COLOR_BTNTEXT = 18
577Const COLOR_INACTIVECAPTIONTEXT = 19
578Const COLOR_BTNHIGHLIGHT = 20
579Const COLOR_3DDKSHADOW = 21
580Const COLOR_3DLIGHT = 22
581Const COLOR_INFOTEXT = 23
582Const COLOR_INFOBK = 24
583Const COLOR_HOTLIGHT = 26
584Const COLOR_GRADIENTACTIVECAPTION = 27
585Const COLOR_GRADIENTINACTIVECAPTION = 28
586Const COLOR_DESKTOP = COLOR_BACKGROUND
587Const COLOR_3DFACE = COLOR_BTNFACE
588Const COLOR_3DSHADOW = COLOR_BTNSHADOW
589Const COLOR_3DHIGHLIGHT = COLOR_BTNHIGHLIGHT
590Const COLOR_3DHILIGHT = COLOR_BTNHIGHLIGHT
591Const COLOR_BTNHILIGHT = COLOR_BTNHIGHLIGHT
592Declare Function GetSysColor Lib "user32" (nIndex As Long) As DWord
593Declare Function GetSysColorBrush Lib "user32" (nIndex As Long) As HBRUSH
594
595Declare Function GetSystemMenu Lib "user32" (hWnd As HWND, bRevert As BOOL) As HMENU
596
597Const SM_CXSCREEN = 0
598Const SM_CYSCREEN = 1
599Const SM_CXVSCROLL = 2
600Const SM_CYHSCROLL = 3
601Const SM_CYCAPTION = 4
602Const SM_CXBORDER = 5
603Const SM_CYBORDER = 6
604Const SM_CXDLGFRAME = 7
605Const SM_CYDLGFRAME = 8
606Const SM_CYVTHUMB = 9
607Const SM_CXHTHUMB = 10
608Const SM_CXICON = 11
609Const SM_CYICON = 12
610Const SM_CXCURSOR = 13
611Const SM_CYCURSOR = 14
612Const SM_CYMENU = 15
613Const SM_CXFULLSCREEN = 16
614Const SM_CYFULLSCREEN = 17
615Const SM_CYKANJIWINDOW = 18
616Const SM_MOUSEPRESENT = 19
617Const SM_CYVSCROLL = 20
618Const SM_CXHSCROLL = 21
619Const SM_DEBUG = 22
620Const SM_SWAPBUTTON = 23
621Const SM_RESERVED1 = 24
622Const SM_RESERVED2 = 25
623Const SM_RESERVED3 = 26
624Const SM_RESERVED4 = 27
625Const SM_CXMIN = 28
626Const SM_CYMIN = 29
627Const SM_CXSIZE = 30
628Const SM_CYSIZE = 31
629Const SM_CXFRAME = 32
630Const SM_CYFRAME = 33
631Const SM_CXMINTRACK = 34
632Const SM_CYMINTRACK = 35
633Const SM_CXDOUBLECLK = 36
634Const SM_CYDOUBLECLK = 37
635Const SM_CXICONSPACING = 38
636Const SM_CYICONSPACING = 39
637Const SM_MENUDROPALIGNMENT = 40
638Const SM_PENWINDOWS = 41
639Const SM_DBCSENABLED = 42
640Const SM_CMOUSEBUTTONS = 43
641Const SM_CXFIXEDFRAME = SM_CXDLGFRAME
642Const SM_CYFIXEDFRAME = SM_CYDLGFRAME
643Const SM_CXSIZEFRAME = SM_CXFRAME
644Const SM_CYSIZEFRAME = SM_CYFRAME
645Const SM_SECURE = 44
646Const SM_CXEDGE = 45
647Const SM_CYEDGE = 46
648Const SM_CXMINSPACING = 47
649Const SM_CYMINSPACING = 48
650Const SM_CXSMICON = 49
651Const SM_CYSMICON = 50
652Const SM_CYSMCAPTION = 51
653Const SM_CXSMSIZE = 52
654Const SM_CYSMSIZE = 53
655Const SM_CXMENUSIZE = 54
656Const SM_CYMENUSIZE = 55
657Const SM_ARRANGE = 56
658Const SM_CXMINIMIZED = 57
659Const SM_CYMINIMIZED = 58
660Const SM_CXMAXTRACK = 59
661Const SM_CYMAXTRACK = 60
662Const SM_CXMAXIMIZED = 61
663Const SM_CYMAXIMIZED = 62
664Const SM_NETWORK = 63
665Const SM_CLEANBOOT = 67
666Const SM_CXDRAG = 68
667Const SM_CYDRAG = 69
668Const SM_SHOWSOUNDS = 70
669Const SM_CXMENUCHECK = 71
670Const SM_CYMENUCHECK = 72
671Const SM_SLOWMACHINE = 73
672Const SM_MIDEASTENABLED = 74
673Const SM_MOUSEWHEELPRESENT = 75
674Declare Function GetSystemMetrics Lib "user32" (nIndex As Long) As Long
675
676Declare Function GetUpdateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT, bErase As BOOL) As BOOL
677Declare Function GetUpdateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
678
679Const GW_HWNDFIRST = 0
680Const GW_HWNDLAST = 1
681Const GW_HWNDNEXT = 2
682Const GW_HWNDPREV = 3
683Const GW_OWNER = 4
684Const GW_CHILD = 5
685Declare Function GetWindow Lib "user32" (hWnd As HWND, uCmd As DWord) As HWND
686
687Declare Function GetWindowContextHelpId Lib "user32" (hwnd As HWND) As DWord
688
689Declare Function GetWindowDC Lib "user32" (hWnd As HWND) As HDC
690
691#ifndef _WIN64
692Const GWL_WNDPROC = -4
693Const GWL_HINSTANCE = -6
694Const GWL_HWNDPARENT = -8
695Const GWL_USERDATA = -21
696Const GWL_ID = -12
697#endif
698
699Const GWL_STYLE = -16
700Const GWL_EXSTYLE = -20
701
702Const GWLP_WNDPROC = -4
703Const GWLP_HINSTANCE = -6
704Const GWLP_HWNDPARENT = -8
705Const GWLP_USERDATA = -21
706Const GWLP_ID = -12
707
708
709#ifdef _WIN64
710Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
711Declare Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongPtrA" (hWnd As HWND, nIndex As Long) As LONG_PTR
712#else
713Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
714Declare Function GetWindowLongPtr Lib "user32" Alias "GetWindowLongA" (hWnd As HWND, nIndex As Long) As LONG_PTR
715#endif
716
717Const WPF_SETMINPOSITION = &H0001
718Const WPF_RESTORETOMAXIMIZED = &H0002
719Type WINDOWPLACEMENT
720 length As DWord
721 flags As DWord
722 showCmd As DWord
723 ptMinPosition As POINTAPI
724 ptMaxPosition As POINTAPI
725 rcNormalPosition As RECT
726End Type
727Declare Function GetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
728
729Declare Function GetWindowRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
730Declare Function GetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As Long
731Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (hWnd As HWND, lpString As PSTR, nMaxCount As Long) As Long
732Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (hWnd As HWND) As Long
733Declare Function GetWindowThreadProcessId Lib "user32" (hWnd As HWND, lpdwProcessId As DWordPtr) As DWord
734Declare Function HideCaret Lib "user32" (hWnd As HWND) As BOOL
735Declare Function InsertMenuItem Lib "user32" Alias "InsertMenuItemA" (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef lpmii As MENUITEMINFO) As BOOL
736Declare Function InvalidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT, bErase As BOOL) As BOOL
737Declare Function InvalidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bErase As BOOL) As BOOL
738Declare Function InvertRect Lib "user32" (hdc As HDC, ByRef lpRect As RECT) As BOOL
739Declare Function IsCharAlpha Lib "user32" Alias "IsCharAlphaA" (ch As Byte) As BOOL
740Declare Function IsCharAlphaNumeric Lib "user32" Alias "IsCharAlphaNumericA" (ch As Byte) As BOOL
741Declare Function IsCharLower Lib "user32" Alias "IsCharLowerA" (ch As Byte) As BOOL
742Declare Function IsCharUpper Lib "user32" Alias "IsCharUpperA" (ch As Byte) As BOOL
743Declare Function IsChild Lib "user32" (hWndParent As HWND, hWnd As HWND) As BOOL
744Declare Function IsDialogMessage Lib "user32" Alias "IsDialogMessageA" (hDlg As HWND, ByRef ref_msg As MSG) As BOOL
745Declare Function IsIconic Lib "user32" (hWnd As HWND) As BOOL
746Declare Function IsWindow Lib "user32" (hWnd As HWND) As BOOL
747Declare Function IsWindowEnabled Lib "user32" (hWnd As HWND) As BOOL
748Declare Function IsWindowUnicode Lib "user32" (hWnd As HWND) As BOOL
749Declare Function IsWindowVisible Lib "user32" (hWnd As HWND) As BOOL
750Declare Function IsZoomed Lib "user32" (hWnd As HWND) As BOOL
751
752Const KEYEVENTF_EXTENDEDKEY = &H0001
753Const KEYEVENTF_KEYUP = &H0002
754Declare Sub keybd_event Lib "user32" (bVk As Byte, bScan As Byte, dwFlags As DWord, dwExtraInfo As DWord)
755
756Declare Function KillTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR) As BOOL
757Declare Function LoadBitmap Lib "user32" Alias "LoadBitmapA" (hInst As HINSTANCE, lpBitmapName As PCSTR) As HBITMAP
758
759Const IDC_ARROW = 32512
760Const IDC_IBEAM = 32513
761Const IDC_WAIT = 32514
762Const IDC_CROSS = 32515
763Const IDC_UPARROW = 32516
764Const IDC_SIZE = 32640
765Const IDC_ICON = 32641
766Const IDC_SIZENWSE = 32642
767Const IDC_SIZENESW = 32643
768Const IDC_SIZEWE = 32644
769Const IDC_SIZENS = 32645
770Const IDC_SIZEALL = 32646
771Const IDC_NO = 32648
772Const IDC_HAND = 32649
773Const IDC_APPSTARTING = 32650
774Const IDC_HELP = 32651
775Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (hInst As HINSTANCE, lpCursorName As PCSTR) As HCURSOR
776
777Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (lpFileName As PCSTR) As HCURSOR
778
779Const IDI_APPLICATION = 32512
780Const IDI_HAND = 32513
781Const IDI_QUESTION = 32514
782Const IDI_EXCLAMATION = 32515
783Const IDI_ASTERISK = 32516
784Const IDI_WINLOGO = 32517
785Declare Function LoadIcon Lib "user32" Alias "LoadIconA" (hInst As HINSTANCE, lpIconName As PCSTR) As HICON
786
787Const IMAGE_BITMAP = 0
788Const IMAGE_ICON = 1
789Const IMAGE_CURSOR = 2
790Const IMAGE_ENHMETAFILE = 3
791Const LR_DEFAULTCOLOR = &H0000
792Const LR_MONOCHROME = &H0001
793Const LR_COLOR = &H0002
794Const LR_COPYRETURNORG = &H0004
795Const LR_COPYDELETEORG = &H0008
796Const LR_LOADFROMFILE = &H0010
797Const LR_LOADTRANSPARENT = &H0020
798Const LR_DEFAULTSIZE = &H0040
799Const LR_VGACOLOR = &H0080
800Const LR_LOADMAP3DCOLORS = &H1000
801Const LR_CREATEDIBSECTION = &H2000
802Const LR_COPYFROMRESOURCE = &H4000
803Const LR_SHARED = &H8000
804Declare Function LoadImage Lib "user32" Alias "LoadImageA" (hInst As HINSTANCE, lpszName As PCSTR, dwImageType As DWord, cxDesired As Long, cyDesired As Long, dwFlags As DWord) As HANDLE
805
806Declare Function LockWindowUpdate Lib "user32" (hWnd As HWND) As BOOL
807Declare Function MapWindowPoints Lib "user32" (
808 hWndFrom As HWND,
809 hWndTo As HWND,
810 pPoints As *POINTAPI,
811 cPoints As DWord) As Long
812Declare Function MessageBeep Lib "user32" (uType As DWord) As BOOL
813
814Const MB_OK = &H00000000
815Const MB_OKCANCEL = &H00000001
816Const MB_ABORTRETRYIGNORE = &H00000002
817Const MB_YESNOCANCEL = &H00000003
818Const MB_YESNO = &H00000004
819Const MB_RETRYCANCEL = &H00000005
820Const MB_ICONHAND = &H00000010
821Const MB_ICONQUESTION = &H00000020
822Const MB_ICONEXCLAMATION = &H00000030
823Const MB_ICONASTERISK = &H00000040
824Const MB_USERICON = &H00000080
825Const MB_ICONWARNING = MB_ICONEXCLAMATION
826Const MB_ICONERROR = MB_ICONHAND
827Const MB_ICONINFORMATION = MB_ICONASTERISK
828Const MB_ICONSTOP = MB_ICONHAND
829Const MB_DEFBUTTON1 = &H00000000
830Const MB_DEFBUTTON2 = &H00000100
831Const MB_DEFBUTTON3 = &H00000200
832Const MB_DEFBUTTON4 = &H00000300
833Const MB_APPLMODAL = &H00000000
834Const MB_SYSTEMMODAL = &H00001000
835Const MB_TASKMODAL = &H00002000
836Const MB_HELP = &H00004000
837Const MB_NOFOCUS = &H00008000
838Const MB_SETFOREGROUND = &H00010000
839Const MB_DEFAULT_DESKTOP_ONLY = &H00020000
840Const MB_TOPMOST = &H00040000
841Const MB_RIGHT = &H00080000
842Const MB_RTLREADING = &H00100000
843#ifdef UNICODE
844Declare Function MessageBox Lib "user32" Alias "MessageBoxW" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
845#else
846Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (hWnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
847#endif
848Declare Function MessageBoxW Lib "user32" (hWnd As HWND, pText As PCWSTR, pCaption As PCWSTR, uType As DWord) As Long
849Declare Function MessageBoxA Lib "user32" (hWnd As HWND, pText As PCSTR, pCaption As PCSTR, uType As DWord) As Long
850Const MOUSEEVENTF_MOVE = &H0001
851Const MOUSEEVENTF_LEFTDOWN = &H0002
852Const MOUSEEVENTF_LEFTUP = &H0004
853Const MOUSEEVENTF_RIGHTDOWN = &H0008
854Const MOUSEEVENTF_RIGHTUP = &H0010
855Const MOUSEEVENTF_MIDDLEDOWN = &H0020
856Const MOUSEEVENTF_MIDDLEUP = &H0040
857Const MOUSEEVENTF_WHEEL = &H0800
858Const MOUSEEVENTF_ABSOLUTE = &H8000
859Declare Sub mouse_event Lib "user32" (dwFlags As DWord, dx As DWord, dy As DWord, dwData As DWord, dwExtraInfo As DWord)
860
861Declare Function MoveWindow Lib "user32" (hWnd As HWND, x As Long, y As Long, nWidth As Long, nHight As Long, bRepaint As BOOL) As BOOL
862Declare Function OpenClipboard Lib "user32" (hWndNewOwner As HWND) As BOOL
863Declare Function OpenIcon Lib "user32" (hWnd As HWND) As BOOL
864
865Const PM_NOREMOVE = &H0000
866Const PM_REMOVE = &H0001
867Declare Function PeekMessage Lib "user32" Alias "PeekMessageA" (ByRef lpMsg As MSG, hWnd As HWND, wMsgFilterMin As DWord, wMsgFilterMax As DWord, wRemoveMsg As DWord) As BOOL
868
869Const HWND_BROADCAST = &HFFFF
870Declare Function PostMessage Lib "user32" Alias "PostMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
871
872Declare Sub PostQuitMessage Lib "user32" (nExitCode As Long)
873Declare Function PostThreadMessage Lib "user32" Alias "PostThreadMessageA" (idThread As DWord, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As BOOL
874
875Const RDW_INVALIDATE = &H0001
876Const RDW_INTERNALPAINT = &H0002
877Const RDW_ERASE = &H0004
878Const RDW_VALIDATE = &H0008
879Const RDW_NOINTERNALPAINT = &H0010
880Const RDW_NOERASE = &H0020
881Const RDW_NOCHILDREN = &H0040
882Const RDW_ALLCHILDREN = &H0080
883Const RDW_UPDATENOW = &H0100
884Const RDW_ERASENOW = &H0200
885Const RDW_FRAME = &H0400
886Const RDW_NOFRAME = &H0800
887Declare Function RedrawWindow Lib "user32" (hWnd As HWND, ByRef lprcUpdate As RECT, hrgnUpdate As HRGN, flags As DWord) As BOOL
888
889Declare Function RegisterClassEx Lib "user32" Alias _FuncName_RegisterClassEx (ByRef wcx As WNDCLASSEX) As ATOM
890Declare Function RegisterClipboardFormat Lib "user32" Alias "RegisterClipboardFormatA" (lpszFormat As PCSTR) As DWord
891Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (lpString As PCSTR) As DWord
892Declare Function ReleaseCapture Lib "user32" () As BOOL
893Declare Function ReleaseDC Lib "user32" (hWnd As HWND, hdc As HDC) As BOOL
894Declare Function RemoveMenu Lib "user32" (hMenu As HMENU, uPosition As DWord, uFlags As DWord) As BOOL
895Declare Function RemoveProp Lib "user32" Alias "RemovePropA" (hWnd As HWND, lpString As PCSTR) As HANDLE
896Declare Function TranslateMessage Lib "user32" (ByRef lpMsg As MSG) As Long
897Declare Function ScreenToClient Lib "user32" (hWnd As HWND, ByRef lpPoint As POINTAPI) As BOOL
898Declare 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
899
900Const SW_SCROLLCHILDREN = &H0001
901Const SW_INVALIDATE = &H0002
902Const SW_ERASE = &H0004
903Declare 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
904
905Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (hDlg As HWND, nIDDlgItem As Long, Msg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
906Declare Function SendMessage Lib "user32" Alias "SendMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
907Declare Function SendNotifyMessage Lib "user32" Alias "SendNotifyMessageA" (hWnd As HWND, wMsg As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT
908Declare Function SetActiveWindow Lib "user32" (hWnd As HWND) As HWND
909Declare Function SetDlgItemText Lib "user32" Alias "SetDlgItemTextA" (hDlg As HWND, nIDDlgItem As Long, lpString As PCSTR) As BOOL
910Declare Function SetCapture Lib "user32" (hWnd As HWND) As HWND
911Declare Function SetCaretPos Lib "user32" (x As Long, y As Long) As BOOL
912
913#ifdef _WIN64
914Declare Function SetClassLong Lib "user32" Alias "SetClassLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
915Declare Function SetClassLongPtr Lib "user32" Alias "SetClassLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
916#else
917Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
918Declare Function SetClassLongPtr Lib "user32" Alias "SetClassLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
919#endif
920
921Declare Function SetClipboardData Lib "user32" (uFormat As DWord, hMem As HANDLE) As HANDLE
922Declare Function SetCursor Lib "user32" (hCursor As HCURSOR) As HCURSOR
923Declare Function SetCursorPos Lib "user32" (x As Long, y As Long) As BOOL
924Declare Function SetDoubleClickTime Lib "user32" (uInterval As DWord) As BOOL
925Declare Function SetFocus Lib "user32" (hWnd As HWND) As HWND
926Declare Function SetForegroundWindow Lib "user32" (hWnd As HWND) As BOOL
927Declare Function SetKeyboardState Lib "user32" (lpKeyState As *Byte) As BOOL
928Declare Function SetMenu Lib "user32" (hWnd As HWND, hMenu As HMENU) As BOOL
929Declare Function SetMenuContextHelpId Lib "user32" (hmenu As HMENU, dwContextHelpId As DWord) As BOOL
930Declare Function SetMenuDefaultItem Lib "user32" (hMenu As HMENU, uItem As DWord, fByPos As DWord) As BOOL
931Declare Function SetMenuItemInfo Lib "user32" Alias "SetMenuItemInfoA" (hMenu As HMENU, uItem As DWord, fByPosition As BOOL, ByRef lpmii As MENUITEMINFO) As BOOL
932Declare Function SetParent Lib "user32" (hWndChild As HWND, hWndNewParent As HWND) As HWND
933Declare Function SetProp Lib "user32" Alias "SetPropA" (hWnd As HWND, pString As PCSTR, hData As HANDLE) As BOOL
934Declare Function SetScrollInfo Lib "user32" (hWnd As HWND, fnBar As Long, ByRef lpsi As SCROLLINFO, bRedraw As Long) As BOOL
935Declare Function SetSysColors Lib "user32" (cElements As Long, lpaElements As *DWord, lpaRgbValues As *DWord) As BOOL
936
937TypeDef TIMERPROC = *Sub(hwnd As HWND, msg As DWord, idEvent As ULONG_PTR, dwTime As DWord)
938Declare Function SetTimer Lib "user32" (hWnd As HWND, nIDEvent As ULONG_PTR, nElapse As DWord, lpTimerFunc As TIMERPROC) As ULONG_PTR
939
940Declare Function SetWindowContextHelpId Lib "user32"(hwnd As HWND, dwContextHelpId As DWord) As BOOL
941
942#ifdef _WIN64
943Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
944Declare Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongPtrA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
945#else
946Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
947Declare Function SetWindowLongPtr Lib "user32" Alias "SetWindowLongA" (hWnd As HWND, nIndex As Long, NewLong As LONG_PTR) As LONG_PTR
948#endif
949
950Declare Function SetWindowPlacement Lib "user32" (hWnd As HWND, ByRef lpwndpl As WINDOWPLACEMENT) As BOOL
951
952Const HWND_TOP = 0 As HWND
953Const HWND_BOTTOM = 1 As HWND
954Const HWND_TOPMOST = -1 As HWND
955Const HWND_NOTOPMOST = -2 As HWND
956Const SWP_NOSIZE = &H0001
957Const SWP_NOMOVE = &H0002
958Const SWP_NOZORDER = &H0004
959Const SWP_NOREDRAW = &H0008
960Const SWP_NOACTIVATE = &H0010
961Const SWP_FRAMECHANGED = &H0020
962Const SWP_SHOWWINDOW = &H0040
963Const SWP_HIDEWINDOW = &H0080
964Const SWP_NOCOPYBITS = &H0100
965Const SWP_NOOWNERZORDER = &H0200
966Const SWP_NOSENDCHANGING = &H0400
967Const SWP_DRAWFRAME = SWP_FRAMECHANGED
968Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
969Const SWP_DEFERERASE = &H2000
970Const SWP_ASYNCWINDOWPOS = &H4000
971Declare 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
972
973Declare Function SetWindowRgn Lib "user32" (hWnd As HWND, hRgn As HRGN, bRedraw As BOOL) As BOOL
974Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (hWnd As HWND, pString As PCSTR) As BOOL
975Declare Function ShowCaret Lib "user32" (hWnd As HWND) As BOOL
976Declare Function ShowCursor Lib "user32" (bShow As Long) As BOOL
977Declare Function ShowScrollBar Lib "user32" (hWnd As HWND, wBar As DWord, bShow As BOOL) As BOOL
978
979Const SW_HIDE = 0
980Const SW_SHOWNORMAL = 1
981Const SW_NORMAL = 1
982Const SW_SHOWMINIMIZED = 2
983Const SW_SHOWMAXIMIZED = 3
984Const SW_MAXIMIZE = 3
985Const SW_SHOWNOACTIVATE = 4
986Const SW_SHOW = 5
987Const SW_MINIMIZE = 6
988Const SW_SHOWMINNOACTIVE = 7
989Const SW_SHOWNA = 8
990Const SW_RESTORE = 9
991Const SW_SHOWDEFAULT = 10
992Const SW_FORCEMINIMIZE = 11
993Const SW_MAX = 11
994Declare Function ShowWindow Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
995Declare Function ShowWindowAsync Lib "user32" (hWnd As HWND, nCmdShow As Long) As BOOL
996
997Type NONCLIENTMETRICS
998 cbSize As DWord
999 iBorderWidth As Long
1000 iScrollWidth As Long
1001 iScrollHeight As Long
1002 iCaptionWidth As Long
1003 iCaptionHeight As Long
1004 lfCaptionFont As LOGFONT
1005 iSmCaptionWidth As Long
1006 iSmCaptionHeight As Long
1007 lfSmCaptionFont As LOGFONT
1008 iMenuWidth As Long
1009 iMenuHeight As Long
1010 lfMenuFont As LOGFONT
1011 lfStatusFont As LOGFONT
1012 lfMessageFont As LOGFONT
1013End Type
1014Const SPI_GETBEEP = 1
1015Const SPI_SETBEEP = 2
1016Const SPI_GETMOUSE = 3
1017Const SPI_SETMOUSE = 4
1018Const SPI_GETBORDER = 5
1019Const SPI_SETBORDER = 6
1020Const SPI_GETKEYBOARDSPEED = 10
1021Const SPI_SETKEYBOARDSPEED = 11
1022Const SPI_LANGDRIVER = 12
1023Const SPI_ICONHORIZONTALSPACING = 13
1024Const SPI_GETSCREENSAVETIMEOUT = 14
1025Const SPI_SETSCREENSAVETIMEOUT = 15
1026Const SPI_GETSCREENSAVEACTIVE = 16
1027Const SPI_SETSCREENSAVEACTIVE = 17
1028Const SPI_GETGRIDGRANULARITY = 18
1029Const SPI_SETGRIDGRANULARITY = 19
1030Const SPI_SETDESKWALLPAPER = 20
1031Const SPI_SETDESKPATTERN = 21
1032Const SPI_GETKEYBOARDDELAY = 22
1033Const SPI_SETKEYBOARDDELAY = 23
1034Const SPI_ICONVERTICALSPACING = 24
1035Const SPI_GETICONTITLEWRAP = 25
1036Const SPI_SETICONTITLEWRAP = 26
1037Const SPI_GETMENUDROPALIGNMENT = 27
1038Const SPI_SETMENUDROPALIGNMENT = 28
1039Const SPI_SETDOUBLECLKWIDTH = 29
1040Const SPI_SETDOUBLECLKHEIGHT = 30
1041Const SPI_GETICONTITLELOGFONT = 31
1042Const SPI_SETDOUBLECLICKTIME = 32
1043Const SPI_SETMOUSEBUTTONSWAP = 33
1044Const SPI_SETICONTITLELOGFONT = 34
1045Const SPI_GETFASTTASKSWITCH = 35
1046Const SPI_SETFASTTASKSWITCH = 36
1047Const SPI_SETDRAGFULLWINDOWS = 37
1048Const SPI_GETDRAGFULLWINDOWS = 38
1049Const SPI_GETNONCLIENTMETRICS = 41
1050Const SPI_SETNONCLIENTMETRICS = 42
1051Const SPI_GETMINIMIZEDMETRICS = 43
1052Const SPI_SETMINIMIZEDMETRICS = 44
1053Const SPI_GETICONMETRICS = 45
1054Const SPI_SETICONMETRICS = 46
1055Const SPI_SETWORKAREA = 47
1056Const SPI_GETWORKAREA = 48
1057Const SPI_SETPENWINDOWS = 49
1058Const SPI_GETHIGHCONTRAST = 66
1059Const SPI_SETHIGHCONTRAST = 67
1060Const SPI_GETKEYBOARDPREF = 68
1061Const SPI_SETKEYBOARDPREF = 69
1062Const SPI_GETSCREENREADER = 70
1063Const SPI_SETSCREENREADER = 71
1064Const SPI_GETANIMATION = 72
1065Const SPI_SETANIMATION = 73
1066Const SPI_GETFONTSMOOTHING = 74
1067Const SPI_SETFONTSMOOTHING = 75
1068Const SPI_SETDRAGWIDTH = 76
1069Const SPI_SETDRAGHEIGHT = 77
1070Const SPI_SETHANDHELD = 78
1071Const SPI_GETLOWPOWERTIMEOUT = 79
1072Const SPI_GETPOWEROFFTIMEOUT = 80
1073Const SPI_SETLOWPOWERTIMEOUT = 81
1074Const SPI_SETPOWEROFFTIMEOUT = 82
1075Const SPI_GETLOWPOWERACTIVE = 83
1076Const SPI_GETPOWEROFFACTIVE = 84
1077Const SPI_SETLOWPOWERACTIVE = 85
1078Const SPI_SETPOWEROFFACTIVE = 86
1079Const SPI_SETCURSORS = 87
1080Const SPI_SETICONS = 88
1081Const SPI_GETDEFAULTINPUTLANG = 89
1082Const SPI_SETDEFAULTINPUTLANG = 90
1083Const SPI_SETLANGTOGGLE = 91
1084Const SPI_GETWINDOWSEXTENSION = 92
1085Const SPI_SETMOUSETRAILS = 93
1086Const SPI_GETMOUSETRAILS = 94
1087Const SPI_SETSCREENSAVERRUNNING = 97
1088Const SPI_SCREENSAVERRUNNING = SPI_SETSCREENSAVERRUNNING
1089Const SPI_GETFILTERKEYS = 50
1090Const SPI_SETFILTERKEYS = 51
1091Const SPI_GETTOGGLEKEYS = 52
1092Const SPI_SETTOGGLEKEYS = 53
1093Const SPI_GETMOUSEKEYS = 54
1094Const SPI_SETMOUSEKEYS = 55
1095Const SPI_GETSHOWSOUNDS = 56
1096Const SPI_SETSHOWSOUNDS = 57
1097Const SPI_GETSTICKYKEYS = 58
1098Const SPI_SETSTICKYKEYS = 59
1099Const SPI_GETACCESSTIMEOUT = 60
1100Const SPI_SETACCESSTIMEOUT = 61
1101Const SPI_GETSERIALKEYS = 62
1102Const SPI_SETSERIALKEYS = 63
1103Const SPI_GETSOUNDSENTRY = 64
1104Const SPI_SETSOUNDSENTRY = 65
1105Const SPI_GETMOUSEHOVERWIDTH = 98
1106Const SPI_SETMOUSEHOVERWIDTH = 99
1107Const SPI_GETMOUSEHOVERHEIGHT = 100
1108Const SPI_SETMOUSEHOVERHEIGHT = 101
1109Const SPI_GETMOUSEHOVERTIME = 102
1110Const SPI_SETMOUSEHOVERTIME = 103
1111Const SPI_GETWHEELSCROLLLINES = 104
1112Const SPI_SETWHEELSCROLLLINES = 105
1113Const SPI_GETSHOWIMEUI = 110
1114Const SPI_SETSHOWIMEUI = 111
1115Const SPI_GETMOUSESPEED = 112
1116Const SPI_SETMOUSESPEED = 113
1117Const SPI_GETSCREENSAVERRUNNING = 114
1118Const SPI_GETACTIVEWINDOWTRACKING = &H1000 'Windows 2000 or later
1119Const SPI_SETACTIVEWINDOWTRACKING = &H1001
1120Const SPI_GETMENUANIMATION = &H1002
1121Const SPI_SETMENUANIMATION = &H1003
1122Const SPI_GETCOMBOBOXANIMATION = &H1004
1123Const SPI_SETCOMBOBOXANIMATION = &H1005
1124Const SPI_GETLISTBOXSMOOTHSCROLLING = &H1006
1125Const SPI_SETLISTBOXSMOOTHSCROLLING = &H1007
1126Const SPI_GETGRADIENTCAPTIONS = &H1008
1127Const SPI_SETGRADIENTCAPTIONS = &H1009
1128Const SPI_GETMENUUNDERLINES = &H100A
1129Const SPI_SETMENUUNDERLINES = &H100B
1130Const SPI_GETACTIVEWNDTRKZORDER = &H100C
1131Const SPI_SETACTIVEWNDTRKZORDER = &H100D
1132Const SPI_GETHOTTRACKING = &H100E
1133Const SPI_SETHOTTRACKING = &H100F
1134Const SPI_GETFOREGROUNDLOCKTIMEOUT = &H2000
1135Const SPI_SETFOREGROUNDLOCKTIMEOUT = &H2001
1136Const SPI_GETACTIVEWNDTRKTIMEOUT = &H2002
1137Const SPI_SETACTIVEWNDTRKTIMEOUT = &H2003
1138Const SPI_GETFOREGROUNDFLASHCOUNT = &H2004
1139Const SPI_SETFOREGROUNDFLASHCOUNT = &H2005
1140Const SPIF_UPDATEINIFILE = &H0001
1141Const SPIF_SENDWININICHANGE = &H0002
1142Const SPIF_SENDCHANGE = SPIF_SENDWININICHANGE
1143Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (uiAction As DWord, uiParam As DWord, pvParam As VoidPtr, fWinIni As DWord) As BOOL
1144
1145Const TME_HOVER = &H00000001
1146Const TME_LEAVE = &H00000002
1147Const TME_NONCLIENT = &H00000010
1148Const TME_QUERY = &H40000000
1149Const TME_CANCEL = &H80000000
1150Const HOVER_DEFAULT = &HFFFFFFFF
1151Type TRACKMOUSEEVENT
1152 cbSize As DWord
1153 dwFlags As DWord
1154 hwndTrack As HWND
1155 dwHoverTime As DWord
1156End Type
1157Declare Function TrackMouseEvent Lib "user32" (ByRef EventTrack As TRACKMOUSEEVENT) As BOOL
1158
1159Const TPM_LEFTBUTTON = &H0000
1160Const TPM_RIGHTBUTTON = &H0002
1161Const TPM_LEFTALIGN = &H0000
1162Const TPM_CENTERALIGN = &H0004
1163Const TPM_RIGHTALIGN = &H0008
1164Const TPM_TOPALIGN = &H0000
1165Const TPM_VCENTERALIGN = &H0010
1166Const TPM_BOTTOMALIGN = &H0020
1167Const TPM_HORIZONTAL = &H0000
1168Const TPM_VERTICAL = &H0040
1169Const TPM_NONOTIFY = &H0080
1170Const TPM_RETURNCMD = &H0100
1171Const TPM_RECURSE = &H0001
1172Declare 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
1173
1174Declare Function UnregisterClass Lib "user32" Alias "UnregisterClassA" (lpClassName As BytePtr, hInst As HINSTANCE) As BOOL
1175Declare Function UpdateWindow Lib "user32" (hWnd As HWND) As BOOL
1176Declare Function ValidateRect Lib "user32" (hWnd As HWND, ByRef lpRect As RECT) As BOOL
1177Declare Function ValidateRgn Lib "user32" (hWnd As HWND, hRgn As HRGN) As BOOL
1178Declare Function WaitForInputIdle Lib "user32" (hProcess As HANDLE, dwMilliseconds As DWord) As DWord
1179
1180Declare Function WaitMessage Lib "user32" () As BOOL
1181Declare Function WindowFromDC Lib "user32" (hDC As HDC) As HWND
1182Declare Function WindowFromPoint Lib "user32" (ptX As Long, ptY As Long) As HWND
1183Declare Function wsprintf cdecl Lib "user32" Alias "wsprintfA" (pText As PSTR, pFormat As PCSTR, ...) As Long
1184Declare Function wvsprintf Lib "user32" Alias "wvsprintfA" (pOutput As PSTR, pFormat As PCSTR, arglist As DWordPtr) As Long
1185
1186
1187#endif '_INC_WINDOW
Note: See TracBrowser for help on using the repository browser.