Microsoft DirectX 8.1 (C++)

MSVidCtl Object

This topic applies to Windows XP Home Edition and Windows XP Professional only.

The MSVidCtl object, also called the Video Control, is an ActiveX control that creates and manages filter graphs for analog and digital TV. In addition to the stock ActiveX properties, MSVidCtl provides methods for building the filter graph; submitting a tune request; and running, pausing, and stopping the graph. It also contains properties for retrieving devices and features.

Visual Basic applications can host this control directly in a Visual Basic form. Script applications can host this control using the OBJECT tag:

<OBJECT ID="MSVidCtl" CLASSID="CLSID:B0EDF163-910A-11D2-B632-00C04F79498E"></OBJECT>

This object exposes the following methods and properties.

Property Description
AudioRendererActive Sets or retrieves the currently active audio renderer.
AudioRenderersAvailable Retrieves a collection of audio renderer devices available on the local system.
AutoSize Returns or sets a value that determines whether the Video Control is automatically resized to display its entire contents.
BackColor Retrieves or sets the background color of the Video Control.
ColorKey Retrieves or sets the color key.
DisplaySize Retrieves or sets the display size.
Enabled Sets or retrieves a value that determines whether the Video Control can respond to user-generated events.
FeaturesActive Sets or retrieves a collection of the features currently active.
FeaturesAvailable Retrieves a collection of features available on the local system.
InputActive Sets or retrieves the currently active input device.
InputsAvailable Retrieves a collection of inputs available on the local system.
MaintainAspectRatio Sets or retrieves a value indicating whether the Video Control should maintain the aspect ratio of the source video when resizing its own rectangle.
OutputsActive Sets or retrieves the currently active output device.
OutputsAvailable Retrieves a collection of outputs for a specified category that are available on the local system.
State Retrieves the current state of the Video Control.
TabStop Sets or retrieves a value indicating whether a user can use the TAB key to give the focus to the Video Control.
VideoRendererActive Sets or retrieves the currently active video renderer.
VideoRenderersAvailable Retrieves a collection of video renderers available on the local system.
Window Retrieves the window handle associated with the Video Control.

Method Type
Build Builds the underlying filter graph and connects all the filters.
Decompose Disassembles the filter graph.
DisableAudio Sets the active audio renderer to Nothing.
DisableVideo Sets the active video renderer to Nothing.
Pause Pauses the filter graph.
Refresh Immediately updates the Video Control's appearance.
Run Runs (and, if necessary, builds) the filter graph.
Stop Stops the filter graph.
View Selects an input device that is capable of handling a specified channel or frequency, and builds a filter graph.
ViewNext Finds another input device for viewing the specified item.

Event Description
Click Called when a user clicks anywhere on the MSVidCtl rectangle.
DblClick Called when a user double-clicks on the MSVidCtl rectangle.
Error Called when an error occurs in the Video Control or in the underlying filter graph. Currently, no errors are defined for this event.
KeyDown Called when the user presses a key.
KeyPress Called when the user presses and releases a key.
KeyUp Called when the user releases a key.
MouseDown Called when the user presses the left mouse key down while the mouse pointer is over the Video Control.
MouseMove Called when the user moves the mouse pointer over the Video Control.
MouseUp Called when the user releases the left mouse button while the mouse pointer is over the Video Control.
StateChange Called when the state of the control changes.

See Also