Jump to content
  • Advertisement
Sign in to follow this  
Tjaalie

Mouse input

This topic is 4010 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
Advertisement
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
Sign in to follow this  

  • 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!