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++]SetDlgItemText?

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

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Thu Aug 23, 2007 10:17 am    Post subject: [C++]SetDlgItemText? Reply with quote

ok so i just started learning win32 c++ and i want to know how to set the text of an edit box to the text of another edit box
Code:
case WM_LBUTTONDOWN:
         SetDlgItemText(hwnd,MAIN_BUTTON,HERE);
         break;

what do i set the here to?

_________________


Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Thu Aug 23, 2007 10:19 am    Post subject: Reply with quote

SetDlgItemText(hwnd,MAIN_BUTTON,"this is text");
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Thu Aug 23, 2007 10:22 am    Post subject: Reply with quote

yes i know that but i want to change "this is text" to the text of another editbox
_________________


Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Thu Aug 23, 2007 10:50 am    Post subject: Reply with quote

GetDlgItemText
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Thu Aug 23, 2007 10:59 am    Post subject: Reply with quote

i dont understand GetDlgItemText is it like this? GetDlgItemText(hwnd,MAIN_EDIT,"text",20) does it store the text i put in somewhere?
_________________


Back to top
View user's profile Send private message
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Thu Aug 23, 2007 11:03 am    Post subject: Reply with quote

The third parameter holds the text of the control your specified.
_________________
Back to top
View user's profile Send private message
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Thu Aug 23, 2007 11:11 am    Post subject: Reply with quote

ok so it gets the text of main_edit and it looks for "text"? if so then how do i get it to look for any text? also could you give me an example? sorry if im asking too many questions Embarassed
_________________


Back to top
View user's profile Send private message
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Thu Aug 23, 2007 11:13 am    Post subject: Reply with quote

Code:
char szItemName[80];
GetDlgItemText(hwndDlg, ID_ITEMNAME, szItemName, 80)


It retrieves the text of "ID_ITEMNAME" and store the information in szItemName.

_________________
Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Thu Aug 23, 2007 11:14 am    Post subject: Reply with quote

char buffer[256];
GetDlgItemText(hwnd, ITEM1, buffer, 256);
SetDlgItemText(hwnd, ITEM2, buffer);

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
merkark12
Advanced Cheater
Reputation: 0

Joined: 04 Jul 2007
Posts: 74
Location: In that program you just downloaded

PostPosted: Thu Aug 23, 2007 11:15 am    Post subject: Reply with quote

wow thx u guys heh i didn't know u had to have a variable
_________________


Back to top
View user's profile Send private message
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