Share via


CRichEditView::SetParaFormat

Call this function to set the paragraph formatting attributes for the current selection in this CRichEditView object.

BOOL SetParaFormat( 
   PARAFORMAT2& pf  
);

Parameters

  • pf
    PARAFORMAT2 structure containing the new default paragraph formatting attributes.

Return Value

Nonzero if successful; otherwise, 0.

Remarks

Only the attributes specified by the dwMask member of pf are changed by this function.

For more information, see EM_SETPARAFORMAT message and PARAFORMAT2 structure in the Windows SDK.

Example

void CMyRichEditView::AddBullets() 
{
   PARAFORMAT2 pf;

   pf.cbSize = sizeof(PARAFORMAT2);
   pf.dwMask = PFM_NUMBERING | PFM_OFFSET;
   pf.wNumbering = PFN_BULLET;
   pf.dxOffset = 10;

   VERIFY(SetParaFormat(pf));
}

Requirements

Header: afxrich.h

See Also

Reference

CRichEditView Class

Hierarchy Chart

CRichEditView::GetParaFormatSelection

CRichEditView::SetCharFormat