ZD Screen Recorder SDK API – ScnLib_PreviewWebcam()

ScnLib_PreviewWebcam()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) BOOL __stdcall ScnLib_PreviewWebcam(BOOL bEnable, HWND hWnd, BOOL bPadding, COLORREF crBkColor);
C# [DllImport("ScnLib.dll")] public static extern bool ScnLib_PreviewWebcam(bool Enable, IntPtr Wnd, bool Padding, uint BkColor);
Basic Public Declare Function ScnLib_PreviewWebcam Lib "ScnLib.dll" (ByVal Enable As Boolean, ByVal Wnd As IntPtr, ByVal Padding As Boolean, ByVal BkColor As UInt32) As Boolean
Delphi function ScnLib_PreviewWebcam(Enable: LongBool; Wnd: THandle; Padding: LongBool; BkColor: LongWord): LongBool; stdcall; external 'ScnLib.dll';
  • Description
    Turn the preview of the currently active webcam device 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 webcam 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 webcam’s actual resolution, padding will be applied around the preview using the BkColor.
      FALSE: If the window size exceeds the webcam’s actual resolution, the preview will be stretched to fit the window dimensions.
    • BkColor [in]
      The background color for the padding area in the webcam preview window, represented in COLORREF format.
  • Return Value
    If the preview of the currently active webcam device is turned on, the return value is TRUE. Otherwise, the return value is FALSE.

  • Remarks
    Use this function to turn the preview of the currently active webcam device on or off. This feature allows you to see your appearance through the webcam and make adjustments either before starting your recording or during it. You have the option to provide a handle of your own window (can be a child window) to be attached for displaying the webcam preview. Alternatively, passing a zero value will prompt the SDK to create a popup preview window for you. Note that only one webcam preview can be active at any given time. Therefore, each time you enable the webcam preview using this function, any existing webcam preview will be automatically replaced. To retrieve the handle of the active webcam preview window, call ScnLib_GetWebcamPreviewWnd().

  • See Also
    ScnLib_SelectWebcamDevice()
    ScnLib_GetWebcamPreviewWnd()
    ScnLib_RecordWebcamOnly()

Shopping Cart
  • Your cart is empty.
Scroll to Top