void ScreenToClient(hWnd,lpPoint)
This function converts the screen coordinates of a given point on the display to client coordinates. The ScreenToClient function uses the window given by the hWnd parameter and the screen coordinates given in the POINT data structure pointed to by the lpPoint parameter to compute client coordinates, and then replaces the screen coordinates with the client coordinates. The new coordinates are relative to the upper-left corner of the given window's client area.
Parameter | Type/Description |
hWnd | HWND Identifies the window whose client area will be used for the conversion. | |
lpPoint | LPPOINT Points to a POINT data structure that contains the screen coordinates to be converted. |
None.
The ScreenToClient formula assumes the given point is in screen coordinates.