{I+=codeWee;} |
// The following result has error value. HRESULT result = m_mouse->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID)&m_mouseState); m_mouseX += m_mouseState.lX; m_mouseY += m_mouseState.lY; // So use this: POINT point; GetCursorPos(&point); ScreenToClient(hwnd, &point); m_mouseX = point.x; m_mouseX = point.y;