Jump to content
  • Advertisement

Archived

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

pyro1245

mouse coordinates?

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

Advertisement
The input side of things is handled by the OS interface API you are using - win32 API, SDL, etc

Some of the nehe tuts use mouse input so you could learn from them. nehe uses win32 API, but there are many alternatives. Direct Input or win32 API are generally used by windows-only coders, and SDL by others.

Overall I''d use the win32 stuff if you''re on windows and want a quick hack to make it work, or SDL if you''re willing to invest a little time - SDL does lots of very useful things very well on most platforms. check out www.libsdl.org

Share this post


Link to post
Share on other sites
POINT point;

GetCursorPos(&point);

point.x;
point.y;

This is the location of the actual cursor in x and y. Remember, the coordinates relative from the top left, not the bottom left.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!