void MapWindowPoints(hwndFrom, hwndTo, lppt, cPoints) | |||||
HWND hwndFrom; | /* handle of window to be mapped from | */ | |||
HWND hwndTo; | /* handle of window to be mapped to | */ | |||
LPPOINT lppt; | /* address of structure array with points to map | */ | |||
UINT cPoints; | /* number of structures in array | */ |
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.
hwndFrom
Identifies the window from which points are converted. If this parameter is NULL or HWND_DESKTOP, the points are assumed to be in screen coordinates.
hwndTo
Identifies the window to which points are converted. If this parameter is NULL or HWND_DESKTOP, the points are converted to screen coordinates.
lppt
Points to an array of POINT structures that contain the set of points to be converted. This parameter can also point to a RECT structure, in which case the cPoints parameter should be set to 2. The POINT structure has the following form:
typedef struct tagPOINT { /* pt */
LONG x;
LONG y;
} POINT;
The RECT structure has the following form:
typedef struct tagRECT { /* rc */
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT;
cPoints
Specifies the number of POINT structures in the array pointed to by the lppt parameter.
This function does not return a value.
ClientToScreen, ScreenToClient