VS C++ MFC Application Exit Code

  • Thread starter Thread starter Bryan C_
  • Start date Start date
B

Bryan C_

Guest
What is the best way to set the exit code value when exiting a C++ MFC Windows application (such as from the main menu)? Is it appropriate to call the ExitProcess() function? If so, where (in general) is the correct place to call the function so that the MFC application exits correctly (.i.e all windows are propertly destroyed and all class object destructors are properly called, etc.)?

On a side note, what is the best way to access the application's exit code after the application exits? Especially in the case of launching the windows application from the DOS command prompt (or within a batch file).

Continue reading...
 
Back
Top