SetWindowText

From SCAR Divi Manual
Jump to: navigation, search

Definition

procedure SetWindowText(const Wnd: Hwnd; const Text: string);

Availability

SCAR Divi 3.35 > Current

Description

Sets the title/text of a window specified in Wnd to Text if the window exists.

Example

var
  Wnds: THwndArray;    
  Idx, Len: Integer;

begin
  Wnds := FindWindowsEx(GetDesktopWindow, 'notepad', '', False, False, True);  
  Len := Length(Wnds);
  for Idx := 0 to Len - 1 do
    SetWindowText(Wnds[Idx], 'Hello World!');
end.

See Also