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

  • Thread starter Thread starter Guest
  • Start date Start date
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);
 
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
 
Back
Top