Archived

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

mouse coordinates?

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

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