ZD Screen Recorder SDK API – ScnLib_SetCaptureRegion()

ScnLib_SetCaptureRegion()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) void __stdcall ScnLib_SetCaptureRegion(long left, long top, long right, long bottom);
C# [DllImport("ScnLib.dll")] public static extern void ScnLib_SetCaptureRegion(int left, int top, int right, int bottom);
Basic Public Declare Sub ScnLib_SetCaptureRegion Lib "ScnLib.dll" (ByVal left As Int32, ByVal top As Int32, ByVal right As Int32, ByVal bottom As Int32)
Delphi procedure ScnLib_SetCaptureRegion(left: Integer; top: Integer; right: Integer; bottom: Integer); stdcall; external 'ScnLib.dll';
  • Description
    Define the screen area for recording.

  • Parameters
    • left [in]
      The x-coordinate, in pixels, representing the upper-left corner of the screen capture region.
    • top [in]
      The y-coordinate, in pixels, representing the upper-left corner of the screen capture region.
    • right [in]
      The x-coordinate, in pixels, representing the lower-right corner of the screen capture region.
    • bottom [in]
      The y-coordinate, in pixels, representing the lower-right corner of the screen capture region.
    • The designated screen capture area excludes the right and bottom edges of the rectangle.
  • Return Value
    None.

  • Remarks
    Use this function to define the screen area for recording. You can invoke it either before starting a recording or during the recording process, allowing for dynamic adjustments to the recording area without interrupting the process. If the recording area is altered mid-recording, the video will automatically scale to maintain the original aspect ratio. Additionally, a smooth transitional visual effect is applied to the video to make the change in recording area appear less abrupt.

    By default, the entire desktop is set as the capture area. If an empty rectangle is set, it defaults to the desktop rectangle. A rectangle exceeding the desktop’s size will be trimmed to fit. To capture a specific window, call ScnLib_SetCaptureWnd(). To retrieve the exact coordinates of the recording region, call ScnLib_SelectCaptureRegionA/W(). To allow users to select a capture region on the screen, call ScnLib_SelectCaptureRegionA/W(). To make the recording region frame visible to the user, call ScnLib_ShowCaptureRegionFrame().

  • See Also
    ScnLib_GetCaptureRegion()
    ScnLib_SetCaptureWnd()
    ScnLib_SelectCaptureRegionA/W()
    ScnLib_ShowCaptureRegionFrame()
    ScnLib_GetCaptureRegionFrameWnd()

Shopping Cart
  • Your cart is empty.
Scroll to Top