Using a Mouse

Hi I want to incorporate a mouse into my programs is there a simple way of doing this?

Is there any examples anywhere?

Thanks alot

You have a few options. If you are using GLUT, it supports stuff with the mouse.

If you are coding in a Windows environment, you could handle the WM_MOUSEMOVE message along with its other variants. Or you could use DirectInput from DirectX.

Not sure what your options would be for Linux , Mac, or other platforms.

SL

yes, there is a way to do it without glut or directx. In the nehe tutorials is an easy way to do this with the Win API!

(it’s the tutorial with direct input i think)
http://nehe.gamedev.net