How can I respond to a middle mouse click in C++/OpenGL?
I know it may have to do with the WM_MBUTTONDOWN
event however I am completely clueless with using it. I am also unfamiliar with callback functions so if it has to be used, can it be thoroughly explained? Can anyone show me how to implement the code for middle mouse click event?
You can try and implement the oldschool version with the
WM_
commands, but I think it'll be a lot easier to use GLUT (since it really makes life with OpenGL easier).If you're doing a simple app, GLUT will be sufficient. If you wanna do something more complicated, try freeglut or openglut. The old, basic GLUT doesn't handle the mouse wheel, so if you want to check for that - you'll need one of those two.