Files
SimpleRemoter/client/ScreenSpy.h

86 lines
2.0 KiB
C
Raw Normal View History

// 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
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"
#include "ScreenCapture.h"
class CScreenSpy : public ScreenCapture
{
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>
public:
CScreenSpy(ULONG ulbiBitCount, int gop = DEFAULT_GOP);
2019-09-07 10:47:50 +08:00
virtual ~CScreenSpy();
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-09-07 10:47:50 +08:00
double GetHZoom() const {
return m_hZoom;
}
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-09-07 10:47:50 +08:00
memcpy(m_RectBuffer + m_RectBufferOffset, szBuffer, ulLength);
m_RectBufferOffset += ulLength;
}
virtual LPBYTE GetFirstScreenData(ULONG* ulFirstScreenLength);
2019-09-07 10:47:50 +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
VOID ScanScreen(HDC hdcDest, HDC hdcSour, ULONG ulWidth, ULONG ulHeight);
2019-09-07 10:47:50 +08:00
};
#endif // !defined(AFX_SCREENSPY_H__5F74528D_9ABD_404E_84D2_06C96A0615F4__INCLUDED_)