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

FindOwnerControl

Returns the TWinControl for the given Handle; the parent control for a non-TWinControl Handle.

Declaration

Source position: controls.pp line 2734

function FindOwnerControl(

  Handle: HWND

):TWinControl;

Description

Handle can also be a child handle (of a TControl), in which case the returned control is the parent of the desired control. Parent, not Owner as suggested by the function name!

Remark: The function recursively tries GetParent(Handle), so the result depends on the implementation (meaning) of a parent handle.

Version 4.0 Generated 2025-05-03 Home