ZenoTest
ZenoTest — Windows Desktop UI Testautomatisierung für Qt, WPF, WinForms & native Apps. Aufzeichnen, skripten und automatisierte GUI-Tests mit CI/CD-Integration ausführen.

SendMessage

int SendMessage(Handle hWnd, int msg, int wParam, int lParam)

Description
Sends a Windows message to the window identified by the given handle.
This function calls the Win32 API SendMessage internally and returns the result as an integer.
It can be used to interact with windows and controls at a low level, e.g. sending WM_CLOSE, BM_CLICK, or WM_SETTEXT.
The predefined Windows message constants (WM_CLOSE, WM_KEYDOWN, BM_CLICK, etc.) can be used directly as the msg parameter.

Parameter
- hWnd - A Handle to the target window or control.
- msg - The Windows message to send (e.g. WM_CLOSE, BM_CLICK).
- wParam - Additional message-specific information (WPARAM).
- lParam - Additional message-specific information (LPARAM).

Return
- int - The result of the message processing, as returned by the target window procedure.

Example
void main()
{
    int pid = GetProcessID("notepad.exe");
    Handle h = GetProcessIDHandle(pid);

    // Close the window
    SendMessage(h, WM_CLOSE, 0, 0);
}
#define #include abs Array ceil CloseAUT Console mode do...while DoubleClick DragAndDrop Execute Fail File floor for Format GetAUTFileVersion GetAUTProductVersion GetAUTQtVersion GetAUTSuspectedCompiler GetAUTSuspectedFramework GetClipboard GetCurrentDate GetCurrentTime GetCurrentWorkingDir GetEnv GetName GetProcessID GetProcessIDHandle GetQtProperty GetText GetTimestamp GetValue Handle HasFocus IsAUT64Bit IsChecked IsEnabled IsVisible LeftMouseClick LeftMouseDown LeftMouseUp max MiddleMouseClick MiddleMouseDown MiddleMouseUp min MouseMove MouseWheel Pass pow Predefined Constants Print rand Regex RegexMatch RightMouseClick RightMouseDown RightMouseUp round Script Language SendKeys SendMessage SetClipboard SetFocus SetGlobal SetQtProperty ShellProcess Sleep sqrt srand StartAUT string TerminateProcess TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEmpty VerifyEndsWith VerifyEqual VerifyExists VerifyFalse VerifyGreater VerifyGreaterEqual VerifyLess VerifyLessEqual VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith VerifyTrue WaitForControl WaitUntilEnabled WaitUntilVisible while