User32MapWindowPoints(IntPtr, IntPtr, NativePoint, UInt32) Method
Converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static int MapWindowPoints(
IntPtr hWndFrom,
IntPtr hWndTo,
out NativePoint refPoint,
uint cPoints
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function MapWindowPoints (
hWndFrom As IntPtr,
hWndTo As IntPtr,
<OutAttribute> ByRef refPoint As NativePoint,
cPoints As UInteger
) As Integer
Dim hWndFrom As IntPtr
Dim hWndTo As IntPtr
Dim refPoint As NativePoint
Dim cPoints As UInteger
Dim returnValue As Integer
returnValue = User32.MapWindowPoints(hWndFrom,
hWndTo, refPoint, cPoints)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static int MapWindowPoints(
IntPtr hWndFrom,
IntPtr hWndTo,
[InAttribute] [OutAttribute] NativePoint% refPoint,
unsigned int cPoints
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member MapWindowPoints :
hWndFrom : IntPtr *
hWndTo : IntPtr *
refPoint : NativePoint byref *
cPoints : uint32 -> int
No code example is currently available or this language may not be supported.
- hWndFrom IntPtr
-
A handle to the window from which points are converted.
If this parameter is Zero or HWND_DESKTOP, the points are presumed to be in screen coordinates.
- hWndTo IntPtr
-
A handle to the window to which points are converted.
If this parameter is Zero or HWND_DESKTOP, the points are converted to screen coordinates.
- refPoint NativePoint
-
A pointer to an array of NativePoint structures that contain the set of points to be converted.
The points are in device units.
- cPoints UInt32
-
The number of NativePoint structures in the array pointed to by the refPoint parameter.
Int32
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.
(In addition to that, if precisely one of
hwndFrom and
hwndTo is mirrored,
then each resulting horizontal coordinate is multiplied by -1.)
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
0.