Important: The information in this document is obsolete and should not be used for new development.
TEGetPoint
TheTEGetPointfunction determines the point that corresponds to the specified byte offset of a character and returns the coordinates of that point.
FUNCTION TEGetPoint (offset: Integer; hTE: TEHandle): Point;
offset- A byte offset into the text buffer of an edit record.
hTE- A handle to the edit record containing the text.
DESCRIPTION
TheTEGetPointfunction returns a valid result even when the edit record does not contain any text. The point returned is based on the values in the record's destination rectangle. In the case of an offset being equal to a line end, which is also the start of the next line,TEGetPointreturns a point corresponding to the line start of the next line. In the case of a dual caret, the primary caret position, the one corresponding to the primary line direction, is returned.The line height, taken either from the
lineHeightfield for a monostyled edit record or from the line-height array,LHElement, for a multistyled edit record, is also used to determine the vertical component. Both the text direction and the primary line direction are used to determine the horizontal component.The
TEGetPointfunction works for both monostyled and multistyled edit records.