User32GetMouseMovePointsEx Method

Retrieves a history of up to 64 previous coordinates of the mouse or pen.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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 GetMouseMovePointsEx(
	uint mouseMovePointSize,
	ref MouseMovePoint refMouseMovePoint,
	MouseMovePoint[] buffer,
	int bufferPoints,
	GetMouseMovePointsResolution resolution
)

Parameters

mouseMovePointSize  UInt32
The size, in bytes, of the MouseMovePoint structure.
refMouseMovePoint  MouseMovePoint
A pointer to a MouseMovePoint structure containing valid mouse coordinates (in screen coordinates). It may also contain a time stamp.

The GetMouseMovePointsEx(UInt32, MouseMovePoint, MouseMovePoint, Int32, GetMouseMovePointsResolution) function searches for the point in the mouse coordinates history.

If the function finds the point, it returns the last bufferPoints prior to and including the supplied point.

If your application supplies a time stamp, the GetMouseMovePointsEx(UInt32, MouseMovePoint, MouseMovePoint, Int32, GetMouseMovePointsResolution) function will use it to differentiate between two equal points that were recorded at different times.

An application should call this function using the mouse coordinates received from the WM_MouseMove message and convert them to screen coordinates.

buffer  MouseMovePoint
A pointer to a buffer that will receive the points. It should be at least mouseMovePointSize * bufferPoints in size.
bufferPoints  Int32
The number of points to be retrieved.
resolution  GetMouseMovePointsResolution
The resolution desired.

Return Value

Int32
If the function succeeds, the return value is the number of points in the buffer. Otherwise, the function returns –1.

Remarks

See Also