[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

FindLCLWindow

Find the window and its owning control at the given screen coordinates.

Declaration

Source position: controls.pp line 2742

function FindLCLWindow(

  const ScreenPos: TPoint;

  AllowDisabled: Boolean = True

):TWinControl;

Arguments

ScreenPos

  

TPoint with the screen coordinates examined in the routine.

AllowDisabled

  

Allows a disabled window to be returned.

Function result

The control that owns the window at the specified screen position; Nil when a window is not found.

Description

FindLCLWindow is a TWinControl function used to find the window (and its owner control) at the specified screen coordinates.

FindLCLWindow gets the Handle for the window and checks to ensure it is enabled. When it is not enabled, or AllowDisabled is False, parent handles are examined until a suitable window is located. FindOwnerControl is called for the handle to get the return value. The return value is Nil if a Window was not found at the specified position.


Version 3.2 Generated 2024-02-25 Home