how draw lines or squares with the mouse?

Hi!
I want know if someone know a way to programing a program that it has a window of openGL and in that window the user can draw lines or squares with the mouse.
The user should can prick the mouse in the window, and drahing the mouse, he can draw a line or a square. He too can move the object, picking in it and moving the mouse. In other words, the program should draw in the same way as Power Point. Is posseble do this in openGL?
Can someone give me a hand?
I should program in C++, and under windows98.
Excuse me for my very bad english.
Thanks!

It is certainly possible to use GL for the drawing portion of the code, but most of the functionality that you want has nothing to do with OpenGL. If you’re not familiar with user interface programming there are hundreds of books on the subject, and innumerable web sites as well.

Chris

You can certainly draw circles and lines using OpenGL. You just have to get the the mouse clicks on the screen and then compute this into coordinates, distances, vectors, etc. What you need to do is find a good OpenGL book.