Partager via


IVideoWindow Interface

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This interface supports the video window properties of a video renderer. It is a dual interface (accessible through Visual Basic and Microsoft Visual C++®) that controls a generic video window. Generally, this is a video renderer that draws video into a window on the display.

The IVideoWindow interface supports both properties and methods.

Properties are more easily accessible from many Automation controllers (such as 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, all interface functions return VFW_E_NOT_CONNECTED.

Properties set on a video renderer persist between successive connections and disconnections.

Applications should ensure that they reset the renderer properties before starting a presentation.

Because this interface is Automation-compatible, two aspects are important to remember about parameters accepted by these methods.

  • All Boolean returns are OAFALSE (0) or OATRUE (–1), which is different from the C or C++ definition.
  • All strings are defined as being of type BSTR.

All strings sent to the interface should be allocated through the Automation SysAllocString function. Similarly, all strings returned from the interface should be freed by using the Automation SysFreeString function.

When to Implement

The video renderer filter supplied with DirectShow implements this interface. It is also implemented by the filter graph manager, through 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 CBaseVideoWindow class, which handles the IDispatch implementation 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

The following tables show the methods that appear in the Vtable beneath the standard COM methods inherited from IUnknown.

IDispatch method Description

GetTypeInfoCount

Determines whether there is type information available for this dispinterface.

GetTypeInfo

Retrieves the type information for this dispinterface if GetTypeInfoCount returned 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.

IVideoWindow method Description

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.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment

See Also

Reference

DirectShow Interfaces