Control.fromChildHandle

Overview | Methods | Fields | This Package | All Packages

Control.fromChildHandle

Returns the control that contains the specified handle.

Syntax

public static final Control fromChildHandle( int handle )

Parameters

handle

The window handle (HWND) to search for.

Return Value

Returns a Control object that represents the control associated with the specified handle; returns null if no control with the specified handle is found.

Remarks

This method searches up the window handle (HWND) parent chain until it finds a handle that is associated with a control. This method is more robust than the fromHandle method because it correctly returns controls that own more than one handle.