Something simple in OpenGL

I want to make a exe file with C++ including OpenGl library. All ok when i m running the exe but when i close the graphical environment that time the dos environment close also. I want to have a menu with tasks in black environment of C++ and everytime i want drawing i 'd like the graph window open, close and continue in home menu of dos environment.

That has nothing to do with GL.
For windows, you would just make a console project with main(). I think you need to call CreateWindow (I think GLUT works that way) and setup the pixel format, render with GL.
When the user want to close the window, just kill the window. Your console will continue to run.

int main()
   cout<<user doesnt want to make another window. Quitting.