Archived

This topic is now archived and is closed to further replies.

direct x again

This topic is 5652 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

i followed every set in the book opengl game programming to setup directx and nothing happened. just to make sure i''m doing it right how do you get the mouse position?.

Share this post


Link to post
Share on other sites
DirectInput does not log mouse positions, rather it logs change from the last time you polled it. You might use


  
BOOL SetWindowText(
HWND hWnd, // handle to window or control

LPCTSTR lpString // address of string

);


to output the changes in your mouse position to your windows title bar.

Share this post


Link to post
Share on other sites
in the book it does this

DIMOUSESTATE m_state;

void GetMovement(int &dx, int &dy) { dx = m_state.lX; dy = m_state.lY; }

it work''s in the project on the cd but when i tried it in my project nothing happend. i copied everything directx to my project but i can''t get it to work?

Share this post


Link to post
Share on other sites