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 


[Problem] Reading values from another dialogs ! C++

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

Joined: 02 Dec 2007
Posts: 1415
Location: Under Ur Bed , Moauahauha

PostPosted: Wed Jun 24, 2009 11:00 am    Post subject: [Problem] Reading values from another dialogs ! C++ Reply with quote

Lately iv added some new dialog into my trainer

look at the pic (attached)

ok so whenever i turn auto hp/ mp , the game freeze!
thats because the auto pot function cannot read the values from dialog10 so it takes it as NULL or something ..

i used to have this to read the HP value (EDIT4 was in the main window)
unsigned AHPValue = GetDlgItemInt(hWnd, IDC_EDIT4, NULL, FALSE);

how do i fix it ?



untitledsfsfs.JPG
 Description:
gd
 Filesize:  51.86 KB
 Viewed:  3396 Time(s)

untitledsfsfs.JPG



_________________
ProsTrain VIP |..........| - 80% Done Smile im close to the finish line Smile
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Jun 24, 2009 11:44 am    Post subject: Reply with quote

here is one method. use SendMessage to that new dialog's dialogproc to fetch the number with GetDlgItemInt then get it to save it to a global variable

i'm sure there is a better method though tbh..
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Wed Jun 24, 2009 1:41 pm    Post subject: Re: [Problem] Reading values from another dialogs ! C++ Reply with quote

Pro-surf wrote:
Lately iv added some new dialog into my trainer

look at the pic (attached)

ok so whenever i turn auto hp/ mp , the game freeze!
thats because the auto pot function cannot read the values from dialog10 so it takes it as NULL or something ..

i used to have this to read the HP value (EDIT4 was in the main window)
unsigned AHPValue = GetDlgItemInt(hWnd, IDC_EDIT4, NULL, FALSE);

how do i fix it ?


I wouldn't do that. I would keep the actual value in a variable and set it to the dialog instead of relying in the text. And wow why is everyone making these "VIP" things...
Back to top
View user's profile Send private message
Pro-surf
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2007
Posts: 1415
Location: Under Ur Bed , Moauahauha

PostPosted: Thu Jun 25, 2009 6:58 am    Post subject: Reply with quote

dnsi can you give me an example please im such a shity coder..
_________________
ProsTrain VIP |..........| - 80% Done Smile im close to the finish line Smile
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Thu Jun 25, 2009 5:03 pm    Post subject: Reply with quote

Pro-surf wrote:
dnsi can you give me an example please im such a shity coder..


You declare a global variable like DWORD whatever. Then when you are setting, you make 2 changes. One to set the whatever declared and one to set the dialog's text. And when your accessing, your just accessing the var not the dialog text.

C++:

Code:
DWORD a;

void SetDialogText(DWORD data){
a=data;
//I dont know how to set dialog text... so set here
}

DWORD GetDialogText(DWORD Whichone){
if(Whichone==1){
return a;
}
}


The syntax is probably wrong...
Back to top
View user's profile Send private message
Pro-surf
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2007
Posts: 1415
Location: Under Ur Bed , Moauahauha

PostPosted: Thu Jun 25, 2009 7:59 pm    Post subject: Reply with quote

oh i see thanks
_________________
ProsTrain VIP |..........| - 80% Done Smile im close to the finish line Smile
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