CPrintInfo::m_nCurPage

Contains the number of the current page.

Remarks

The framework calls CView::OnPrepareDC and CView::OnPrint once for each page of the document, specifying a different value for this member each time; its values range from the value returned by GetFromPage to that returned by GetToPage. Use this member in your overrides of CView::OnPrepareDC and CView::OnPrint to print the specified page of the document.

When preview mode is first invoked, the framework reads the value of this member to determine which page of the document should be previewed initially. You can set the value of this member in your override of CView::OnPreparePrinting to maintain the user's current position in the document when entering preview mode. The m_nCurPage member is a public variable of type UINT.

Requirements

Header: afxext.h

See Also

Concepts

CPrintInfo Structure

CPrintInfo Members

Hierarchy Chart

CPrintInfo::GetFromPage

CPrintInfo::GetToPage

CView::OnPrepareDC

CView::OnPreparePrinting

CView::OnPrint