TE Edit Control Win32 / Win64 Help
Product page

SelectTerText

Select text block

BOOL SelectTerText(hWnd, FirstLine, FirstCol, LastLine, LastCol, repaint)
HWND hWnd;Handle of the window to be accessed
long FirstLine;Beginning line number of the block
int FirstCol;Beginning column number of the block
long LastLine;Last line number of the block
int LastCol;Last column number of the block
BOOL repaint;TRUE to refresh the window after this operation

Description: This function is used to select a block of text. When the 'repaint' flag is set, the selected block is shown with a highlight.

The FirstLine and FirstCol determine the beginning of the block. To specify the beginning location in absolute terms (character position from the beginning of the file), set the FirstCol to -1, and specify the absolute location using the FirstLine argument.

The LastLine and LastCol (exclusive) determine the end of the block. To specify the ending location in absolute terms (character position from the beginning of the file), set the LastCol to -1, and specify the absolute location using the LastLine argument.

Note that all characters starting from the beginning location until the last character before the ending location are included in the block.

Return Value: This function returns TRUE if successful.