回复 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;

posted on 2008-02-25 21:19  万一  阅读(12651)  评论(24编辑  收藏  举报