Platform SDK: Interprocess Communications |
The CallMsgFilter function passes the specified message and hook code to the hook procedures associated with the WH_SYSMSGFILTER and WH_MSGFILTER hooks. A WH_SYSMSGFILTER or WH_MSGFILTER hook procedure is an application-defined callback function that examines and, optionally, modifies messages for a dialog box, message box, menu, or scroll bar.
BOOL CallMsgFilter( LPMSG lpMsg, // message data int nCode // hook code );
If the application should process the message further, the return value is zero.
If the application should not process the message further, the return value is nonzero.
The system calls CallMsgFilter to enable applications to examine and control the flow of messages during internal processing of dialog boxes, message boxes, menus, and scroll bars, or when the user activates a different window by pressing the ALT+TAB key combination.
Install this hook procedure by using the SetWindowsHookEx function.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winuser.h; include Windows.h.
Library: Use User32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
Hooks Overview, Hook Functions, MessageProc, MSG, SetWindowsHookEx, SysMsgProc