MapWindowPoints
This function converts, or 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,
HWND hWndTo,
LPPOINT lpPoints,
UINT cPoints
);
Parameters
- hWndFrom
Handle to the window from which points are converted. If this parameter is NULL or HWND_DESKTOP, the points are presumed to be in screen coordinates. - hWndTo
Handle to the window to which points are converted. If this parameter is NULL or HWND_DESKTOP, the points are converted to screen coordinates. - lpPoints
Long pointer 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. - cPoints
Specifies the number of POINT structures in the array pointed to by the lpPoints parameter.
Return Values
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.
Zero indicates failure.
To get extended error information, call GetLastError.
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, ScreenToClient, POINT, RECT
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.