
How to set multiline text in a CEdit?
Hi all,
I have a CEditView, and I wish to set the text within it to a particular
multiline output. I obtain a point to the CEdit control within it, and
then use SetWindowText(); I will certainly compile the text itself in a
buffer of some kind, because it will change depending on the doc.
The line breaks in a CEdit are supposed to be \n\n\r, or some variation on
a soft break theme. But, of course, every time I try to put together a
buffer containing these characters, it won't work.
CString line1 = "Line 1\n\n\r";
CString line2 = "Line 2\n\n\r";
line1+=line2;
SetwindowText(line1); // No good, it's all on one line
I have tried implementing a CByteArray, filling it one letter at a time,
and then copying it into a static char array, but the \n's all come out as
non-printable characters (ie '|'). Can anyone tell me how to have
multi-line text? If you have any better ideas for a CEditView, they would
be welcome too.
--------------
Richard Cavell
Melbourne University Medical Student, Debater, Chess Player, etc.
Celebrating the Micro$oft breakup.
Newsgroups - Please keep it on the group, and copy your replies to me via
email. (Server problems).