Click to See Complete Forum and Search --> : Line Spacing for DrawText


August 10th, 1999, 01:48 PM
How do you set the line spacing used in a multi-line CDC::DrawText command (i.e. when you don't want to use the default font spacing, but e.g. want lines compressed together). I'm sure the answer is simple, but I'm unable to find it. Can someone help?

jteagle@home
August 10th, 1999, 02:07 PM
As far as I know, you have no control; the spacing is simply dictated by the font. You have to use CDC::TextOut() if you want custom spacing - not a pretty alternative.

SandraC
August 10th, 1999, 04:13 PM
Take a look at the TEXTMETRIC structure you get using CDC::GetTextMetrics. There are tmInternalLeading and tmExternalLeading integers which you can set. Keep in mind that tmInternalLeading is included in the font's height, while thmExternalLeading is not.
I hope this helps.