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. Mulitline Edit Box

Mulitline Edit Box

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 4 Posters 0 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.
  • J Offline
    J Offline
    Johnny Peszek
    wrote on last edited by
    #1

    Hi! I want to display multiline text in the edit box. I use CString as a member variable. In edit box properties I checked Multiline. The text is from dialog based application and it consist of data. I would like to display each data in new line but when I use Format with “\n” I don’t get new line instead I get small black rectangle character. After the small rectangle there’s no new line. So what I should do to get new line displayed? Thanks in advance.

    D J 2 Replies Last reply
    0
    • J Johnny Peszek

      Hi! I want to display multiline text in the edit box. I use CString as a member variable. In edit box properties I checked Multiline. The text is from dialog based application and it consist of data. I would like to display each data in new line but when I use Format with “\n” I don’t get new line instead I get small black rectangle character. After the small rectangle there’s no new line. So what I should do to get new line displayed? Thanks in advance.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Johnny Peszek wrote: ...when I use Format with “\n” I don’t get new line instead I get small black rectangle character. Use \r\n instead.


      "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

      J S 2 Replies Last reply
      0
      • D David Crow

        Johnny Peszek wrote: ...when I use Format with “\n” I don’t get new line instead I get small black rectangle character. Use \r\n instead.


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        J Offline
        J Offline
        Johnny Peszek
        wrote on last edited by
        #3

        Thanks a lot it works great!!!

        1 Reply Last reply
        0
        • J Johnny Peszek

          Hi! I want to display multiline text in the edit box. I use CString as a member variable. In edit box properties I checked Multiline. The text is from dialog based application and it consist of data. I would like to display each data in new line but when I use Format with “\n” I don’t get new line instead I get small black rectangle character. After the small rectangle there’s no new line. So what I should do to get new line displayed? Thanks in advance.

          J Offline
          J Offline
          Jeremy Falcon
          wrote on last edited by
          #4

          As a rule of thumb (there are some variations to this rule - like with message boxes in Windows), when it comes to text just remember this... \n - Unix/Linux/MacOS X/etc. \r\n - Windows/DOS \r - MacOS 1-9 Jeremy Falcon

          J 1 Reply Last reply
          0
          • J Jeremy Falcon

            As a rule of thumb (there are some variations to this rule - like with message boxes in Windows), when it comes to text just remember this... \n - Unix/Linux/MacOS X/etc. \r\n - Windows/DOS \r - MacOS 1-9 Jeremy Falcon

            J Offline
            J Offline
            Johnny Peszek
            wrote on last edited by
            #5

            Thanks!

            1 Reply Last reply
            0
            • D David Crow

              Johnny Peszek wrote: ...when I use Format with “\n” I don’t get new line instead I get small black rectangle character. Use \r\n instead.


              "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

              S Offline
              S Offline
              Shi Zhu
              wrote on last edited by
              #6

              what's the format with "\r" process? msn:Flashcutreg@hotmail.com

              J 1 Reply Last reply
              0
              • S Shi Zhu

                what's the format with "\r" process? msn:Flashcutreg@hotmail.com

                J Offline
                J Offline
                Johnny Peszek
                wrote on last edited by
                #7

                Format with "\r" stands for "carriage return" which is an escape sequence.

                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