put_MessageDrain

IVideoWindow::put_MessageDrain method

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

Syntax


HRESULT put_MessageDrain(
  [in] OAHWND Drain
);

Parameters

Drain [in]

A handle to the window, as an OAHWND value.

Return value

Possible return values include the following:

Return codeDescription
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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Control.h (include Dshow.h)

Library

Strmiids.lib

See also

Error and Success Codes
IVideoWindow Interface
IVideoWindow::get_MessageDrain

 

 

Show:
© 2016 Microsoft