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. Character insertion into a Editbox!

Character insertion into a Editbox!

Scheduled Pinned Locked Moved C / C++ / MFC
databasetutorialquestion
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
    RuiSantiago
    wrote on last edited by
    #1

    Hello! I'm trying, by code, to insert the '\n' or 0x0D or chr(13) into a EditBox to format the data comingo from a Database. Anyone have a clue on how to do this? Thank you for your time!

    L C 3 Replies Last reply
    0
    • R RuiSantiago

      Hello! I'm trying, by code, to insert the '\n' or 0x0D or chr(13) into a EditBox to format the data comingo from a Database. Anyone have a clue on how to do this? Thank you for your time!

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Try \n\r that should do it! Papa Murex Co.

      1 Reply Last reply
      0
      • R RuiSantiago

        Hello! I'm trying, by code, to insert the '\n' or 0x0D or chr(13) into a EditBox to format the data comingo from a Database. Anyone have a clue on how to do this? Thank you for your time!

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        there are a few ways. the easiest is to add the "\r\n" to the data then do a SetWindowText to add all the data at once. (you need the '\r', or the edit box will draw a little square for the '\n'). CString inData; inData = from database inData+="\r\n"; myEdit.SetWindowText(inData); -c


        Cheap oil. It's worth it!

        Image Processing - just like mom used to make.

        1 Reply Last reply
        0
        • R RuiSantiago

          Hello! I'm trying, by code, to insert the '\n' or 0x0D or chr(13) into a EditBox to format the data comingo from a Database. Anyone have a clue on how to do this? Thank you for your time!

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          sData = ... sData += "\n"; m_cEdit.SetWindowText(sData);

          R 1 Reply Last reply
          0
          • L Lost User

            sData = ... sData += "\n"; m_cEdit.SetWindowText(sData);

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

            Chris was rigth, i must insert "\r\n", to make the line feed. Thank you all!

            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