当前进程客户区的整体和局部保存为位图都实现了,
void SaveClientToCBitmap(HWND hwnd,int width,int height,int x,int y)
{
CDC pdc;
CDC *pcdc=CDC::FromHandle(GetDC(hwnd));
pdc.CreateCompatibleDC(pcdc);
CBitmap bmp;
CRect rc;
bmp.CreateCompatibleBitmap(pcdc,width,height);
pdc.SelectObject(&bmp);
pdc.BitBlt(0,0,width,height,(CDC*)pcdc,x,y,SRCCOPY);
}
通过SPY++找到远程进程的名称,用FindWindow返回远程进程的句柄替换hwnd,保存的还是当前进程客户区的图像。
------解决方案--------------------------------------------------------
无人回复,我怎么结贴啊