I'm trying to figure out how to size a text box to closely fit three lines of wrapped text. I'm working in vb6, but I'll accept an answer in any language if I can understand it.
The problem is that I have a flexgrid with long headings and room for three lines of text in them, and I want to resize the text area to exactly fit three lines of text without the text wrapping to a fourth line and the text width should be as narrow as possible.
I realize that if I can figure out how to do it for a textbox or a label I will have more or less solved the problem. Possibly it can be done with the Windows API, but any advice will be appreciated.