SendMessageA

Issues a Windows "SendMessage", with lParam as an ANSI string.

Syntax:

SendMessageA(window-id/handle, message-id, wParam, lParam)

Parameters:

(i) window-id/handle window id or handle to send to.

(i) Message-id message ID number (in decimal).

(i) wParam wParam value (message-specific information).

(s) lParam lParam value (message-specific information assumed to be a character string).

Returns:

(s) result of the message processing; it depends on the message sent.

 

The lParam string is copied to a GMEM_LOWER buffer, and a LPSTR to the copied string is passed as lParam. The GMEM_LOWER buffer is freed immediately upon return from the SendMessageA.

 

Example:


; Send WM_SETTINGCHANGE to all top-level windows
; when they make changes to system parameters
HWND_BROADCAST = -1
WM_SETTINGCHANGE = 26
SendMessageA( HWND_BROADCAST, WM_SETTINGCHANGE, 0, "")
See Also:

RegSetValue, SendMessageW