You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
667 B
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef SCREEN_CAPTURE_H
#define SCREEN_CAPTURE_H
//功能屏幕截屏类保存成bmp图像
class CScreenCapture
{
public:
CScreenCapture();
virtual ~CScreenCapture();
//功能屏幕截屏保存成BMP位图数据
//输入截屏区域rcCapture
void ScreenGISArea(const CRect rcCapture);
private:
//功能截屏给定区域保存成BMP
//输入截屏选定区域rect
HBITMAP CopyScreenToBitmap(CRect &rect);
//保存截屏数据到bmp文件
void SaveBitmap(HBITMAP hBmp);
//功能:开始截屏
void BeginCapture();
private:
//屏幕像素坐标
LONG m_cxScreen,m_cyScreen;
CBitmap m_bkBmp;
//开始截屏的标识
bool m_bIsCapturing;
};
#endif