Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function retrieves the handle to the window that contains the specified point.

Syntax

HWND WindowFromPoint( 
  POINT 
Point 
); 

Parameters

Point

[in] Specifies a POINTstructure that defines the point to be checked.

Return Value

A handle to the window that contains the point indicates success. NULL indicates that no window exists at the specified point. A handle to the window under the static text control indicates that the point is over a static text control.

Remarks

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

Requirements

Header winuser.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also