The MapWindowPoints function converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
int MapWindowPoints(
HWND hWndFrom, // handle of window to be mapped from
HWND hWndTo, // handle to window to be mapped to
LPPOINT lpPoints, // pointer to array with points to map
UINT cPoints // number of structures in array
);
If the function succeeds, the low-order word of the return value is the number of pixels added to the horizontal coordinate of each source point in order to compute the horizontal coordinate of each destination point; the high-order word is the number of pixels added to the vertical coordinate of each source point in order to compute the vertical coordinate of each destination point.
If the function fails, the return value is zero.
Windows NT: To get extended error information, call GetLastError.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Coordinate Spaces and Transformations Overview, Coordinate Space and Transformation Functions, ClientToScreen, POINT, RECT, ScreenToClient