From 954ead41d9391bca28a3cc4f9592f73f25b3bbc8 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 02 一月 2023 17:55:06 +0800 Subject: [PATCH] '完善批量设置代码' --- ConsoleApplication/CaptureUtil.cpp | 23 ++++------------------- 1 files changed, 4 insertions(+), 19 deletions(-) diff --git a/ConsoleApplication/CaptureUtil.cpp b/ConsoleApplication/CaptureUtil.cpp index 1b28294..ecabc42 100644 --- a/ConsoleApplication/CaptureUtil.cpp +++ b/ConsoleApplication/CaptureUtil.cpp @@ -56,26 +56,11 @@ tempL2.push_back(frameInfo); } else { - //查找第一个子元素 - HWND temp = FindWindowEx(frameInfo.frame, NULL,NULL, NULL); - RECT tempRect; - GetWindowRect(temp, &tempRect); - - while (!IsWindowVisible(temp) || tempRect.right- tempRect.left<100) { - temp= FindWindowEx(frameInfo.frame, temp, NULL, NULL); - GetWindowRect(temp, &tempRect); + + if (frameInfo.position.bottom - frameInfo.position.top < 100 && frameInfo.position.bottom - frameInfo.position.top >40) + { + tempTrade.push_back(frameInfo); } - - HWND tempc = FindWindowEx(temp, NULL, NULL, NULL); - tempc = FindWindowEx(temp, tempc, NULL, NULL); - - tempc = FindWindowEx(tempc, NULL, TEXT("SysListView32"), NULL); - GetWindowRect(tempc, &tempRect); - FrameInfo tempFrame = FrameInfo(); - tempFrame.frame = tempc; - tempFrame.position = tempRect; - - tempTrade.push_back(tempFrame); } } //排序 -- Gitblit v1.8.0