Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WindowFromPoint function

Retrieves a handle to the window that contains the specified point.

Syntax


HWND WINAPI WindowFromPoint(
  _In_ POINT Point
);

Parameters

Point [in]

Type: POINT

The point to be checked.

Return value

Type:

Type: HWND

The return value is a handle to the window that contains the point. If no window exists at the given point, the return value is NULL. If the point is over a static text control, the return value is a handle to the window under the static text control.

Remarks

The WindowFromPoint function does not retrieve a handle to a hidden or disabled window, even if the point is within the window. An application should use the ChildWindowFromPoint function for a nonrestrictive search.

Examples

For an example, see "Interface from Running Object Table" in About Text Object Model.

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
ChildWindowFromPoint
Conceptual
Windows
Other Resources
POINT
WindowFromDC

 

 

Show:
© 2017 Microsoft