Share via


WMEncPrePreview.SetCaptureParent

Windows Media Encoder SDK banner art

The SetCaptureParent method specifies the parent window, indicating where to display the pre-preview of the video.

Syntax

WMEncPrePreview.SetCaptureParent(hWnd)

Parameters

hWnd

[in]  Long specifying a handle to a window object.

Return Values

This method does not return a value.

Remarks

A preview displays a specific multimedia stream before it is compressed. A postview object displays the same stream after compression and decompression. However, a pre-preview object shows the stream before encoding begins. For example, if you are controlling a digital device such as a DV camera, you can use a pre-preview to view the output from the device while you are cueing it to a specific location.

To display previews and postviews, you must add the Windows Media Encoder Preview Control reference to the project. For more information, see Programming in Visual Basic.

Note   Some devices do not support this feature. A list of devices is not available at this time.

Example Code

' Create a WMEncoder object.
  Dim Encoder As WMEncoder
  Set Encoder = New WMEncoder

' Configure the encoding session (input, output, and profile).

' Initialize the encoding session.
  Encoder.PrepareToEncode True

' Get the source plug-in and then display the pre-preview in a frame.
  Dim PrePreview As WMEncPrepreview
  Set PrePreview = SrcVid.GetSourcePlugin
  PrePreview.SetCaptureParent PreviewFrame.hWnd

Requirements

Reference: Windows Media Encoder Preview Control

Library: wmprevu.dll

See Also