source: Include/api_window.sbp@ 36

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

misc

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