Sign in to follow this  

Mouse input

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

Dear Thread reader, My litle game engine needed some input so I wrote an input class. Its a very simple one that uses getkeyboardstate and getcursorpos. But now I want to be able to add scroll wheel and mouse button suport. I don't have acces to the HWND of the game so I can't use the window messages and I can't seem te find a mouse counter part for getkeyboardstate. Is there such a function or is there an other way to do this? Tjaalie,

Share this post


Link to post
Share on other sites
Sure you have access to the HWND. Just use GetCapture. Because you're already using GetKeyboardState this won't make it any less portable than it currently is. If you want it to be more portable, you should probably put a wrapper for your input that your engine uses, where you can hide HWND, GetKeyboardState, etc.

Share this post


Link to post
Share on other sites

This topic is 3725 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this