2019-01-05 20:21:43 +08:00
|
|
|
|
// ScreenSpy.h: interface for the CScreenSpy class.
|
|
|
|
|
|
//
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#if !defined(AFX_SCREENSPY_H__5F74528D_9ABD_404E_84D2_06C96A0615F4__INCLUDED_)
|
|
|
|
|
|
#define AFX_SCREENSPY_H__5F74528D_9ABD_404E_84D2_06C96A0615F4__INCLUDED_
|
|
|
|
|
|
|
|
|
|
|
|
#if _MSC_VER > 1000
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#endif // _MSC_VER > 1000
|
2025-03-13 23:34:33 +08:00
|
|
|
|
|
2019-01-07 20:46:03 +08:00
|
|
|
|
#define COPY_ALL 1 // <20><><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD>ֿ鿽<D6BF><E9BFBD><EFBFBD><EFBFBD>added by yuanyuanxiang 2019-1-7<><37>
|
2019-01-20 20:04:11 +08:00
|
|
|
|
#include "CursorInfo.h"
|
2025-03-13 23:34:33 +08:00
|
|
|
|
#include "ScreenCapture.h"
|
2019-01-05 20:21:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
2025-03-13 23:34:33 +08:00
|
|
|
|
class CScreenSpy : public ScreenCapture
|
2019-01-05 20:21:43 +08:00
|
|
|
|
{
|
2019-09-07 10:47:50 +08:00
|
|
|
|
private:
|
|
|
|
|
|
HWND m_hDeskTopWnd; //<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4>ھ<EFBFBD><DABE><EFBFBD>
|
|
|
|
|
|
HDC m_hFullDC; //Explorer.exe <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD>豸DC
|
|
|
|
|
|
|
|
|
|
|
|
HDC m_hFullMemDC;
|
|
|
|
|
|
HBITMAP m_BitmapHandle;
|
|
|
|
|
|
PVOID m_BitmapData_Full;
|
|
|
|
|
|
|
|
|
|
|
|
HDC m_hDiffMemDC;
|
|
|
|
|
|
HBITMAP m_DiffBitmapHandle;
|
|
|
|
|
|
PVOID m_DiffBitmapData_Full;
|
|
|
|
|
|
|
|
|
|
|
|
ULONG m_RectBufferOffset; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
|
|
|
|
|
|
2019-01-05 20:21:43 +08:00
|
|
|
|
public:
|
2025-03-30 18:03:01 +08:00
|
|
|
|
CScreenSpy(ULONG ulbiBitCount, BYTE algo, int gop = DEFAULT_GOP);
|
2019-09-07 10:47:50 +08:00
|
|
|
|
|
2019-01-05 20:21:43 +08:00
|
|
|
|
virtual ~CScreenSpy();
|
2019-01-17 20:41:51 +08:00
|
|
|
|
|
2019-09-07 10:47:50 +08:00
|
|
|
|
int GetWidth()const {
|
|
|
|
|
|
return m_ulFullWidth;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int GetHeight() const {
|
|
|
|
|
|
return m_ulFullHeight;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool IsZoomed() const {
|
|
|
|
|
|
return m_bZoomed;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
double GetWZoom() const {
|
|
|
|
|
|
return m_wZoom;
|
|
|
|
|
|
}
|
2019-01-17 20:41:51 +08:00
|
|
|
|
|
2019-09-07 10:47:50 +08:00
|
|
|
|
double GetHZoom() const {
|
|
|
|
|
|
return m_hZoom;
|
2019-01-17 20:41:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const LPBITMAPINFO& GetBIData() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_BitmapInfor_Full;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ULONG GetFirstScreenLength() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_BitmapInfor_Full->bmiHeader.biSizeImage;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-09-07 10:47:50 +08:00
|
|
|
|
FORCEINLINE VOID WriteRectBuffer(LPBYTE szBuffer, ULONG ulLength)
|
2019-01-17 20:41:51 +08:00
|
|
|
|
{
|
2019-09-07 10:47:50 +08:00
|
|
|
|
memcpy(m_RectBuffer + m_RectBufferOffset, szBuffer, ulLength);
|
2019-01-17 20:41:51 +08:00
|
|
|
|
m_RectBufferOffset += ulLength;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-13 23:34:33 +08:00
|
|
|
|
virtual LPBYTE GetFirstScreenData(ULONG* ulFirstScreenLength);
|
2019-09-07 10:47:50 +08:00
|
|
|
|
|
2025-03-13 23:34:33 +08:00
|
|
|
|
virtual LPBYTE ScanNextScreen() {
|
|
|
|
|
|
ScanScreen(m_hDiffMemDC, m_hFullDC, m_BitmapInfor_Full->bmiHeader.biWidth, m_BitmapInfor_Full->bmiHeader.biHeight);
|
|
|
|
|
|
return (LPBYTE)m_DiffBitmapData_Full;
|
|
|
|
|
|
}
|
2019-09-07 10:47:50 +08:00
|
|
|
|
|
2019-01-06 21:18:26 +08:00
|
|
|
|
VOID ScanScreen(HDC hdcDest, HDC hdcSour, ULONG ulWidth, ULONG ulHeight);
|
2019-09-07 10:47:50 +08:00
|
|
|
|
|
2019-01-05 20:21:43 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // !defined(AFX_SCREENSPY_H__5F74528D_9ABD_404E_84D2_06C96A0615F4__INCLUDED_)
|