You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
3.9 KiB
Plaintext
135 lines
3.9 KiB
Plaintext
Attribute VB_Name = "MWindowsAPI"
|
|
Option Explicit
|
|
|
|
'<<< Vorsicht bei Änderungen in diesem Modul>>>
|
|
|
|
'Deklarationen von verwendeten Windows-Funktionen
|
|
|
|
Public Declare Function GetWindowRect Lib "user32" _
|
|
(ByVal hwnd As Long, _
|
|
lpRect As RECT _
|
|
) As Long
|
|
Public Declare Function IntersectRect Lib "user32" _
|
|
(lpDestRect As RECT, _
|
|
lpSrc1Rect As RECT, _
|
|
lpSrc2Rect As RECT _
|
|
) As Long
|
|
|
|
Public Type RECT
|
|
Left As Long
|
|
Top As Long
|
|
Right As Long
|
|
Bottom As Long
|
|
End Type
|
|
|
|
Public Declare Function APISetFocus Lib "user32" Alias "SetFocus" _
|
|
(ByVal hwnd As Long) As Long
|
|
|
|
Public Declare Function AttachThreadInput Lib "user32" _
|
|
(ByVal idAttach As Long, _
|
|
ByVal idAttachTo As Long, _
|
|
ByVal fAttach As Long _
|
|
) As Long
|
|
|
|
Public Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" _
|
|
(ByVal lpPrevWndFunc As Long, _
|
|
ByVal hwnd As Long, _
|
|
ByVal Msg As Long, _
|
|
ByVal wParam As Long, _
|
|
ByVal lParam As Long _
|
|
) As Long
|
|
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
|
|
(ByVal hwnd As Long, _
|
|
ByVal nIndex As Long _
|
|
) As Long
|
|
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
|
|
(ByVal hwnd As Long, _
|
|
ByVal nIndex As Long, _
|
|
ByVal dwNewLong As Long _
|
|
) As Long
|
|
Public Const GWL_STYLE = (-16)
|
|
Public Const GWL_WNDPROC = (-4)
|
|
Public Const ES_MULTILINE = &H4&
|
|
Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" _
|
|
(ByVal hwnd As Long, _
|
|
ByVal lpClassName As String, _
|
|
ByVal nMaxCount As Long _
|
|
) As Long
|
|
|
|
Public Declare Function SetWindowPos Lib "user32" _
|
|
(ByVal hwnd As Long, _
|
|
ByVal hWndInsertAfter As Long, _
|
|
ByVal x As Long, ByVal y As Long, _
|
|
ByVal cx As Long, ByVal cy As Long, _
|
|
ByVal wFlags As Long _
|
|
) As Long
|
|
Public Const HWND_TOPMOST = -1
|
|
Public Const SWP_NOMOVE = &H2
|
|
Public Const SWP_NOSIZE = &H1
|
|
Public Const SWP_NOACTIVATE = &H10
|
|
|
|
Public Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" _
|
|
(ByVal lpString As String _
|
|
) As Long
|
|
|
|
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
|
|
(ByVal hwnd As Long, _
|
|
ByVal wMsg As Long, _
|
|
ByVal wParam As Long, _
|
|
lParam As Any _
|
|
) As Long
|
|
'Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" _
|
|
' (ByVal hwnd As Long, _
|
|
' ByVal wMsg As Long, _
|
|
' ByVal wParam As Long, _
|
|
' ByVal lParam As Long _
|
|
' ) As Long
|
|
Public Const WM_COPYDATA = &H4A
|
|
Public Type COPYDATASTRUCT
|
|
dwData As Long
|
|
cbData As Long
|
|
lpData As Long
|
|
End Type
|
|
|
|
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
|
|
(Destination As Any, _
|
|
Source As Any, _
|
|
ByVal Length As Long)
|
|
|
|
Public Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA" _
|
|
(ByVal lpApplicationName As String, _
|
|
ByVal lpKeyName As String, _
|
|
ByVal nDefault As Long, _
|
|
ByVal lpFileName As String _
|
|
) As Long
|
|
Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" _
|
|
(ByVal lpApplicationName As String, _
|
|
ByVal lpKeyName As String, _
|
|
ByVal lpDefault As String, _
|
|
ByVal lpReturnedString As String, _
|
|
ByVal nSize As Long, _
|
|
ByVal lpFileName As String _
|
|
) As Long
|
|
|
|
Public Declare Sub keybd_event Lib "user32" _
|
|
(ByVal bVk As Byte, _
|
|
ByVal bScan As Byte, _
|
|
ByVal dwFlags As Long, _
|
|
ByVal dwExtraInfo As Long _
|
|
)
|
|
Public Const KEYEVENTF_EXTENDEDKEY = &H1
|
|
Public Const KEYEVENTF_KEYUP = &H2
|
|
Public Const VK_SHIFT = &H10
|
|
Public Const VK_CONTROL = &H11
|
|
Public Const VK_MENU = &H12
|
|
|
|
Public Declare Function GetKeyboardLayout Lib "user32" _
|
|
(ByVal dwLayout As Long _
|
|
) As Long
|
|
Public Declare Function ActivateKeyboardLayout Lib "user32" _
|
|
(ByVal HKL As Long, _
|
|
ByVal Flags As Long _
|
|
) As Long
|
|
Public Const HKL_NEXT = 1
|
|
|