DelphiDabbler Code Snippets Database

Snippet Selection

The following snippets from the Code Snippets Database have been requested.

GetWindowTitle

Returns the title of the window with the given handle. Titles of more than 255 characters are truncated.

function GetWindowTitle(Wnd: Windows.HWND): string;
var
  Title: array[0..255] of Char;
begin
  Windows.GetWindowText(Wnd, Title, Length(Title));
  Result := Title;
end;

View the whole database.

Go to the DelphiDabbler website.