Link to home
Start Free TrialLog in
Avatar of qwang73
qwang73

asked on

How to display multiple lines in a edit box at runtime?

Hello everyone,

  I want to display multiple lines in a edit box at run time.

  What I did was as follows:
   szNewLine.Format("%s\n%s", szPrevLine, szLine);
   pEdit->SetWindowText(szNewLine);
  Instead of seeing two lines inside the edit box as I expected, I saw one line with a CR separating two strings. How can I implement multiple lines at run time as if the user hits enter within a multiple-lined edit box?

  Thanks.

Nancy



ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of qwang73
qwang73

ASKER

jkr,

  Thanks for your answer and the note about duplicate question. '\r\n' is exactly what I need. Funny thing is that I tried to put 0x0A(LF) and 0x0D(CR) at the end and it didn't work. Is that the same as '\r\n'?

Nancy