关键地方
1、::SetCapture(this->m_hWnd);ReleaseCapture();
2、::GetDC(NULL);获得屏幕DC
COLORREF crtTMPColor;
CRect rect;
HDC hDC;
hDC = ::GetDC(NULL);
::GetWindowRect(this->m_hWnd, &rect);
crtTMPColor = GetPixel(hDC, (point.x+rect.left), (point.y+rect.top));
::ReleaseDC(NULL, hDC);
SetColor(crtTMPColor);
运行后截图,小巧适用
源码下载地址
链接:https://pan.baidu.com/s/1fjGAk89DTE1cHB98k-q0xw
提取码:10tz
或者
https://download.csdn.net/download/qq_23927175/11103430