TerEditListLevel
Edit the level properties for a list or a list-override item.
BOOL TerEditListLevel(hWnd, IsList, id, level, StartAt, NumType, CharAft, ListText, FontId, flags)
HWND hWnd; | The handle of the window to be accessed |
BOOL IsList; | Set to TRUE to modify the level properties for a list item. Set to FALSE to modify the level properties for a list-override item. A list-override item is allowed only if it has the 'OverrideLevels' flag set (please refer to the TerEditListOr function). |
int id; | The id of the list or list-override item to modify. |
int level; | A valid level number. A simple list has only one level (level number 0). A nested list has 9 levels (0 to 8). |
int StartAt; | The starting number for a level. A typical value would be 1. |
int NumType; | Use one of the following number type constants: |
LIST_DEC | Decimal number |
LIST_UPR_ROMAN | Uppercase roman letters |
LIST_LWR_ROMAN | Lowercase roman letters |
LIST_UPR_ALPHA | Uppercase alphabets |
LIST_LWR_ALPHA | Lowercase alphabets |
LIST_DEC_PAD | Padded decmial numbers |
LIST_BLT | Bullet (no numbering) |
LIST_NO_NUM | Hidden |
int CharAft; | The character between the bullet text and the body text: |
LISTAFT_TAB | Tabbed space |
LISTAFT_SPACE | Single space |
LISTAFT_NONE | No space |
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
A bullet character can also be specified by passing a one character string. The first character of this string would contain the BLT_ constant. Please refer to the TerSetListBullet function for a description of the available BLT_constants.
int FontId; | A valid font id (0 to TotalFonts-1) to print the paragraph number text. |
DWORD flags; | One or more of the following flags bits can be specified: |
LISTLEVEL_RESTART | Restart the paragraph number for a list-override level. This flag is valid only for a list-override level. When this flag is not specified, the numbering may be continued among multiple list-overrides for sharing the same list. |
LISTLEVEL_REFORMAT | Use the font information as specified by the list-override level. This flag is valid only for a list-override level. |
LISTLEVEL_LEGAL | This allows the previous upper level number to be printed in the Arabic numbering format. |
LISTLEVEL_NO_RESET | Do not restart the level number when an upper level text is encountered. |
Description: This function allows you edit the default properties for a list or list-override level.
Return Value: When successful, this function returns a TRUE value.