procedure TForm1.Button1Click(Sender: TObject);
var
hCurrentWindow:HWND;
szText:array [0..254] of char;
begin
hCurrentWindow := GetWindow (Handle ,GW_HWNDFIRST);
if GetWindowText (hCurrentWindow ,@szText,255) >0 then
ListBox1.Items.Add (strpas(@szText));
while hCurrentWindow <> 0 do
begin
if GetWindowText (hCurrentWindow ,@szText,255) >0 then
ListBox1.Items.Add (strpas(@szText));
hCurrentWindow := GetWindow (hCurrentWindow ,GW_HWNDNEXT);
end;
end;
var
hCurrentWindow:HWND;
szText:array [0..254] of char;
begin
hCurrentWindow := GetWindow (Handle ,GW_HWNDFIRST);
if GetWindowText (hCurrentWindow ,@szText,255) >0 then
ListBox1.Items.Add (strpas(@szText));
while hCurrentWindow <> 0 do
begin
if GetWindowText (hCurrentWindow ,@szText,255) >0 then
ListBox1.Items.Add (strpas(@szText));
hCurrentWindow := GetWindow (hCurrentWindow ,GW_HWNDNEXT);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货