long PrintPage( CDC* pDC, long nIndexStart, long nIndexStop );
Return Value
The index of the last character that fits on the page plus one.
Parameters
pDC
Pointer to a device context for page output.
nIndexStart
Zero-based index of the first character to be formatted.
nIndexStop
Zero-based index of the last character to be formatted.
Remarks
Call this function to format a range of text in a rich edit control for the output device specified by pDC. The layout of each page is controlled by GetPageRect and GetPrintRect. Typically, this call is followed by a call to CRichEditCtrl::DisplayBand which generates the output.
Note that margins are relative to the physical page, not the logical page. Thus, margins of zero will often clip the text since many printers have unprintable areas on the page. To avoid clipping your text, you should call SetMargins and set reasonable margins before printing.
CRichEditView Overview | Class Members | Hierarchy Chart
See Also CRichEditView::PrintInsideRect, CRichEditView::GetPageRect, CRichEditView::GetPrintRect, CRichEditView::SetMargins