CallMsgFilter

  BOOL CallMsgFilter(lpmsg, nCode)    
  LPMSG lpmsg; /* address of structure with message data */
  int nCode; /* processing code */

The CallMsgFilter function passes the given message and code to the current message filter function. The message filter function is an application-specified function that examines and modifies all messages. An application specifies the function by using the SetWindowsHook function.

Parameters

lpmsg

Points to an MSG structure that contains the message to be filtered. The MSG structure has the following form:

typedef struct tagMSG { /* msg */

HWND hwnd;

UINT message;

WPARAM wParam;

LPARAM lParam;

DWORD time;

POINT pt;

} MSG;

nCode

Specifies a code used by the filter function to determine how to process the message.

Return Value

The return value specifies the state of message processing. It is zero if the message should be processed or nonzero if the message should not be processed further.

Comments

The CallMsgFilter function is usually called by Windows to let applications examine and control the flow of messages during internal processing in menus and scroll bars or when moving or sizing a window.

Values given for the nCode parameter must not conflict with any of the MSGF_ and HC_ values passed by Windows to the message filter function.

See Also

SetWindowsHook