Click to See Complete Forum and Search --> : Using DrawText


Christophe_G
June 8th, 1999, 05:09 AM
Hi !
I want to display several items in a CView in a vertical mode.
I create the CFont with a LOGFONT (using Arial font and a lfEscapement set to 900 = 90°).
My problem is how to display all the item using DrawText. How to calculate ce CRect for displaying each item ?

Dave Lorde
June 8th, 1999, 05:49 AM
If you use the DT_CALCRECT format, DrawText will size the rectangle you pass in to fit the text, but it won't draw the text. See the online help for DrawText.

Dave

Roger Allen
June 8th, 1999, 05:49 AM
When you select the font into a DC, the GetTextExtent() function will still return meaningful results. Its just that the .x will be the height of the font, while the .y value will be the length of the text in that font.

HTH


Roger Allen