Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

(MFC) How to add lines to a text box ?

Status
Not open for further replies.

Dhafir

Programmer
Sep 22, 2002
28
0
0
NZ
I have multiple lines text box of type CEdit, how can I add lines to it? I tried adding "\n" at the end of my line but it didn't work!
i.e. I want to print the following in CEdit :
"This is my first line"
"This is my second line"
"This is my third line"

what I am getting instead is :
This is my first line|This is my second line|This is my third line

any idea ( I am new to MFC)?

Thanks all



 
replace your "\n" for the new line with "\r\n" and make sure that the text control properties are set to multi-line

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top