1. OnPaint()与OnDraw()函数的区别:
在VIEWCORE.CPP文件176行:
void CView::OnPaint()
{
// standard paint routine
CPaintDC dc(this);
OnPrepareDC(&dc);
OnDraw(&dc);
}
410行:
void CView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
{
ASSERT_VALID(pDC);
UNUSED(pDC); // unused in release builds
// Default to one page printing if doc length not known
if (pInfo != NULL)
pInfo->m_bContinuePrinting =
(pInfo->GetMaxPage() != 0xffff || (pInfo->m_nCurPage == 1));
}
在VIEWCORE.CPP文件176行:
void CView::OnPaint()
{
// standard paint routine
CPaintDC dc(this);
OnPrepareDC(&dc);
OnDraw(&dc);
}
410行:
void CView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo)
{
ASSERT_VALID(pDC);
UNUSED(pDC); // unused in release builds
// Default to one page printing if doc length not known
if (pInfo != NULL)
pInfo->m_bContinuePrinting =
(pInfo->GetMaxPage() != 0xffff || (pInfo->m_nCurPage == 1));
}