SRGraphTitle::ComputeLineBreaks

int SRGraphTitle::ComputeLineBreaks(LPCTSTR text, int nCount, LPRECT rc, BOOL bWrapText, int* LineBreaks, int* LineLengths)

Breaks the multiline text string into lines

Defined in: SRGraphTitle.cpp

Return Value

The number of lines in the string

Parameters

text

Pointer to the text string

nCount

Number of characters in text

rc

Pointer to the rectangle in which the text is to be displayed

bWrapText

TRUE to enable word wrap. Long lines which exceed the width of the display rect are broken into two or more lines.

LineBreaks

An array to receive the indices of the first character in each line

LineLengths

An array to receive the length of each line

Developer Notes

Either '\\n' or "\\r\\n" can be used to indicate manual line breaks.

Remarks

If word wrap is not enabled, lines are not constrained to the display rectangle. Also, the text is not constrained by the height of the display rectangle.