Refactor: split ScanScreen window-capture into 3 private methods

This commit is contained in:
yuanyuanxiang
2026-06-16 21:02:46 +02:00
parent 91d4c0a523
commit 66c950cecb
2 changed files with 104 additions and 97 deletions

View File

@@ -266,6 +266,14 @@ public:
m_hDeskTopDC = GetDC(NULL);
m_data.Create(m_hDeskTopDC, m_iScreenX, m_iScreenY, m_ulFullWidth, m_ulFullHeight);
}
private:
// 前景跟踪:切换或尺寸变化时更新 m_hTargetWnd返回 false 表示本帧冻结
bool UpdateDynamicForeground();
// 防抖 + 重建检测:更新 m_iScreenX/Y返回 false 表示本帧冻结
bool CheckWindowResize();
// 执行实际像素拷贝BitBlt 或 PrintWindow
void CaptureWindowContent(HDC hdcDest, HDC hdcSour, ULONG ulWidth, ULONG ulHeight);
};
#endif // !defined(AFX_SCREENSPY_H__5F74528D_9ABD_404E_84D2_06C96A0615F4__INCLUDED_)