Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to display a string vertically?

How to display a string vertically?

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vincent Ye
    wrote on last edited by
    #1

    When I use TextOut() to display a string, the string is displayed horizontally. So I create a font with lfEscapement & lfOrientation = 900. And select it to the CDC object. I think the string should be displayed vertically. Unfortunately, it isn't displayed vertically. How can I do that? Thanks in advance. Vincent

    G A 2 Replies Last reply
    0
    • V Vincent Ye

      When I use TextOut() to display a string, the string is displayed horizontally. So I create a font with lfEscapement & lfOrientation = 900. And select it to the CDC object. I think the string should be displayed vertically. Unfortunately, it isn't displayed vertically. How can I do that? Thanks in advance. Vincent

      G Offline
      G Offline
      Gary Kirkham
      wrote on last edited by
      #2

      Did you check the return value from CreateFont? There may be some other problem...show us some code Gary Kirkham A working Program is one that has only unobserved bugs

      1 Reply Last reply
      0
      • V Vincent Ye

        When I use TextOut() to display a string, the string is displayed horizontally. So I create a font with lfEscapement & lfOrientation = 900. And select it to the CDC object. I think the string should be displayed vertically. Unfortunately, it isn't displayed vertically. How can I do that? Thanks in advance. Vincent

        A Offline
        A Offline
        Alvaro Mendez
        wrote on last edited by
        #3

        1. Make sure it's a TrueType font. 2. If it still doesn't work, please post some code. Regards, Alvaro


        Well done is better than well said. -- Benjamin Franklin (I actually prefer medium-well.)

        V 1 Reply Last reply
        0
        • A Alvaro Mendez

          1. Make sure it's a TrueType font. 2. If it still doesn't work, please post some code. Regards, Alvaro


          Well done is better than well said. -- Benjamin Franklin (I actually prefer medium-well.)

          V Offline
          V Offline
          Vincent Ye
          wrote on last edited by
          #4

          Dear Alvaro, Thank you very much. After I added "lf.lfOutPrecision = OUT_TT_ONLY_PRECIS;", it worked. Thanks again Vincent

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups