Retrieves a history of up to 64 previous coordinates of the mouse or pen.
int GetMouseMovePointsEx( UINT cbSize, LPMOUSEMOVEPOINT lppt, LPMOUSEMOVEPOINT lpptBuf, int nBufPoints, DWORD resolution );
The size, in bytes, of the MOUSEMOVEPOINT structure.
A pointer to a MOUSEMOVEPOINT structure containing valid mouse coordinates (in screen coordinates). It may also contain a time stamp.
The GetMouseMovePointsEx function searches for the point in the mouse coordinates history. If the function finds the point, it returns the last nBufPoints prior to and including the supplied point.
If your application supplies a time stamp, the GetMouseMovePointsEx 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.
A pointer to a buffer that will receive the points. It should be at least cbSize* nBufPoints in size.
The number of points to be retrieved.
The resolution desired. This parameter can be one of the following values.
If the function succeeds, the return value is the number of points in the buffer. Otherwise, the function returns –1. For extended error information, your application can call GetLastError.
The system retains the last 64 mouse coordinates and their time stamps. If your application supplies a mouse coordinate to GetMouseMovePointsEx and the coordinate exists in the system's mouse coordinate history, the function retrieves the specified number of coordinates from the systems' history. You can also supply a time stamp, which will be used to differentiate between identical points in the history.
The GetMouseMovePointsEx function will return points that eventually were dispatched not only to the calling thread but also to other threads.
GetMouseMovePointsEx may fail or return erroneous values in the following cases:
- If negative coordinates are passed in the MOUSEMOVEPOINT structure.
- If GetMouseMovePointsEx retrieves a coordinate with a negative value.
- SM_CXVIRTUALSCREEN, and
int nVirtualWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN) ; int nVirtualHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN) ; int nVirtualLeft = GetSystemMetrics(SM_XVIRTUALSCREEN) ; int nVirtualTop = GetSystemMetrics(SM_YVIRTUALSCREEN) ; int cpt = 0 ; int mode = GMMP_USE_DISPLAY_POINTS ;
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||winuser.h (include Windows.h)|