Partager via


IVideoWindow::put_MessageDrain

 
Microsoft DirectShow 9.0

IVideoWindow::put_MessageDrain

The put_MessageDrain method specifies a window to receive mouse and keyboard messages from the video window.

Syntax

  HRESULT put_MessageDrain(
  OAHWND Drain
);

Parameters

Drain

[in] Specifies a handle to the window, as an OAHWND value.

Return Values

Possible return values include the following:

Value Description
S_OK Success.
VFW_E_NOT_CONNECTED The video renderer filter is not connected.

Remarks

This method enables an application to respond to mouse and keyboard events generated within the video window.

If Drain is non-NULL, the video renderer forwards certain messages to the specified window, using the PostMessage function. Which messages are forwarded might depend on the video renderer in use. The Video Renderer and Video Mixing Renderer (VMR) filters forward the following messages:

  • 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_NCLBUTTONDBLCLK
  • WM_NCLBUTTONDOWN
  • WM_NCLBUTTONUP
  • WM_NCMBUTTONDBLCLK
  • WM_NCMBUTTONDOWN
  • WM_NCMBUTTONUP
  • WM_NCMOUSEMOVE
  • WM_NCRBUTTONDBLCLK
  • WM_NCRBUTTONDOWN
  • WM_NCRBUTTONUP
  • WM_RBUTTONDBLCLK
  • WM_RBUTTONDOWN
  • WM_RBUTTONUP
  • WM_SYSCHAR
  • WM_SYSDEADCHAR
  • WM_SYSKEYDOWN
  • WM_SYSKEYUP

The message drain window does not need to be a parent of the video window, so full-screen applications can use this method.

Requirements

Header: Declared in Control.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also