The sample includes code for the mouse. Setup for the mouse is very similar to the key board. There
are two dataformat types for the mouse: c_dfDIMouse
and c_dfDIMouse2
c_dfDIMouse
returns a DIMOUSESTATE structure which has 4 bytes for button states.c_dfDIMouse2
returns a DIMOUSESTATE2 structure that has 8 bytes for button states.
In both the immediate and buffer mode the GetDeviceState initializes these structures.
hr = g_pMouse->GetDeviceState( sizeof(DIMOUSESTATE2), &dims2 );
Comments