Name
SendMessageCallback
Synopsis
Sends a message to a window and returns immediately:
Public Declare Function SendMessageCallback Lib "user32" _ Alias "SendMessageCallbackA" _ (ByVal hwnd As Long, ByVal Msg As Long, _ ByVal wParam As Long, ByVal lParam As Long, _ ByVal lpResultCallBack As Long, ByVal dwData As Long) As Long
Parameters
-
hwnd
The handle of the target window, or
HWND_BROADCAST
if the message is to be sent to all top-level windows in the system-
wMsg
The message to send to the target window
-
wParam
The first parameter of the message
-
lParam
The second parameter of the message
-
lpResultCallBack
The callback function address
-
dwData
Data to be passed into the callback function
Return Value
The return value is a success or failure (a zero or a nonzero value, respectively). However, this function uses a callback function to retrieve the message-dependent return value.
Get Subclassing and Hooking with Visual Basic now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.