|
-
July 28th, 2009, 05:42 AM
#14
Re: Save button MFC
 Originally Posted by Elrond
... Note that WriteString does not add the end of line characters, so you would nee to do it yourself when you need it:
Code:
CString str = _T("String to write\r\n");
file.WriteString(str);
This code is not 100% correct.
you should NOT add CR ('\r') character yourself, only LF ('\n'). CStdioFile::WriteString will then replace
... any newline character ... written to the file as a carriage return–linefeed pair.
So, the correct code is:
Code:
CString str = _T("String to write\n");
file.WriteString(str);
Victor Nijegorodov
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
|