다음을 통해 공유


CRichEditView::GetPrintRect

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

CRect GetPrintRect( ) const;

Return Value

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

Example

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);
}

Requirements

Header: afxrich.h

See Also

Concepts

CRichEditView Class

CRichEditView Members

Hierarchy Chart

CRichEditView::GetMargins

CRichEditView::GetPrintWidth

CRichEditView::GetPaperSize

CRichEditView::GetPageRect

CRichEditView::PrintPage