Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 349
  • Last Modified:

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
0
nicholso
Asked:
nicholso
1 Solution
 
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now