inserting text in multi-line CEdit boxes

I'm trying to insert a string into a multi-line edit box of class CEdit. The string contains carriage-return characters ('\n') and I want the edit box to seperate the string into different lines at those points.

But when the text is displayed, it just has a vertical bar (similar to | ) at the points where there should be a line break, and all the text runs together on one line.

Does anyone know what I'm doing wrong?
thanks
Anthony
ajnicholson@lucent.com
nicholsoAsked:
Who is Participating?
 
jhanceCommented:
SetDlgItemText(IDC_EDIT, "This is a test\r\nLine 2");
0
 
sksCommented:
You have to have "\r\n"

\r represents return carraige
n represents new line
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.