Export (0) Print
Expand All
Expand Minimize

ChildWindowFromPointEx function

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.

Syntax


HWND WINAPI ChildWindowFromPointEx(
  _In_  HWND hwndParent,
  _In_  POINT pt,
  _In_  UINT uFlags
);

Parameters

hwndParent [in]

Type: HWND

A handle to the parent window.

pt [in]

Type: POINT

A structure that defines the client coordinates (relative to hwndParent) of the point to be checked.

uFlags [in]

Type: UINT

The child windows to be skipped. This parameter can be one or more of the following values.

ValueMeaning
CWP_ALL
0x0000

Does not skip any child windows

CWP_SKIPDISABLED
0x0002

Skips disabled child windows

CWP_SKIPINVISIBLE
0x0001

Skips invisible child windows

CWP_SKIPTRANSPARENT
0x0004

Skips transparent child windows

 

Return value

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.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
WindowFromPoint
Conceptual
Windows
Other Resources
POINT

 

 

Community Additions

ADD
Show:
© 2014 Microsoft