User32MapWindowPoints(SafeHandle, SafeHandle, Rectangle, 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(
SafeHandle hWndFrom,
SafeHandle hWndTo,
out Rectangle refRect,
uint cPoints = 2
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function MapWindowPoints (
hWndFrom As SafeHandle,
hWndTo As SafeHandle,
<OutAttribute> ByRef refRect As Rectangle,
Optional cPoints As UInteger = 2
) As Integer
Dim hWndFrom As SafeHandle
Dim hWndTo As SafeHandle
Dim refRect As Rectangle
Dim cPoints As UInteger
Dim returnValue As Integer
returnValue = User32.MapWindowPoints(hWndFrom,
hWndTo, refRect, cPoints)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static int MapWindowPoints(
SafeHandle^ hWndFrom,
SafeHandle^ hWndTo,
[InAttribute] [OutAttribute] Rectangle% refRect,
unsigned int cPoints = 2
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member MapWindowPoints :
hWndFrom : SafeHandle *
hWndTo : SafeHandle *
refRect : Rectangle byref *
?cPoints : uint32
(* Defaults:
let _cPoints = defaultArg cPoints 2
*)
-> int
No code example is currently available or this language may not be supported.
- hWndFrom SafeHandle
-
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 SafeHandle
-
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.
- refRect Rectangle
-
A Rectangle structure, in which case the cPoints parameter should be set to 2.
- cPoints UInt32 (Optional)
-
The number of Point structures in the array pointed to by the refRect parameter.
This value should be always 2UI.
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.