CRichEditView::GetPrintRect
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

CRichEditView::GetPrintRect

Call this function to retrieve the bounds of the printing area within the page rectangle.

CRect GetPrintRect( ) const;

The bounds of the image area used in printing, measured in MM_TWIPS.

void CMyRichEditView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
   CRect rectPrintPage = GetPrintRect();  // Measured in MM_TWIPS

   pInfo->SetMaxPage((m_nDocSizeInInches * 1440)/rectPrintPage.Height());

   CRichEditView::OnBeginPrinting(pDC, pInfo);
}

Header: afxrich.h

Show:
© 2016 Microsoft