HiliteText
HiliteText
Find characters between two offsets for highlighting void HiliteText(textPtr, textLength, firstOffset, secondOffset, &offsets );
Ptr textPtr ; address of a text string short textLength ; value for text length
short firstOffset ; beginning of text string to be highlighted
short secondOffset ; end of text string to be highlighted
OffsetTable *offsets ; value indicating string's position HiliteText finds the characters of a text string that you want to highlight. textPtr is a text string indicated by a pointer.
textLength is the length of the specified string.
firstOffset is the beginning position for highlighting in the text string.
secondOffset is the ending position for the text to be highlighted.
offsets is a combination of firstOffset and secondOffset and identifies the
run of characters to be highlighted.
Notes: The offset Table is a set of three separate offsets: beginning, end, and total.
Three offset pairs are needed because in bi directional scripts such as
mingling English and Arabic words on the same line, a single selection may
comprise up to three physically discontinuous segments. Use Char2Pixel to convert the offsets to pixel widths.