第三章的p302页:
对OnIdle()函数的处理:BOOL CHellomfcApp::OnIdle(LONG lCount)
{
CMainFrame* pWnd = (CMainFrame*)m_pMainWnd;
pWnd->IdleTimeHandler(lCount); return TRUE;
}////////////////////////////////////////////////////////////////
void CMainFrame::IdleTimeHandler(unsigned long lCount)
{
CString str;
CRect rect(20,30,200,80);
CDC* pDC = new CClientDC(this); str.Format("%010d", lCount);
pDC->DrawText(str,&rect, DT_LEFT | DT_TOP);
}当lCount==9976 时,程序就退出了,为什么?
对OnIdle()函数的处理:BOOL CHellomfcApp::OnIdle(LONG lCount)
{
CMainFrame* pWnd = (CMainFrame*)m_pMainWnd;
pWnd->IdleTimeHandler(lCount); return TRUE;
}////////////////////////////////////////////////////////////////
void CMainFrame::IdleTimeHandler(unsigned long lCount)
{
CString str;
CRect rect(20,30,200,80);
CDC* pDC = new CClientDC(this); str.Format("%010d", lCount);
pDC->DrawText(str,&rect, DT_LEFT | DT_TOP);
}当lCount==9976 时,程序就退出了,为什么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货