Export (0) Print
Expand All

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

See Also

CRichEditView Overview | Class Members | Hierarchy Chart | CRichEditView::GetParaFormatSelection | CRichEditView::SetCharFormat

Show:
© 2014 Microsoft