Jump to content
  • Advertisement
Sign in to follow this  
BladeStone

Mouse & Framework

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

If this is misposted, I apologies. Please let me know where this goes if it doesn't belong under this topic. I'm trying to find the core commands to recieve input from the mouse. The problem I'm having is the core commands are buried in the frame work of what I use. For example, SDL, Micrsoft, GLUT, and other, they all use the mouse, but they have their own commands to test mouse events, but how to I get direct access to the mouse. Thank you in advance, BladeStone

Share this post


Link to post
Share on other sites
Advertisement
If by "core commands" you mean low-level hardware access, Then this is not possible in Windows, Unless you write you own custom driver.
And why do you need that if I may ask?

Share this post


Link to post
Share on other sites
Easiest is to subclass the main window class and look at the mouse move messages that come in. An alternative would be to add handlers for the raw mouse input API. MSDN has more information -- use the search field!

Share this post


Link to post
Share on other sites
Why do I need low-level hardware access?

Good question, it's more of a preferance then a need. I've worked with operating systems and programming languages which are always updating and changing from one version to another and I tire of going back over my code to find out why working code is now not working with the new versions. If I'm not being paid to do that for fourty plus hours a week, then I don't want to be hassled by it. Second, I like to understand more then what's allowed through a wizywig. If I need to learn to make drivers, so be it.

MSDN has more information -- use the search field!

Thats good to know, I'll see what they have.

----

This leads me to my second question, with the keyboard, I can capture keystrokes either as a single key or as multiple keys and wait for the enter key. Is there a standard C++ command which does the same for the mouse as the standard C commands getch(); or getche(); ?

Thank you,
BladeStone, (playing in the weeds of a coding playground) :)

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!