ScnLib_PreviewVideo()

ScnLib_PreviewVideo()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) BOOL __stdcall ScnLib_PreviewVideo(BOOL bEnable, HWND hWnd, BOOL bPadding, COLORREF crBkColor);
C# [DllImport("ScnLib.dll")] public static extern bool ScnLib_PreviewVideo(bool Enable, IntPtr Wnd, bool Padding, uint BkColor);
Basic Public Declare Function ScnLib_PreviewVideo Lib "ScnLib.dll" (ByVal Enable As Boolean, ByVal Wnd As IntPtr, ByVal Padding As Boolean, ByVal BkColor As UInt32) As Boolean
Delphi function ScnLib_PreviewVideo(Enable: LongBool; Wnd: THandle; Padding: LongBool; BkColor: LongWord): LongBool; stdcall; external 'ScnLib.dll';
  • Description
    Turn the screen capture video preview on or off.

  • Parameters
    • Enable [in]
      TRUE: Turn preview on.
      FALSE: Turn preview off.
    • Wnd [in]
      The handle of your own window (can be a child window) to be attached for displaying the video preview. Passing a zero-value will prompt the SDK to create a popup preview window for you.
    • Padding [in]
      TRUE: If the window size exceeds the video's actual resolution, padding will be applied around the preview using the BkColor.
      FALSE: If the window size exceeds the video's actual resolution, the preview will be stretched to fit the window dimensions.
    • BkColor [in]
      The background color for the padding area in the video preview window, represented in COLORREF format.
  • Return Value
    If the video preview is currently turned on, the return value is TRUE. Otherwise, the return value is FALSE.

  • Remarks
    Use this function to turn the screen capture video preview on or off. This feature offers a way to view how the captured video will appear, allowing for adjustments either before starting or during the recording. You have the option to provide a handle of your own window (can be a child window) to be attached for displaying the video preview. Alternatively, passing a zero value will prompt the SDK to create a popup preview window for you. Note that only one video preview can be active at any given time. Therefore, each time you enable the video preview using this function, any existing video preview will be automatically replaced. To retrieve the handle of the active video preview window, call ScnLib_GetVideoPreviewWnd().

  • See Also
    ScnLib_GetVideoPreviewWnd()

Try the SDK for FREE SDK APIs overview