|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
The IVideoWindowinterface supports the video window properties of a video renderer. It is a dual interface (accessible through Microsoft Visual Basic and Visual C++) that controls a generic video window. Generally, this is a video renderer that draws video into a window on the display.
The IVideoWindowinterface supports both properties and methods. Properties are more easily accessible from many Automation controllers (such as Microsoft Visual Basic). However, some operations require several properties to be changed simultaneously; for this reason, methods are provided that allow a number of related properties to be changed simultaneously. For example, setting the window's position and size can be done by four individual put_[property name] calls or by the single method SetWindowPosition.
The methods require only that the video renderer be connected. If it is not connected, all the interface functions return VFW_E_NOT_CONNECTED. Properties set on a video renderer persist between successive connections and disconnections. All applications should ensure that they reset the renderer properties before starting a presentation.
Because this interface is Automation-compatible, there are two important aspects to remember about parameters accepted by these methods. First, all Boolean returns are OAFALSE (0) or OATRUE (–1), which is different from the C or C++ definition. Second, all strings are defined as being of type BSTR. All strings sent to the interface should be allocated through the Automation SysAllocStringfunction, and similarly all strings returned from the interface should be freed by using the Automation SysFreeStringfunction.
When to Implement
The video renderer filter supplied with Microsoft DirectShow implements this interface. It is also implemented by the filter graph manager (via a plug-in distributor) to pass method calls from the application to the video renderer filter's implementation of the interface.
Implement this interface if you are writing a replacement video renderer filter. You can use the CBaseVideoWindowclass, which handles the IDispatchimplementation for Automation, to help implement this interface.
When to Use
This interface is used by applications or other filters that must control the video window's properties.
Methods in Vtable Order
|QueryInterface||Returns pointers to supported interfaces.|
|AddRef||Increments the reference count.|
|Release||Decrements the reference count.|
|GetTypeInfoCount||Determines whether there is type information available for this dispinterface.|
|GetTypeInfo||Retrieves the type information for this dispinterface if GetTypeInfoCountreturned successfully.|
|GetIDsOfNames||Converts text names of properties and methods (including arguments) to their corresponding DISPIDs.|
|Invoke||Calls a method or accesses a property in this dispinterface if given a DISPID and any other necessary parameters.|
|put_Caption||Sets the text caption on the playback window.|
|get_Caption||Retrieves the text caption on the playback window.|
|put_WindowStyle||Sets the playback window style.|
|get_WindowStyle||Retrieves the playback window style.|
|put_WindowStyleEx||Sets the style of the control window.|
|get_WindowStyleEx||Retrieves the playback window's extended style bits.|
|put_AutoShow||Specifies if the window will be automatically shown on the first state change.|
|get_AutoShow||Returns if the window will be automatically shown on the first state change.|
|put_WindowState||Sets the current window state (such as visible or minimized).|
|get_WindowState||Retrieves the current window state (such as visible or minimized).|
|put_BackgroundPalette||Informs the renderer to realize its palette in the background.|
|get_BackgroundPalette||Returns whenever the renderer realizes its palette in the background.|
|put_Visible||Sets the visibility of the window.|
|get_Visible||Retrieves the visibility of the window.|
|put_Left||Sets the x-axis coordinate for the video window.|
|get_Left||Retrieves the x-axis coordinate for the video window.|
|put_Width||Sets the width of the video window.|
|get_Width||Retrieves the width of the video window.|
|put_Top||Sets the y-axis coordinates for the video window.|
|get_Top||Retrieves the y-axis coordinates for the video window.|
|put_Height||Sets the height of the video window.|
|get_Height||Retrieves the height of the video window.|
|put_Owner||Sets the owning parent window for the video playback window.|
|get_Owner||Retrieves the owning parent window for the video playback window.|
|put_MessageDrain||Specifies a window to which the video window will post messages.|
|get_MessageDrain||Retrieves the window set to receive messages from the video window.|
|get_BorderColor||Retrieves the border color for the video window.|
|put_BorderColor||Sets the border color for the video window.|
|get_FullScreenMode||Returns the full-screen rendering mode of the video renderer filter supporting this interface.|
|put_FullScreenMode||Sets the full-screen mode for the video renderer filter supporting this interface.|
|SetWindowForeground||Tells the renderer filter to become the foreground window.|
|NotifyOwnerMessage||Forwards messages that have been received by a parent window to a child window owned by a filter.|
|SetWindowPosition||Sets the video window position on the display.|
|GetWindowPosition||Retrieves the video window position.|
|GetMinIdealImageSize||Retrieves the ideal minimum image size for the video image playback (client) area.|
|GetMaxIdealImageSize||Retrieves the ideal maximum image size for the video image playback (client) area.|
|GetRestorePosition||Returns the normal restored window dimensions.|
|HideCursor||Hides the cursor.|
|IsCursorHidden||Determines if the cursor is hidden or showing.|