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. Strange Problem with \n

Strange Problem with \n

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 3 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.
  • R Offline
    R Offline
    RedDragon2k
    wrote on last edited by
    #1

    Hello, I have a strange problem: I have an Edit Box which is set to Multiline and WantReturn. But if I want to set the text to the edit box with SetWindowText() it seems the \n in the text is completly ignored. Does anyone have a clue why ? With best regards, Benedikt

    T C R 3 Replies Last reply
    0
    • R RedDragon2k

      Hello, I have a strange problem: I have an Edit Box which is set to Multiline and WantReturn. But if I want to set the text to the edit box with SetWindowText() it seems the \n in the text is completly ignored. Does anyone have a clue why ? With best regards, Benedikt

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

      into windows controls, replace \n with \r\n...


      TOXCCT >>> GEII power
      [toxcct][VisualCalc 2.20][VisualCalc 3.0]

      1 Reply Last reply
      0
      • R RedDragon2k

        Hello, I have a strange problem: I have an Edit Box which is set to Multiline and WantReturn. But if I want to set the text to the edit box with SetWindowText() it seems the \n in the text is completly ignored. Does anyone have a clue why ? With best regards, Benedikt

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        What do you mean by 'completely ignored' ? You mean that the text following it is not on a new line ? I think you have to specify \n\r (or \r\n, don't remember exactly) in order to have a new line.

        T 1 Reply Last reply
        0
        • C Cedric Moonen

          What do you mean by 'completely ignored' ? You mean that the text following it is not on a new line ? I think you have to specify \n\r (or \r\n, don't remember exactly) in order to have a new line.

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

          Cedric Moonen wrote:

          \n\r

          game over... ;P


          TOXCCT >>> GEII power
          [toxcct][VisualCalc 2.20][VisualCalc 3.0]

          1 Reply Last reply
          0
          • R RedDragon2k

            Hello, I have a strange problem: I have an Edit Box which is set to Multiline and WantReturn. But if I want to set the text to the edit box with SetWindowText() it seems the \n in the text is completly ignored. Does anyone have a clue why ? With best regards, Benedikt

            R Offline
            R Offline
            RedDragon2k
            wrote on last edited by
            #5

            Yeah thank you. That was the problem. I was too long working with consoles ;)

            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