TerSetLine
Set the text and font ids for a line
BOOL TerSetLine(hWnd, LineNo, text, font)
BOOL TerSetLineEx(hWnd, LineNo, text, lead, font)
HWND hWnd; | The handle of the window to be accessed |
long LineNo; | The text line number (0 to TotalLines - 1) to set |
LPBYTE text; | Contains the pointer to a text string to apply. This string must be NULL terminated. |
LPBYTE lead; | Contains the pointer to the lead bytes. |
LPWORD font; | Contain the pointer to a font id array to apply. Each font id is two bytes long. You can set this parameter to NULL if the font ids are not available. |
Description: This function is used to set new text for a line. The number of bytes in the 'font' character array must be identical to the number of bytes in the text string. The font array must contain valid font ids (0 to TotalFonts - 1). You can get information about an editor font id by using the GetFontInfo function.
The TerSetLineEx function support an additional 'lead' pointer. This argument can be used to provide the lead bytes for the text in an MBCS (Multibyte Character Set) system. In this case, the 'text' argument will provide the tail bytes and the 'lead' argument will provide the lead bytes. You can use the TerSplitMbcs function to split an MBCS string into lead and tail bytes to supply to this function.
Return Value: This function returns a TRUE value when successful.