Implementing Screen Capture

Capturing Screen Images

LEADTOOLS supports a number of functions for capturing images from the screen. You can capture the entire screen , or you can elect to capture some small part of the screen. LScreenCapture::CaptureFullScreen lets you capture the entire screen, while LScreenCapture::CaptureActiveWindow lets you capture all of the active window. To capture just the client portion of the active window, use LScreenCapture::CaptureActiveClient. LScreenCapture::CaptureWindowUnderCursor captures the window immediately under the cursor, and LScreenCapture::CaptureSelectedObject captures an image of the selected window's object.

In addition, you can capture wallpaper, menus and the mouse cursor, using LScreenCapture::CaptureWallPaper, LScreenCapture::CaptureMenuUnderCursor and LScreenCapture::CaptureMouseCursor. To capture an area, use LScreenCapture::CaptureArea. LEADTOOLS provides two functions for capturing bitmaps, cursors and icons from EXEs or DLLs, LScreenCapture::CaptureFromEXE and LScreenCapture::CaptureFromEXEDlg. Finally, to stop a capture operation, use LScreenCapture::StopCapture.

Getting and Setting Capture Information

In addition to the capture functions given above, there are a number of functions for getting and setting capture information, and two overridables. These are as follows: LScreenCapture::CaptureAreaOptionDlg, LScreenCapture::GetCaptureOptions, LScreenCapture::CaptureGetResCount, LScreenCapture::SetCaptureOptions, LScreenCapture::SetCaptureOptionDlg, LScreenCapture::IsCaptureActive, LScreenCapture::ScreenCaptureCallBack, and LScreenCapture::CaptureHotKeyCallBack.