hallo,
sendmessage
hwnd ;dürfte klar sein
msg ;jedes fenster kann bestimmte definierte nachrichten empfangen zb. WM_GETTEXT
API:
An application sends a WM_GETTEXT message to copy the text that corresponds to a window into a buffer provided by the caller.
WM_GETTEXT
wParam = (WPARAM) cchTextMax; // number of characters to copy
lParam = (LPARAM) lpszText; // address of buffer for text
Parameters
cchTextMax
Value of wParam. Specifies the maximum number of characters to be copied, including the terminating null character.
lpszText
Value of lParam. Pointer to the buffer that is to receive the text.
Return Values
The return value is the number of characters copied.
Function
lR = SendMessage(m_hwnd, WM_GETTEXT, (lR + 1), ByVal sText)
vorsicht -> lParam As Any [als byref] und datentyp [als unbestimmt definiert], erwartet bzw. gibt aber auch bei bestimmten msg nur ein zeiger zurück !!!
Private Declare Function SendMessage Lib „user32“ Alias „SendMessageA“ (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
kommt darauf an was und an wem du nachrichten senden willst
msg=[userdefiniert] ist auch möglich wenn es die andere seite (hwnd) empfangen kann.
volker
[Bei dieser Antwort wurde das Vollzitat nachträglich automatisiert entfernt]