Microsoft DirectX 9.0

CBaseWindow::PossiblyEatMessage

The PossiblyEatMessage method enables a derived class to forward messages to another window.

Syntax

virtual BOOL PossiblyEatMessage(
    UINT uMsg,
    WPARAM wParam,
    LPARAM lParam
);

Parameters

uMsg

Message identifier.

wParam

First message parameter.

lParam

Second message parameter.

Return Value

Returns TRUE if the message was forwarded, or FALSE otherwise. The base class returns FALSE.

Remarks

Before the CBaseWindow::OnReceiveMessage method handles a message, it calls PossiblyEatMessage. If PossiblyEatMessage returns TRUE, OnReceiveMessage ignores the message. A derived class can override PossiblyEatMessage so that it forwards some messages to an owner window. For example, the CBaseControlWindow class, which derives from CBaseWindow, forwards keyboard and mouse messages.

See Also