Polling for mouse input gives you greater control over when input events are processed. However, if there is a long delay between polls this can increase latency.
Polling shows the accumulated events for deltas, so for raw position and scrolling data it will be the total mouse movement since your app started. To get the delta since the last poll, you must subtract the previous value from the current one.
Get the most recent screen position for the mouse pointer from the CoreWindow.PointerPosition property as shown in the following example.
C++
auto pointerPosition = CoreWindow::GetForCurrentThread()->PointerPosition;
// Process the new position.
Obtain the delta movement since the last poll as shown in the following example.
C++
MouseDelta _previousRawPosition;
MouseDelta currentDelta;
auto currentRawPosition = MouseDevice::GetForCurrentView()->MouseMovementDelta;
currentDelta.x = currentRawPosition.x - _previousRawPosition.x;
currentDelta.y = currentRawPosition.y - _previousRawPosition.y;
_previousRawPosition = currentRawPosition;
// Process delta since last poll.
Mouse Input
How to: Process Mouse Input Events
Input Technologies and Devices Overviews