source: Include/api_window.sbp@ 4

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