ScreenToClient
This function converts the screen coordinates of a specified point on the screen to client coordinates.
BOOL ScreenToClient(
HWND hWnd,
LPPOINT lpPoint
);
Parameters
- hWnd
Handle to the window whose client area will be used for the conversion. - lpPoint
Long pointer to a POINT structure that contains the screen coordinates to be converted.
Return Values
Nonzero indicates success. Zero indicates failure.
To get extended error information, call GetLastError.
Remarks
The function uses the window identified by the hWnd parameter and the screen coordinates given in the POINT structure to compute client coordinates. It then replaces the screen coordinates with the client coordinates. The new coordinates are relative to the upper-left corner of the specified windows client area.
The ScreenToClient function assumes the specified point is in screen coordinates.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Winuser.h | Coredll.lib, Winmgr.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
ClientToScreen, GetLastError, MapWindowPoints, POINT
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.