I'd recommend chekcing the NeHe OpenGL tutorials. I'm pretty sure you will find answers there. There are also tutorials that handles mouse, if I remmeber correctly.
At all this is really not the perfect location for a OpenGL question. I'd recommend searching for a OpenGL forum. OpenGL may be also very complex, therefore a special OpenGL forum will be sure better.
With your particular question I'm sorry I can not help you.
Best regards
Bordon
Note: Posted code pieces may not have a good programming style and may not perfect. It is also possible that they do not work in all situations. Code pieces are only indended to explain something particualar.