枚举当前所有窗口

回复 maxcool 的问题:
{要有个 Memo 接受数据}
procedure TForm1.Button1Click(Sender: TObject);
var
  h: HWnd;
  p: array[0..254] of char;
begin
  h := GetWindow(Handle, GW_HWNDFIRST);
  while h <> 0 do
  begin
    if GetWindowText(h, p, 255) > 0 then Memo1.Lines.Add(p);
    h := GetWindow(h, GW_HWNDNEXT);
  end;
end;

原文地址:https://www.cnblogs.com/del/p/1081295.html