kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Wed Jun 18, 2008 6:38 pm Post subject: C++ Problem: |
|
|
I got this code...it loads the content of an edit box (ScriptWin) and saves it to a file under the filepath in the string filepath.
| Code: | fstream saveit2; saveit2.open (filepath.c_str());
char text [9999];
HWND hEditWnd = GetDlgItem(hWnd,ID_ScriptWin);
GetWindowText(hEditWnd, text,9999);
saveit2 << text;
SendMessage(OutputWin, WM_SETTEXT, 0, (LPARAM)(LPCTSTR)text);
saveit2.close(); |
This copies it sucessfully, but there is a problem: At the end of EACH line, it leaves a random square box or two, something that is not part of the content of the edit box.
How do I fix this? I donnt think it could be fixed with "\0"?
|
|