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. Two lines in edit box

Two lines in edit box

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 2 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.
  • O Offline
    O Offline
    Oliver123
    wrote on last edited by
    #1

    I am trying to display two lines in an edit box. The edit box is checked for multi-line. The code displays the following just fine: one two three four five six I want it to display: one two three four five six How do I do it? Here's the code I'm using: RawString.Format("%s %s %s %s %s %s", F1, F2, F3, F4, F5, F6); GetDlgItem(IDC_EDIT_RawBidAsk)->SetWindowText(RawString); Thanks

    M O 2 Replies Last reply
    0
    • O Oliver123

      I am trying to display two lines in an edit box. The edit box is checked for multi-line. The code displays the following just fine: one two three four five six I want it to display: one two three four five six How do I do it? Here's the code I'm using: RawString.Format("%s %s %s %s %s %s", F1, F2, F3, F4, F5, F6); GetDlgItem(IDC_EDIT_RawBidAsk)->SetWindowText(RawString); Thanks

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Put \r\n in the string to create a line break

      --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

      1 Reply Last reply
      0
      • O Oliver123

        I am trying to display two lines in an edit box. The edit box is checked for multi-line. The code displays the following just fine: one two three four five six I want it to display: one two three four five six How do I do it? Here's the code I'm using: RawString.Format("%s %s %s %s %s %s", F1, F2, F3, F4, F5, F6); GetDlgItem(IDC_EDIT_RawBidAsk)->SetWindowText(RawString); Thanks

        O Offline
        O Offline
        Oliver123
        wrote on last edited by
        #3

        Thanks. I inserted the \r\n into the string and it works fine. RawString.Format("%s %s %s**\r\n**%s %s %s", F1, F2, F3, F4, F5, F6); GetDlgItem(IDC_EDIT_RawBidAsk)->SetWindowText(RawString);

        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