how to cancel the closing of an application
-
When I click on the application window's Close X button, it calls my OnClose method. In OnClose, I prompt the user to save the data before closing the application. If the user cancels, I would like the application to remain open as in Microsoft Word, Excel, etc. How do I go about doing this? Thanks.
-
When I click on the application window's Close X button, it calls my OnClose method. In OnClose, I prompt the user to save the data before closing the application. If the user cancels, I would like the application to remain open as in Microsoft Word, Excel, etc. How do I go about doing this? Thanks.
don't call the base method, and if the function returns a boolean, return true ( which tells the system you've handled the message, no further processing required ). Christian Graus - Microsoft MVP - C++
-
When I click on the application window's Close X button, it calls my OnClose method. In OnClose, I prompt the user to save the data before closing the application. If the user cancels, I would like the application to remain open as in Microsoft Word, Excel, etc. How do I go about doing this? Thanks.