Name
MSG
Synopsis
Contains all information that defines a Windows message:
Public Type MSG
hwnd As Long
message As Long
wParam As Long
lParam As Long
time As Long
pt As POINTAPI
End TypeStructure Members
-
hwnd The handle of the window to which the message is directed.
-
message The message to be passed to this window. All window messages are constants and are defined in the Win32 Software Development Kit (SDK) header files. The header files WINUSER.H and WINABLE.H contain most of these constants.
-
wParamandlParam Many messages use the
wParamandlParamelements to pass extra information to the receiving window procedure. This extra information depends on the message. For example, it could indicate which mouse button was pressed, or if the Ctrl key was pressed in combination with the currently pressed key. Some messages need to pass much more information than is possible with thewParamandlParamarguments. To get around this limitation, some messages have special structures associated with them. Pointers to these structures are passed in either thelParamor thewParamelements.Each message has its own identity -- that is, the way one message fills in the
MSGstructure is not the way every message will fill it in. Most messages have their own information that must be passed on to the receiving window. Therefore, become familiar with the message that you are going to be trapping before you write the code or you might be in for a surprise.-
time Represents when the message was posted. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access