3 Button mouse control rotating, pan and zooming

Hi, I am new to openGL. I wanna use 3 bottom mouse to control 3 functions, rotate, pan and zoom. Anyone can suggest a code or when i can get doc.
Thank