I've heard somewhere that it's possible to use the wheel button by comparing the button variable to (3 / 4), but it seems that no events are triggered whenever i spin the wheel button.
what am i doing wrong here? i'm trying to avoid freeglut.
Asked
Active
Viewed 133 times
0
-
Did you do it like illustrated in the first answer [here](http://stackoverflow.com/questions/14378/using-the-mouse-scrollwheel-in-glut) – niktehpui Mar 26 '12 at 20:05
-
i reviewed @BentFX answer, but nothing happens when i roll the wheel button, i even tried to put a break point at the beginning of the MouseFunc() function, still nothing happened. – igal k Mar 26 '12 at 20:15
-
i also reviewed the following link : http://www.realmtech.net/opengl/glut.php but couldn't understand how to apply the 'patch' command on windows – igal k Mar 26 '12 at 21:46
-
Why are you trying to avoid FreeGLUT? It's the only distro of GLUT that's still being supported; it's the only distro of GLUT that you should ever *use*. – Nicol Bolas Mar 29 '12 at 21:42
1 Answers
0
If you want to use the middle button, you can try GetAsyncKeyState()
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293(v=vs.85).aspx
Example:
//Test if middle mouse button is pressed
if(GetAsyncKeyState(4)<-30000){
//do something
}

Gabriel Salla
- 103
- 1
- 8