基本上改动不大。这样改动的优点是,主线程有了空闲时间处理
[pre]
BOOL CMyApp::InitInstance()
{
……
CMyDlg * pDlg=new CMyDlg;
m_pMainWnd = pDlg;
return pDlg->Create();
}
void CMyDlg ::OnClose()
{
if (CanExit()){
DestroyWindow();
delete this;
AfxPostQuitMessage(0);
}
}
[/pre]
No comments:
Post a Comment