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
|
|
|
|
|
|
#define ALGORITHM_DIFF 1
|
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"
|
2019-01-05 20:21:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CScreenSpy
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-01-06 21:18:26 +08:00
|
|
|
|
CScreenSpy(ULONG ulbiBitCount);
|
2019-01-05 20:21:43 +08:00
|
|
|
|
virtual ~CScreenSpy();
|
2019-01-17 20:41:51 +08:00
|
|
|
|
|
|
|
|
|
|
ULONG GetBISize() const
|
|
|
|
|
|
{
|
|
|
|
|
|
ULONG ColorNum = m_ulbiBitCount <= 8 ? 1 << m_ulbiBitCount : 0;
|
|
|
|
|
|
|
|
|
|
|
|
return sizeof(BITMAPINFOHEADER) + (ColorNum * sizeof(RGBQUAD));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const LPBITMAPINFO& GetBIData() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_BitmapInfor_Full;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-01-05 20:21:43 +08:00
|
|
|
|
ULONG m_ulbiBitCount;
|
|
|
|
|
|
LPBITMAPINFO m_BitmapInfor_Full;
|
|
|
|
|
|
ULONG m_ulFullWidth, m_ulFullHeight; //<2F><>Ļ<EFBFBD>ķֱ<C4B7><D6B1><EFBFBD>
|
2019-01-06 21:18:26 +08:00
|
|
|
|
LPBITMAPINFO ConstructBI(ULONG ulbiBitCount,
|
2019-01-05 20:21:43 +08:00
|
|
|
|
ULONG ulFullWidth, ULONG ulFullHeight);
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
DWORD m_dwBitBltRop;
|
2019-01-06 21:18:26 +08:00
|
|
|
|
LPVOID GetFirstScreenData();
|
2019-01-17 20:41:51 +08:00
|
|
|
|
|
|
|
|
|
|
ULONG GetFirstScreenLength() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_BitmapInfor_Full->bmiHeader.biSizeImage;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-01-06 21:18:26 +08:00
|
|
|
|
LPVOID GetNextScreenData(ULONG* ulNextSendLength);
|
2019-01-05 20:21:43 +08:00
|
|
|
|
BYTE* m_RectBuffer;
|
|
|
|
|
|
ULONG m_RectBufferOffset;
|
|
|
|
|
|
BYTE m_bAlgorithm;
|
2019-01-17 20:41:51 +08:00
|
|
|
|
|
|
|
|
|
|
FORCEINLINE VOID WriteRectBuffer(LPBYTE szBuffer,ULONG ulLength)
|
|
|
|
|
|
{
|
|
|
|
|
|
memcpy(m_RectBuffer + m_RectBufferOffset, szBuffer, ulLength);
|
|
|
|
|
|
m_RectBufferOffset += ulLength;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-01-20 20:04:11 +08:00
|
|
|
|
CCursorInfo m_CursorInfor;
|
2019-01-05 20:21:43 +08:00
|
|
|
|
HDC m_hDiffMemDC;
|
|
|
|
|
|
HBITMAP m_DiffBitmapHandle;
|
|
|
|
|
|
PVOID m_DiffBitmapData_Full;
|
2019-01-06 21:18:26 +08:00
|
|
|
|
ULONG CompareBitmap(LPBYTE CompareSourData, LPBYTE CompareDestData,
|
2019-01-05 20:21:43 +08:00
|
|
|
|
LPBYTE szBuffer, DWORD ulCompareLength);
|
2019-01-06 21:18:26 +08:00
|
|
|
|
VOID ScanScreen(HDC hdcDest, HDC hdcSour, ULONG ulWidth, ULONG ulHeight);
|
2019-01-10 19:35:03 +08:00
|
|
|
|
bool m_bZoomed; // <20><>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
double m_wZoom, m_hZoom; // <20><>Ļ<EFBFBD><C4BB><EFBFBD>ű<EFBFBD><C5B1><EFBFBD>
|
2019-01-05 20:21:43 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // !defined(AFX_SCREENSPY_H__5F74528D_9ABD_404E_84D2_06C96A0615F4__INCLUDED_)
|