Microsoft DirectX 9.0


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


HRESULT SetMessageDrain(
  HWND hwnd



[in] Specifies a handle to the message-drain window.

Return Values

Returns an HRESULT value.


This method is equivalent to the IVideoWindow::put_MessageDrain method.

The Full Screen video renderer posts all mouse and keyboard messages to the window designated as a message drain. The exact list of messages that are posted is the same as the list given in put_MessageDrain.

Applications do not need to use this method. Instead, call the Filter Graph Manager's put_MessageDrain method before switching to full-screen mode. The Filter Graph Manager automatically sets the same message drain on the renderer that it selects for full-screen mode.

See Also