TE Edit Control Win32 / Win64 Help
Product page

TerSetDefListFormat

Specify default list level properties to apply when creating a new list.

BOOL TerSetDefListFormat(hWnd, level, NumType, ListText)
HWND hWnd;The handle of the window to be accessed
int id;The id of the list or list-override item to modify.
int level;Level number to apply the properties (0 to 8).
int NumType;Use one of the following number type constants:
LIST_DECDecimal number
LIST_UPR_ROMANUppercase roman letters
LIST_LWR_ROMANLowercase roman letters
LIST_UPR_ALPHAUppercase alphabets
LIST_LWR_ALPHALowercase alphabets
LIST_DEC_PADPadded decmial numbers
LIST_BLTBullet (no numbering)
LIST_NO_NUMHidden
LPBYTE ListText.

The text printed for the paragraph number. The level number information can be embedded in this text surrounded by a pair or '~' characters.

For example, specify the following list text to print the numbers in the n.n formats:

~1~.~2~

The editor will replace the ~1~ string by the current number value for level 1. Similarly, the editor will replace the ~2~ string by the current number value for level 2. The result might as following:

1.1 Item 1

1.2 Item 2

1.3 Item 3

Similarly, a ListText of (~1~) would print the paragraph numbers as following:

(1) Item 1

(2) Item 2

(3) Item 3

Description: The properties specified using this method is applicable only to a new list subsequently created using any of the list creation methods.

Return Value: When successful, this function returns a TRUE value.