Mouse Libraries

I am trying to manipulate the viewpoint according to the mouse movement. Does anyone have any suggestions? Currently I am using gluLookAt(…) and simply changing the values as the glutMotionFunc(…) reads input. The problem though, is that the glutMotionFunc(…) doesn’t seem to care which of the mouse buttons is being held down. Ideally the left mouse hold would change the x axis, and the right mouse hold would change y values.

Finally, does anyone know how to get GL to read the scroll wheel? I want the z-axis to be zoomed in and out on the basis of the mouse wheel.

Any suggestions would be much appreciated.