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 


CheckBox Issue

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

Joined: 21 Mar 2008
Posts: 131

PostPosted: Sun Aug 31, 2008 8:30 pm    Post subject: CheckBox Issue Reply with quote

Well, the hotkey area of my bot doesn't work. I got the main functions to work, etc, but for somereason, the checkboxes won't tick when I press teh appropriate hotkey. SendMessage keeps returning 0, even when I check the box, etc. I know it enters the message loop, because I put messageboxes within case 71:. However, I'm still completely lost in how to proceed. I have no idea why this doesn't work. Afaik, this should work. It does compile, its just that nothing happens or sendmessage returns 0; Help would be appreciated.

Thank you very much,
-waffles



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message AIM Address
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Aug 31, 2008 8:40 pm    Post subject: Reply with quote

Try using GlobalAddAtom as the id. and then instead of looking for the id, look for the Hotkey itself. I believe its the HIWORD of lParam that holds the virtual key...

Check the return values of RegisterHotkey

btw, for GetMSWnd, or w/e that function is called, add a sleep...

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

Joined: 21 Mar 2008
Posts: 131

PostPosted: Sun Aug 31, 2008 8:51 pm    Post subject: Reply with quote

Alright, but I really don't think its the hotkey that's the issue. I put a MessageBox inside of case x: SendMessage. And when it was == BST unchecked, it put up the MBox. Ill do your fix though, and see how it goes. Thanks for the input.

EDIT: How exactly do I use atoms? I've never used them before, and aren't really sure what they are. I checked MSDN, but am not sure how they relate to identifiers.
Back to top
View user's profile Send private message AIM Address
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Aug 31, 2008 9:10 pm    Post subject: Reply with quote

ATOM is just a definition for WORD.

In WndProc u have WPARAM, which is your Word Param, which allows 2 bytes of space to be added. Usually wParam is used for identifying... when it comes to reading it at least.

Anyways, scratch what I said about needing GlobalAddAtom. It's really only needed within a DLL. Although it still works using it in an EXE. It has to do with making sure the identifier is within a certain range which GlobalAddAtom returns.

_________________
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Aug 31, 2008 9:13 pm    Post subject: Reply with quote

You're defining the handles to your controls twice, and ending up using null as a handle when you try to send your messages.

You're creating and assigning handles to your controls when the function executes, not using the ones you already created in the header file. So basically, your HWND's go bye bye and since you never assigned the global ones to anything... you get null.



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message
WafflesFTW
Expert Cheater
Reputation: 0

Joined: 21 Mar 2008
Posts: 131

PostPosted: Sun Aug 31, 2008 10:55 pm    Post subject: Reply with quote

Wow, you are right! Thanks a ton. I love you Very Happy.
Back to top
View user's profile Send private message AIM Address
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