1,183
社区成员
发帖
与我相关
我的任务
分享
type
PEnumInfo = ^TEnumInfo;
TEnumInfo = record
ProcessID: DWORD;
HWND: THandle;
end;
function EnumWindowsProc(Wnd: DWORD; var EI: TEnumInfo): Bool; stdcall;
var
PID: DWORD;
begin
GetWindowThreadProcessID(Wnd, @PID);
Result := (PID <> EI.ProcessID);
// (not IsWindowVisible(WND)) or
// (not IsWindowEnabled(WND)) or
// (not IsIconic(WND));
if not Result then
EI.HWND := WND;
end;