IsWindowTopMost

From SCAR Divi Manual
Revision as of 13:21, 7 August 2012 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function IsWindowTopMost(const Wnd: Hwnd): Boolean; </source> ==Availability== SCAR Divi 3.35 > Current ==Description== Ret...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

function IsWindowTopMost(const Wnd: Hwnd): Boolean;

Availability

SCAR Divi 3.35 > Current

Description

Returns true if the window specified by it's handle in Wnd exists and is in a topmost (, not foreground) position on the desktop.

Example

var
  Wnds: THwndArray;
 
begin
  Wnds := FindWindowsEx(GetDesktopWindow, 'notepad', '', False, False, True);  
  if Length(Wnds) > 0 then
  begin
    WriteLn(IsWindowTopMost(Wnds[0]));
    SetWindowTopMost(Wnds[0], True);
    WriteLn(IsWindowTopMost(Wnds[0]));
  end;
end.

See Also