Jump to content
  • Advertisement
Sign in to follow this  

a problem with handling mouse movement in dxut

This topic is 4527 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have got a weired (and most probably stupid)problem: when I run my dxut project (modified from the simplest "EmptyProject"), the mouse movement responds well in windowed mode, but fails in full screen mode. My implementation is to calculate the mouse offset with the camera: LRESULT CModelViewerCamera::HandleMessages( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { CBaseCamera::HandleMessages( hWnd, uMsg, wParam, lParam ); ... if( uMsg == WM_MOUSEMOVE ) { int iMouseX = (short)LOWORD(lParam); int iMouseY = (short)HIWORD(lParam); m_mouseMoveX = iMouseX - m_prevMouseX; m_mouseMoveY = iMouseY - m_prevMouseY; m_prevMouseX = iMouseX; m_prevMouseY = iMouseY; m_WorldArcBall.OnMove( iMouseX, iMouseY ); m_ViewArcBall.OnMove( iMouseX, iMouseY ); } ... } I can correctly retrieve m_mouseMoveX and m_mouseMoveY (variables I add to camera class) in my frame render code from the g_Camera in windowed mode. However, when I toggle to the full screen, m_mouseMoveX and m_mouseMoveY become zero almost all the time. Could anyone help me solve the problem? Thanks a lot!!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!