• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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