Share via


CRichEditView::SetMargins

Call this function to set the printing margins for this rich edit view.

void SetMargins( 
   const CRect& rectMargin  
);

Parameters

  • rectMargin
    The new margin values for printing, measured in MM_TWIPS.

Remarks

If m_nWordWrap is WrapToTargetDevice, you should call WrapChanged after using this function to adjust printing characteristics.

Note that the margins used by PrintPage 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 use SetMargins to set reasonable printer margins before printing.

Example

See the example for CRichEditView::GetPaperSize.

Requirements

Header: afxrich.h

See Also

Reference

CRichEditView Class

Hierarchy Chart

CRichEditView::GetMargins

CRichEditView::GetPrintWidth

CRichEditView::GetPrintRect

CRichEditView::GetPaperSize

CRichEditView::GetPageRect

CRichEditView::PrintPage

CRichEditView::WrapChanged