Jump to content
  • Advertisement
Sign in to follow this  
_dogo

mouse position in C++/OpenGL

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

hi. i have problems with my win-application's WindowProc() method, and cannot use it for getting mouse position. Is there any other way for getting the x,y coordinates? some globals, or something... thx

Share this post


Link to post
Share on other sites
Advertisement
Have you tried GetCursorPos?

POINT mouse_point;
GetCursorPos(&mouse_point);

mouse_point.x;
mouse_point.y;


You best read this for any problems with it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/cursors/cursorreference/cursorfunctions/getcursorpos.asp

Share this post


Link to post
Share on other sites
i have seen this but i thought it is a directx function. i dont know why. i can see now it is not true.
i tried it and its better than my own get() func. i have hope again :)

Share this post


Link to post
Share on other sites
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!