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++ with sendmessage();

 
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: Sun Jun 08, 2008 7:59 pm    Post subject: C++ with sendmessage(); Reply with quote

Hi. I made a text box....

Code:
ScriptWin = CreateWindow("EDIT", "" , WS_CHILD | WS_VISIBLE | ES_MULTILINE | WS_HSCROLL | WS_VSCROLL | ES_WANTRETURN, 5, 5, 600, 400, hWnd,(HMENU)ID_ScriptWin, NULL, NULL);


then i want to write to it

Code:
SendMessage(ScriptWin, WM_SETTEXT, 0, (LPARAM)(LPCTSTR)text2show.c_str());


text2show = string so i need the c_str()

my question is:

How I make it append the string into the textbox instead of overiding the whole thing?

Thanks.
Back to top
View user's profile Send private message Send e-mail
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Sun Jun 08, 2008 8:04 pm    Post subject: Reply with quote

WEll you read whats in the textbox and then add to what you write.
Back to top
View user's profile Send private message
Bizarro
I post too much
Reputation: 0

Joined: 01 May 2007
Posts: 2648

PostPosted: Sun Jun 08, 2008 8:16 pm    Post subject: Reply with quote

Code:

std::string extra = "more";

text2show.append(extra);

SetDlgItemText(hWnd, ID_ScriptWin, text2show);

_________________

w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Sun Jun 08, 2008 8:42 pm    Post subject: Reply with quote

Read the text from the box first, and append it to the string you are adding to it. You can use SendMessage with WM_GETTEXT and WM_GETTEXTLENGTH to accomplish what you need.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Sun Jun 08, 2008 8:56 pm    Post subject: Reply with quote

Thanks all!

@Bizzaro ---> Thanks
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