Microsoft KB Archive/129859

{|
 * width="100%"|

HOWTO: Use Text Bullets in a Rich Edit Control

 * }

Q129859

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API)

-

SUMMARY
The Rich Edit control contains a built-in text bullet feature that is used to add paragraph bullets to the text. To use this feature, you must send the Rich Edit control a EM_SETPARAFORMAT message. The EM_SETPARAFORMAT message takes a pointer to a PARAFORMAT structure (in the case of Richedit 1.0) or PARAFORMAT2 structure (an extension of the PARAFORMAT structure, in the case of Richedit 2.0 or later) as its lParam parameter.

In the PARAFORMAT structure, it is necessary to zero out the structure and fill in the following members:

  UINT  cbSize - Contains the size of the structure. Use sizeof(PARAFORMAT).

DWORD dwMask - Contains the attributes to set. For bullets, use PFM_NUMBERING | PFM_OFFSET.

WORD wNumbering - Contains the value that specifies numbering options. For bullets, set this member equal to PFN_BULLET.

LONG dxOffset - Contains the value that specifies indentation of the second line and subsequent lines, relative to the starting indentation. For bullets, this value must be positive because the bullet is displayed in the area between the starting indentation and the offset. If this value is too small, the bullets are not displayed. Richedit 1.0 uses only PARAFORMAT structure. Richedit 2.0 or later can use either the PARAFORMAT structure or the PARAFORMAT2 structure.

Additional query words:

Keywords : kbCtrl kbOSWin2000 kbRichEdit kbGrpDSUser

Issue type : kbhowto

Technology : kbAudDeveloper kbWin32sSearch kbWin32API