TE Edit Control Win32 / Win64 Help
Product page

TerSetTag

Set a tag at the specified text position:

int TerSetTag(hWnd, line, col, name, AuxText, flags)
HWND hWnd;The handle of the window to be accessed
long line;The line position of the text. Set to -1 to use the current cursor position.
int col;The column position of the text. This parameter is ignored if the 'line' parameter is set to -1.
LPBYTE name;The tag name string. A tag name does not need to be unique within the document.
LPBYTE AuxText;Any auxiliary text string associated with the tag.
long AuxInt;Any auxiliary numeric data associated with the tag
UINT flags;Reserved for future use. Must be set to 0.

Description: Use this function to set a tag at the specified character position. If a tag already exists at the current text position, then the existing tag is updated with the new information.

Return Value: This function returns the unique tag id if successful. Otherwise it returns 0.