Mega Code Archive
Is a window a top-level window
Q:
I need a way to figure out if a window is a top level window or not. Is
there any way to do this?
A:
Check the parent handle as shown below:
function IsWindowTopLevel(W : Hnd) : Boolean;
begin
Result := (Windows.GetParent(W) = 0);
end;