I am trying to write a multi-line string into an edit control on a
dialog box. I form the CString by putting a \n between substrings of
text. If I use CWnd::DrawText, the result works as desired, i.e.
string1
string 2
etc
If I use SetWindowText, the \n is not interpreted as a newline but
just another character and I get a single line of text. Is there
another way to add newlines in SetWindowText strings?
Thanks in advance.
Bob
Also if you want the user to be able to press Enter in your edit control to
insert a new line you might want to set the ES_WANTRETURN (Want Return
propety in resource editor).
AliR.
<strat...@gmail.com> wrote in message
news:eb005e0c-b75c-4e3e...@e39g2000hsf.googlegroups.com...
I'm not sure, but instead of \n, try putting \r\n.
-- David
It requires \r\n for SetWindowText.
joe
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
AliR.
"David Ching" <d...@remove-this.dcsoft.com> wrote in message
news:Wz8Hj.36355$J41....@newssvr14.news.prodigy.net...
Thanks all. The \r solved the problem. I guess it helps to read the
documentation :-)
Bob