SendMsgHook
Appearance
This hook filters messages sent by the WinSendMsg function.
Syntax
SendMsgHook(hab, psmh, fInterTask);
Parameters
- hab (HAB) - input
- Anchor-block handle.
- psmh (PSMHSTRUCT) - input
- Pointer to a send message hook structure.
- This a structure contains the parameters to the WinSendMsg function.
- fInterTask (BOOL) - input
- Intertask indicator.
- TRUE: The message is sent between tasks (intertask).
- FALSE: The message is sent within a task (intratask).
Returns
There is no return value for this hook.
Remarks
This hook may be called whenever a window procedure is called via the WinSendMsg function.
It is called in the context of the sender, whereby if the sender has a queue hook installed it is called, but if the receiver has a queue hook installed it is not called.
The next hook in the chain is always called.
Example Code
#define INCL_WINHOOKS /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ PSMHSTRUCT psmh; /* Pointer to a send message hook structure. */ BOOL fInterTask;/* Intertask indicator. */ SendMsgHook(hab, psmh, fInterTask);