Udostępnij za pośrednictwem


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

Reference

CPrintInfo Structure

Hierarchy Chart

CPrintInfo::m_bContinuePrinting

CPrintInfo::m_nCurPage

CPrintInfo::m_pPD

CPrintInfo::GetMinPage

CPrintInfo::GetToPage

CPrintInfo::SetMinPage

CView::OnBeginPrinting

CView::OnPreparePrinting

Other Resources

CPrintInfo Members