Using the Mouse

I have a float called “angleX” which I want to change with the mouse.
What I need to do is change this angle by clicking and holding the mouse button down then dragging from left to right. The more you drag, the more the angle will increase or decrease.
Anyone know what I need to do and how? At present I have a

glutMouseFunc(command_mouse);

line in main() and a

void command_mouse(int button, int state, int x, int y)

function. It only seems to recognise the first click though and not that it’s still held down and the mouse is moving.

Cheers

Check out glutMotionFunc()

Where do I get information on this function?

http://reality.sgi.com/mjk_asd/spec3/spec3.html Entry 7.6

Cheers guys that’s great