Determines which, if any, of the child windows belonging to the specified parent window contains the specified point. The function can ignore invisible, disabled, and transparent child windows. The search is restricted to immediate child windows. Grandchildren and deeper descendants are not searched.
HWND ChildWindowFromPointEx( HWND hwnd, POINT pt, UINT flags );
A handle to the parent window.
A structure that defines the client coordinates (relative to hwndParent) of the point to be checked.
The child windows to be skipped. This parameter can be one or more of the following values.
||Does not skip any child windows|
||Skips disabled child windows|
||Skips invisible child windows|
||Skips transparent child windows|
Type: Type: HWND
The return value is a handle to the first child window that contains the point and meets the criteria specified by uFlags. If the point is within the parent window but not within any child window that meets the criteria, the return value is a handle to the parent window. If the point lies outside the parent window or if the function fails, the return value is NULL.
The system maintains an internal list that contains the handles of the child windows associated with a parent window. The order of the handles in the list depends on the Z order of the child windows. If more than one child window contains the specified point, the system returns a handle to the first window in the list that contains the point and meets the criteria specified by uFlags.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||winuser.h (include Windows.h)|