Microsoft DirectX 9.0 |
When you have set the cooperative level to DISCL_FOREGROUND and the focus switches to another application, Microsoft® Windows® might force your application to unacquire the keyboard. For this reason, you should check for the DIERR_INPUTLOST return value from the IDirectInputDevice8::GetDeviceData or IDirectInputDevice8::GetDeviceState methods and attempt to reacquire the keyboard, if necessary. (See Acquiring Devices.)