您的位置:首页 > 其它

枚举当前所有窗口

2008-02-25 21:19 295 查看
回复 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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: