MFC应用程序干净利落的正确方法是什么?
AfxGetMainWnd()->PostMessage(WM_CLOSE);
以编程方式终止MFC应用程序
void ExitMFCApp() { // same as double-clicking on main window close box ASSERT(AfxGetMainWnd() != NULL); AfxGetMainWnd()->SendMessage(WM_CLOSE); }
http://support.microsoft.com/kb/117320