SetWindowText

From SCAR Divi Manual
Revision as of 13:52, 21 November 2012 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> procedure SetWindowText(const Wnd: Hwnd; const Text: string); </source> ==Availability== SCAR Divi 3.35 > Current ==Descrip...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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