This seems simple enough...I've done it plenty of times, but not using the CFile class. I've got a text file open and after I write a string of text to it, I want to insert a carriage return....again, seems simple enough...here is my code.
CFile Testfile ("C:\\testfile.txt", CFile:modeCreate | CFile::modeReadWrite)
Testfile.Write("testing\n", lstrlen("testing\n");
That's what I have...I've tried all sorts of combinations, but I can't get the stupid carriage return to work properly. When I open the file up in Wordpad, it looks fine...but with notepad it doesn't work. What do I need to append to the end of my text strings to get it to recognize a carriage return in notepad? I just don't understand how wordpad can see it and notepad can't. BTW, I've tried \r, \n, \013, and char(13). It just shows a funky lookin character at the end of my sentence instead of doing a carriage return. Can someone please explain this weird anomality please? Thanks in advance!
Niky Williams
NTS Marketing
Niky.Williams@NTSMarketing.com
CFile Testfile ("C:\\testfile.txt", CFile:modeCreate | CFile::modeReadWrite)
Testfile.Write("testing\n", lstrlen("testing\n");
That's what I have...I've tried all sorts of combinations, but I can't get the stupid carriage return to work properly. When I open the file up in Wordpad, it looks fine...but with notepad it doesn't work. What do I need to append to the end of my text strings to get it to recognize a carriage return in notepad? I just don't understand how wordpad can see it and notepad can't. BTW, I've tried \r, \n, \013, and char(13). It just shows a funky lookin character at the end of my sentence instead of doing a carriage return. Can someone please explain this weird anomality please? Thanks in advance!
Niky Williams
NTS Marketing
Niky.Williams@NTSMarketing.com