ZD Screen Recorder SDK API – ScnLib_SetCaptureWnd()

ScnLib_SetCaptureWnd()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) HWND __stdcall ScnLib_SetCaptureWnd(HWND hWnd, BOOL bExclusive);
C# [DllImport("ScnLib.dll")] public static extern IntPtr ScnLib_SetCaptureWnd(IntPtr Wnd, bool Exclusive);
Basic Public Declare Function ScnLib_SetCaptureWnd Lib "ScnLib.dll" (ByVal Wnd As IntPtr, ByVal Exclusive As Boolean) As IntPtr
Delphi function ScnLib_SetCaptureWnd(Wnd: THandle; Exclusive: LongBool): THandle; stdcall; external 'ScnLib.dll';
  • Description
    Bind/Unbind a capture window.

  • Parameters
    • Wnd [in]
      The handle of the window to capture, which can be a root window or a child window. Set a zero value to unbind the capture window. Set INVALID_HANDLE_VALUE (-1) to disable automatic window position tracking.
    • Exclusive [in]
      Whether to capture window content in exclusive mode.
  • Return Value
    The actual root window handle to capture. A zero value indicates that no capture window is bound, because the root window handle could not be obtained, or it is the entire desktop window.

  • Remarks
    Use this function to bind/unbind a capture window. Once a capture window is bound, the screen capture area will adhere to the window’s dimensions. The capture area will dynamically adapt to any movement or resizing of the window. However, manual adjustments to the capture region frame’s size or position will disable this automatic alignment. When capturing window content in exclusive mode, the content can be captured even if the bound window is obscured by other windows. However, if the bound window is minimized or hidden, the captured video will freeze and darken. Once the bound window is closed, the captured video will display a black screen until the window is unbound or a new window is bound. Initially, the screen capture is not bound to any window. To retrieve the current screen capture root window handle, call ScnLib_GetCaptureWnd().

  • See Also
    ScnLib_GetCaptureWnd()
    ScnLib_SetCaptureRegion()
    ScnLib_GetCaptureRegion()
    ScnLib_SelectCaptureRegionA/W()

Shopping Cart
  • Your cart is empty.
Scroll to Top