In Delphi i wish to draw text inside a TRect. I am hoping for the following functionality:
- Draw the text centred vertically within the TRect
- Draw the text centred horizontally within the TRect
- If there is space for more than 1 line of text (using TRect's height), draw the text multiline
- If the text does not fit in the TRect (either on a single or mult line) then append ellipsis to the text.
I can see the Windows.DrawText() function almost covers this functionality, however when writing text, multiline and vertically centred are mutually exclusive.
I was wondering if this functionality is built into windows (2000+)? If not is there a way to do this without writing my own function?