Microsoft DirectX 8.1 (C++) |
The IVideoWindow interface sets properties on the video window. Applications can use it to set the window owner, the position and dimensions of the window, and other properties.
Both the Video Renderer Filter and the Filter Graph Manager expose this interface. Applications should use the Filter Graph Manager's version of this interface. The Filter Graph Manager forwards all method calls to the Video Renderer. It also forwards certain window messages, such as WM_DISPLAYCHANGE, that the Video Renderer requires in order to update itself. If you make the video window into a child window, the window no longer receives these messages directly. Thus, it relies on the Filter Graph Manager to forward them.
However, if the filter graph contains more than one Video Renderer, the Filter Graph Manager only communicates with one of them (selected arbitrarily). Therefore, to work with multiple video windows, an application must use the IVideoWindow interface directly on the filters themselves. In that case, you must be sure to forward window messages to each Video Renderer, using the IVideoWindow::NotifyOwnerMessage method.
MFC applications which place the video window in a child window must define an empty WM_ERASEBKGND message handler, or the video display area will not repaint correctly.
If the video renderer is not connected, all the methods on this interface return the error code VFW_E_NOT_CONNECTED. Properties set on a video renderer persist between successive connections and disconnections. Because this interface is Automation-compatible, Boolean values are OAFALSE (0) or OATRUE (1).
Filter Developers: You can use the CBaseVideoWindow class to help implement this interface.
In addition to the methods inherited from IDispatch, the IVideoWindow interface exposes the following methods.
Method | Description |
get_AutoShow | Queries whether the video renderer automatically shows the video window when it receives video data. |
get_BackgroundPalette | Queries whether the video window realizes its palette in the background. |
get_BorderColor | Retrieves the color that appears around the edges of the destination rectangle. |
get_Caption | Retrieves the video window caption. |
get_FullScreenMode | Queries whether the video renderer is in full-screen mode. |
get_Height | Retrieves the height of the video window. |
get_Left | Retrieves the video window's x-coordinate. |
get_MessageDrain | Retrieves the window that receives mouse and keyboard messages from the video window, if any. |
get_Owner | Retrieves the video window's parent window, if any. |
get_Top | Retrieves the video window's y-coordinate. |
get_Visible | Queries whether the video window is visible. |
get_Width | Retrieves the width of the video window. |
get_WindowState | Queries whether the video window is visible, hidden, minimized, or maximized. |
get_WindowStyle | Retrieves the window style on the video window. |
get_WindowStyleEx | Retrieves the extended window style on the video window. |
GetMaxIdealImageSize | Retrieves the maximum ideal size for the video image. |
GetMinIdealImageSize | Retrieves the minimum ideal size for the video image. |
GetRestorePosition | Retrieves the restored window position. |
GetWindowPosition | Retrieves the position of the video window. |
HideCursor | Hides the cursor. |
IsCursorHidden | Queries whether the cursor is hidden. |
NotifyOwnerMessage | Forwards a message to the video window. |
put_AutoShow | Specifies whether the video renderer automatically shows the video window when it receives video data. |
put_BackgroundPalette | Specifies whether the video window realizes its palette in the background. |
put_BorderColor | Sets the color that appears around the edges of the destination rectangle. |
put_Caption | Sets the video window caption. |
put_FullScreenMode | Enables or disables full-screen mode. |
put_Height | Sets the height of the video window. |
put_Left | Sets the video window's x-coordinate. |
put_MessageDrain | Specifies a window to receive mouse and keyboard messages from the video window. |
put_Owner | Specifies a parent window for the video window. |
put_Top | Sets the video window's y-coordinate. |
put_Visible | Shows or hides the video window. |
put_Width | Sets the width of the video window. |
put_WindowState | Shows, hides, minimizes, or maximizes the video window. |
put_WindowStyle | Sets the window style on the video window. |
put_WindowStyleEx | Sets the extended window style on the video window. |
SetWindowForeground | Places the video window at the top of the Z order. |
SetWindowPosition | Sets the position of the video window. |