source: Include/api_window.sbp@ 104

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

Controlの追加とそれに伴う修正

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