Link to home
Start Free TrialLog in
Avatar of TimB
TimB

asked on

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
Avatar of lif081199
lif081199

use \r\n and not only \n

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

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

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

Vicky
And, of course, don't forget to check the "multiline" property in your resource editor
(Sorry if this comment hurts you ;))
Hello V_Bapat, have you read my answer ?
Avatar of TimB

ASKER

Thanks lif,  that worked.

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

TimB
I can no more submit it as an answer,
because the question is locked :(
Avatar of TimB

ASKER

sorry V_Bapat, lif got there first.

TimB
ASKER CERTIFIED SOLUTION
Avatar of lif081199
lif081199

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TimB

ASKER

Thanks!