Article ID: 117320 - Last Review: November 21, 2006 - Revision: 3.1 How to Programatically Terminate an MFC ApplicationThis article was previously published under Q117320 SUMMARY
Under certain conditions, you may want to terminate an MFC application
programatically. MFC does not provide a public function to gracefully exit
an application.
MORE INFORMATION
A method for dealing with this is to create a function in your application
like the following:
If you are using MFC, version 2.5 or later, you can take advantage of a new global MFC function, "AfxGetMainWnd", to simplify the code: APPLIES TO
| Article Translations
|

Back to the top
