source: Include/api_window.sbp@ 119

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

Unicode (#50) 前準備
Byte→Char (#51) 型名は殆ど完了、ただし中身までは手を付けていないものが多い

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