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

Threaded View

  1. #13
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: text at any angle

    Strange...
    Could you post a screenshot?
    Are you sure all variables have correct values?

    I just tried your code and got the result as you see in the screenshot below.
    Code:
        dc.SetBkMode(TRANSPARENT);
        CFont Font;
        Font.CreateFont(24,                   // nHeight
          0,                         // nWidth
          900,                         // nEscapement
          900,                         // nOrientation
          FW_NORMAL,                 // nWeight
          FALSE,                     // bItalic
          FALSE,                     // bUnderline
          0,                         // cStrikeOut
          ANSI_CHARSET,              // nCharSet
          OUT_DEFAULT_PRECIS,        // nOutPrecision
          CLIP_DEFAULT_PRECIS,       // nClipPrecision
          DEFAULT_QUALITY,           // nQuality
          DEFAULT_PITCH | FF_SWISS,  // nPitchAndFamily
          "Arial");
        CFont *OldFont = dc.SelectObject(&Font);
        dc.TextOut(100,100, "Test text");
        dc.SelectObject(OldFont);
        Font.DeleteObject ();
    Attached Images Attached Images
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

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