how do I get the height of a rich text content after word wrap?
- by Led
Question A.
Given
1. A string in rich text format that may have paragraph, tabs, space, line break, indentation, (or even image?)
2. A width for the word wrapping rich text control/editor
How do I know the height of the content after it have performed all the word wrapping?
Is there something like
int MeasureRichTextHeightAfterWordWrap(string aRichTextContent, int aWidth)?
Otherwise how does those rich text control know how much to autosize?
Do I have to actually place the content on a dummy rich text control and get its height afterwards?
Question B.
Similar to question A but in plain text onto a plain text memo/control/editor.
And manually draw string with manually calculated indentations, breaks, word wrappings.
Is it easier or harder?