Skip to content

Latest commit

 

History

History
129 lines (83 loc) · 4.27 KB

nf-winuser-callmsgfiltera.md

File metadata and controls

129 lines (83 loc) · 4.27 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name req.apiset
NF:winuser.CallMsgFilterA
CallMsgFilterA function (winuser.h)
Passes the specified message and hook code to the hook procedures associated with the WH_SYSMSGFILTER and WH_MSGFILTER hooks. (ANSI)
CallMsgFilterA
winuser/CallMsgFilterA
winmsg\callmsgfilter.htm
winmsg
VS|winui|~\winui\windowsuserinterface\windowing\hooks\hookreference\hookfunctions\callmsgfilter.htm
12/05/2018
CallMsgFilter, CallMsgFilter function [Windows and Messages], CallMsgFilterA, CallMsgFilterW, _win32_CallMsgFilter, _win32_callmsgfilter_cpp, winmsg.callmsgfilter, winui._win32_callmsgfilter, winuser/CallMsgFilter, winuser/CallMsgFilterA, winuser/CallMsgFilterW
winuser.h
Windows.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
CallMsgFilterW (Unicode) and CallMsgFilterA (ANSI)
User32.lib
User32.dll
Windows
19H1
CallMsgFilterA
winuser/CallMsgFilterA
c++
APIRef
kbSyntax
DllExport
User32.dll
Ext-MS-Win-NTUser-message-l1-1-0.dll
Ext-MS-Win-NTUser-message-l1-1-1.dll
Ext-MS-Win-NTUser-Message-l1-1-2.dll
Ext-MS-Win-NTUser-Message-L1-1-3.dll
CallMsgFilter
CallMsgFilterA
CallMsgFilterW
ext-ms-win-ntuser-message-l1-1-0 (introduced in Windows 8)

CallMsgFilterA function

-description

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.

-parameters

-param lpMsg [in]

Type: LPMSG

A pointer to an MSG structure that contains the message to be passed to the hook procedures.

-param nCode [in]

Type: int

An application-defined code used by the hook procedure to determine how to process the message. The code must not have the same value as system-defined hook codes (MSGF_ and HC_) associated with the WH_SYSMSGFILTER and WH_MSGFILTER hooks.

-returns

Type: BOOL

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.

-remarks

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.

Examples

For an example, see WH_MSGFILTER and WH_SYSMSGFILTER Hooks.

Note

The winuser.h header defines CallMsgFilter as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

Conceptual

Hooks

MSG

MessageProc

Reference

SetWindowsHookEx

SysMsgProc