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 make a vertical text into the Edit Control?

How to make a vertical text into the Edit Control?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
6 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.
  • E Offline
    E Offline
    Eugene Pustovoyt
    wrote on last edited by
    #1

    Hi, I'm need a class or sample code for the vertical text into the Edit Control. How to make it? Help me if you can!

    T R 2 Replies Last reply
    0
    • E Eugene Pustovoyt

      Hi, I'm need a class or sample code for the vertical text into the Edit Control. How to make it? Help me if you can!

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      there are several articles about that on Codeproject. have you searched a little around there ?


      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      E 1 Reply Last reply
      0
      • T toxcct

        there are several articles about that on Codeproject. have you searched a little around there ?


        [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

        E Offline
        E Offline
        Eugene Pustovoyt
        wrote on last edited by
        #3

        I'm not found this solution in the captions of the "Edit Controls" articles. Can you get a link?

        1 Reply Last reply
        0
        • E Eugene Pustovoyt

          Hi, I'm need a class or sample code for the vertical text into the Edit Control. How to make it? Help me if you can!

          R Offline
          R Offline
          Russell
          wrote on last edited by
          #4

          Draw vertical text is very very simple:

          CFont VertFont;
          LOGFONT LogFont;
          HorzFont->GetLogFont(&LogFont);           // Get the info from an horizontal font
          LogFont.lfEscapement=900;                 // Modify the info (now it is vertical):->
          VertFont.CreateFontIndirect(&LogFont);    // Create the font
          tmpDC.SelectObject(&VertFont);            // Apply to the DC
          tmpDC.TextOut(x, y, "bye bye, Russell");  // Use it :cool:
          

          Russell

          E 1 Reply Last reply
          0
          • R Russell

            Draw vertical text is very very simple:

            CFont VertFont;
            LOGFONT LogFont;
            HorzFont->GetLogFont(&LogFont);           // Get the info from an horizontal font
            LogFont.lfEscapement=900;                 // Modify the info (now it is vertical):->
            VertFont.CreateFontIndirect(&LogFont);    // Create the font
            tmpDC.SelectObject(&VertFont);            // Apply to the DC
            tmpDC.TextOut(x, y, "bye bye, Russell");  // Use it :cool:
            

            Russell

            E Offline
            E Offline
            Eugene Pustovoyt
            wrote on last edited by
            #5

            :-D Your sample for drawing and not for the CEdit-derived classes. Changes CEdit font by SetFont methods hasn't effect.

            R 1 Reply Last reply
            0
            • E Eugene Pustovoyt

              :-D Your sample for drawing and not for the CEdit-derived classes. Changes CEdit font by SetFont methods hasn't effect.

              R Offline
              R Offline
              Russell
              wrote on last edited by
              #6

              Another way then is to put a normal CEdit control invisible somewhere, then drow it and on a tmp DC, rotate it 90 degrees and than draw it in the real DC. But, then, probally you have also to wrap (and rotate) the mouse interaction to send right information to the real CEdit control. X|


              Russell

              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