How to remove small rectangle in text file(notpad) & "\n" not work

G

Guest

writing a data to open (.txt) notepad file in desktop from vc++... then small
rectangle are coming in the file [and] "\n" is also not working

int iLength = (int)::SendMessage(hEdit, WM_GETTEXTLENGTH, 0, 0);
::SendMessage(hEdit, WM_GETTEXT, iLength+1, (LPARAM)textData);

CString temp = textData;
temp += "\n";
temp += "MFC";
sprintf(textData,"%s",temp);
::SendMessage(hEdit, WM_SETTEXT, 0,(LPARAM)(LPCTSTR)textData);
 
D

David Lowndes

writing a data to open (.txt) notepad file in desktop from vc++... then small
rectangle are coming in the file [and] "\n" is also not working
Change:

temp += "\n";

to:

temp += "\r\n";

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top