addint text to a cedit

I have a multi-line edit control, and I want to add a few lines of text to it.

I've done this:

CString sLine;
sLine = "first line\nsecond";

m_LICIENCE_EDIT.SetWindowText(sLine);


And get this result:
"first line|second"

This is all on one line.  How can I change this?

Thanks,

TimB
LVL 1
TimBAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lif081199Commented:
use \r\n and not only \n

CString sLine;
sLine = "first line\r\nsecond";
m_LICIENCE_EDIT.SetWindowText(sLine);

Good luck,
Lionel.
0
V_BapatCommented:
Change this line:
sLine = "first line\nsecond";

To:
sLine = "first line \r\nsecond";

Vicky
0
lif081199Commented:
And, of course, don't forget to check the "multiline" property in your resource editor
(Sorry if this comment hurts you ;))
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

lif081199Commented:
Hello V_Bapat, have you read my answer ?
0
TimBAuthor Commented:
Thanks lif,  that worked.

Submit as an answer if you'd like some points.

TimB
0
lif081199Commented:
I can no more submit it as an answer,
because the question is locked :(
0
TimBAuthor Commented:
sorry V_Bapat, lif got there first.

TimB
0
lif081199Commented:
Thank you
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TimBAuthor Commented:
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.