Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ Problem:

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Wed Jun 18, 2008 6:38 pm    Post subject: C++ Problem: Reply with quote

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"?
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites