다음을 통해 공유


CPrintInfo::SetMaxPage

Call this function to specify the number of the last page of the document.

void SetMaxPage(
   UINT nMaxPage 
);

Parameters

  • nMaxPage
    Number of the last page of the document.

Remarks

This value is stored in the CPrintDialog object referenced by the m_pPD member. If the length of the document is known before it is printed, call this function from your override of CView::OnPreparePrinting. If the length of the document depends on a setting specified by the user in the Print dialog box, call this function from your override of CView::OnBeginPrinting. If the length of the document is not known until it is printed, use the m_bContinuePrinting member to control the print loop.

Example

See the example for CView::OnPreparePrinting.

Requirements

Header: afxext.h

See Also

Concepts

CPrintInfo Structure

CPrintInfo Members

Hierarchy Chart

CPrintInfo::m_bContinuePrinting

CPrintInfo::m_nCurPage

CPrintInfo::m_pPD

CPrintInfo::GetMinPage

CPrintInfo::GetToPage

CPrintInfo::SetMinPage

CView::OnBeginPrinting

CView::OnPreparePrinting