Okay, I have a main window that is created on startup. Then with the press of a button, it goes into a dialog box to do everything, etc. But, I want to have an option in the menu of the dialog box to EXIT the whole program. How would I do this? What would the code be to destroy the main window and exit the program all from the dialog box?

Thanks!