Microsoft DirectX 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:

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

See Also