Link to home
Start Free TrialLog in
Avatar of nyt
nyt

asked on

Get the title of a window by its handle

Hi,
How can I get the title of a window if I know the handle of that window?  Maybe GetWindowText can help, but I don't know the way to use it...Can anyone show me how to use it?

Thx.
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Hello

yes you are right, you can use GetWindowText, it's easy to use


procedure TForm1.Button1Click(Sender: TObject);
var
  s : pchar;
begin
  GetWindowText(handle,s,255);
  showmessage(s);
end;

Best regards
Mohammed
ASKER CERTIFIED SOLUTION
Avatar of Igor UL7AAjr
Igor UL7AAjr
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oops

you are right Igor, i made that in fly