opengl close event

I have an opengl game. I'm am trying to make this as cross-platform as possible because I want to sell this game. Is there an opengl event will be called when the user clicks the close button?
For GLUT http://www.opengl.org/resources/faq/technical/glut.htm#glot0070
I think exit will call the destructors of only the global variables.
I want to ask the user if he or she wants to exit. I want the user to have a chance to cancel the close.
Topic archived. No new replies allowed.