CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Line Spacing for DrawText

    How do you set the line spacing used in a multi-line CDC:rawText 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?


  2. #2
    Join Date
    Apr 1999
    Posts
    68

    Re: Line Spacing for DrawText

    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.


  3. #3
    Join Date
    Aug 1999
    Posts
    1

    Re: Line Spacing for DrawText

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured