TE Edit Control Win32 / Win64 Help
Product page

TerGetTagPos

Get the text position of a tag.

int TerGetTagPos(hWnd, TagId, name, type)
BOOL TerGetTagPos2(hWnd, TagId, name, type, line, col)
HWND hWnd;Handle of the window to be accessed
int type;Tag type (used by the TerPosTagEx function only):
TERTAG_BKM:Bookmark tag
TERTAG_USER:Generic tag
int TagId;The tag id to search for. This parameter is ignored if the 'name' parameter is specified.
LPBYTE name;The tag name to search for. Please note that tag names are not unique within a document.
LPINT line;

The line number where the tag is located.

This parameter is used by the TerGetTagPos2 function only.

LPINT line;

The columber number where the tag is located.

This parameter is used by the TerGetTagPos2 function only.

Return Value: The TerGetTagPos function searches the given tag to return the absolute character position of the tag. The function returns -1 if the tag is not found in the document.

The TerGetTagPos2 function searches the given tag to return the line/column position of the tag. The function returns a false value if the tag is not found in the document.