I have a problem regard OpenGL. Hope someone can help me pls.

Because in my main program, i called up a Dialog Box with a Button when clicked, it will show the 2 windows. However, after i closed the 2 windows, it will terminate my program directly instead of going back to the main program to continue with the program. Is there any command i should include after "glutMainLoop();" to let it loop back to the main?

understand that in OpenGL, glutMainLoop is giving some infinitely looping and has hence been avoid... i jus found out that i can use glutCheckLoop.

however it onli works in dos mode... what should i change to let it works in window application? (dialog box)

thanks alot