Paragraph Formatting in Rich Edit Controls

HomeOverviewSample

You can use member functions of the rich edit control (CRichEditCtrl) to format paragraphs and to retrieve formatting information. Paragraph formatting attributes include alignment, tabs, indents, and numbering.

You can apply character formatting by using the SetParaFormat member function. To determine the current character formatting for the selected text, use the GetParaFormat member function. The PARAFORMAT structure is used with these member functions to specify character attributes. One of the important members of PARAFORMAT is dwMask. In SetParaFormat, dwMask specifies which paragraph attributes will be set by this function call. GetParaFormat reports the attributes of the first paragraph in the selection; dwMask specifies the attributes that are consistent throughout the selection.

See Also   Windows Common Controls and MFC Classes