xtd 0.2.0
Loading...
Searching...
No Matches

◆ from_child_handle()

static std::optional< control_ref > xtd::forms::control::from_child_handle ( intptr  handle)
static

Retrieves the control that contains the specified handle.

Parameters
handleThe window handle (HWND) to search for.
Returns
The control 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 parent chain until it finds a handle that is associated with a control. This method is more reliable than the from_handle method, because it correctly returns controls that own more than one handle.