Platform SDK: DirectX |
To set up the mouse device for data retrieval, first call the IDirectInputDevice7::SetDataFormat method with the c_dfDIMouse or c_dfDIMouse2 global variable as the parameter value. Use c_dfDIMouse2 if you want to support more than four mouse buttons.
For maximum performance in a full-screen application, set the cooperative level to DISCL_EXCLUSIVE | DISCL_FOREGROUND. The exclusive setting causes the Windows cursor to disappear. The DISCL_FOREGROUND setting causes the application to lose access to the mouse when you switch to a debugging window. Changing to DISCL_BACKGROUND allows you to debug the application more easily, at a cost in performance.
To set up the mouse device for data retrieval, first call the DirectInputDevice.SetCommonDataFormat method with DIFORMAT_MOUSE as the parameter value.
For maximum performance in a full-screen application, set the cooperative level to DISCL_EXCLUSIVE Or DISCL_FOREGROUND. The exclusive setting causes the Windows cursor to disappear. The DISCL_FOREGROUND setting causes the application to lose access to the mouse when you switch to the Visual Basic development environment. Changing to DISCL_BACKGROUND allows you to debug the application more easily, at a cost in performance.
The following sections give more information about getting and interpreting immediate and buffered mouse data: