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.
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.