If you wanted to override the closing of an application in MFC such that when the user clicks to close the program, it hesitates until other threads are closed, how would you do it. In other words, if the user clicks on the red X in the upper right hand of the program, it does not close right away. How would you override this functionality?