Does anyone know how to close an application programmatically (kinda like AfxAbort() but without the ugly error message)?
Does anyone know how to close an application programmatically (kinda like AfxAbort() but without the ugly error message)?
By calling the exit function.
"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens
yes, that works, but it causes memory leaks when closing the app. I was so stupid!! All I had to do was call my CMainFrame's OnClose() function. Thanks for your help, though!!
That sounds suspiciously to me like an event handler, or something you would atexit(). Are these memory leaks anything more than you just not cleaning up your malloc'ed memory?