|
-
May 11th, 1999, 09:38 PM
#1
CStrings & Edit Boxes
I am trying to put together 2 CStrings, display them in an edit box, and have a carriage return/line feed <CRLF> between each string. So far all of my attempts have failed miserably. This is what I am doing:
CString string1 = "This is string 1.\n ";
CString string2 = "This is string 2.";
m_string3 = string1 + string2;
UpdateData...
What I want displayed in the edit box is:
This is string 1.
This is string 2.
What I get is "This is string1.| This is string2." The | is a real dark black line. The strings are put together but I don't get the <crlf> like I want. Any suggestions? I know this has to be easier than it is.
Thanks in advance!
John Hagen
-
May 11th, 1999, 10:23 PM
#2
Re: CStrings & Edit Boxes
Hi,
I think you forgotten the CR in the CRLF.
CRLF consists of "\r\n" and not "\n" alone.
Hope that helps.
Chao
-
May 11th, 1999, 11:34 PM
#3
Re: CStrings & Edit Boxes
Yes, that was my problem. Beginners ignorance gets me every time. Thank you for replying and pointing out the errors of my ways.
John Hagen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|