Share via


CBaseControlWindow::PossiblyEatMessage

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Forwards keyboard and mouse messages to a specified window.

Syntax

BOOL WINAPI PossiblyEatMessage(
  HWND hwndDrain,
  UINT uMsg,
  WPARAM wParam,
  LPARAM lParam
);

Parameters

  • hwndDrain
    Handle of the window to which messages will be forwarded.
  • uMsg
    Message that was forwarded.
  • wParam
    First message parameter.
  • lParam
    Second message parameter.

Return Value

Returns TRUE if the message was posted or FALSE if it was not.

Remarks

When the window is owned, it will pass certain classes of messages to the owning window (such as keyboard and mouse events). In this case, the Win32 PostMessage function is used to post messages to any window specified by hwndDrain which is set in CBaseControlWindow::put_MessageDrain.

If a certain message cannot be posted, this message will return FALSE.

The following is a list of messages that will get passed on untranslated and return TRUE:

WM_CHAR

WM_DEADCHAR

WM_KEYDOWN

WM_KEYUP

WM_LBUTTONDBLCLK

WM_LBUTTONDOWN

WM_LBUTTONUP

WM_MBUTTONDBLCLK

WM_MBUTTONDOWN

WM_MBUTTONUP

WM_MOUSEACTIVATE

WM_MOUSEMOVE

WM_RBUTTONDBLCLK

WM_RBUTTONDOWN

WM_RBUTTONUP

WM_SYSCHAR

WM_SYSDEADCHAR

WM_SYSKEYDOWN

WM_SYSKEYUP

 

Requirements

Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment