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++] Disable Hot keys - Dll injection

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Sharel972
Newbie cheater
Reputation: 0

Joined: 02 Nov 2009
Posts: 24
Location: israel

PostPosted: Mon Nov 09, 2009 12:57 am    Post subject: [C++] Disable Hot keys - Dll injection Reply with quote

I am try to create a chack box that if u chack it so the hot keys will be disable , and if u unchack it the hotkeys will be turn on back .
What am I supposed to do?
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Nov 09, 2009 2:05 am    Post subject: Reply with quote

Learn the basics?
If you can't figure out how to not check for your own hotkeys, there might just be a problem.

Send BM_GETCHECK
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Mon Nov 09, 2009 6:00 am    Post subject: Reply with quote

Alternatively IsDlgButtonChecked()
Back to top
View user's profile Send private message
Sharel972
Newbie cheater
Reputation: 0

Joined: 02 Nov 2009
Posts: 24
Location: israel

PostPosted: Tue Nov 10, 2009 1:49 pm    Post subject: Reply with quote

u didn't understanded me , i am know hot to create the check box i don't know what to write in the chack box to disble the hotkeys .
Back to top
View user's profile Send private message MSN Messenger
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Nov 10, 2009 2:20 pm    Post subject: Reply with quote

I'll assume your hotkeys are done with RegisterHotKey() in which case you can check the state of the checkboxes by handling WM_COMMAND when notification is BN_CLICKED. wParam will be the button identifier

Then disable your hotkey with UnregisterHotKey()
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Nov 10, 2009 3:27 pm    Post subject: Reply with quote

or you could just simply not handle WM_HOTKEY i suppose.
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Thu Nov 19, 2009 7:06 pm    Post subject: Reply with quote

If I understand you correctly...

Add a CheckBox1 to your form, and 2 Timers, Timer1 and Timer2, i'm assuming your using C++.

In timer1's properties, enable Checked to true, and interval is 1. Now double click on it and add this code:

Code:

if (this->CheckBox1->Checked == true)
{
   this->Timer2->Enabled == true;
}
else
{
   this->Timer2->Enabled == false;
}


In timer2 add this code:

Code:

if (GetAsyncKeyState(VK_F11)) // for example, this is your hotkey
{
   //do stuff
}


Set timer2 to false.

IF YOU WANT TO HOOK HOTKEYS IN GENERAL THEN USE

- SetWindowsHookEx, hook the keyboard, in your callback do:

Code:

if (wParam > 0)
{
   // replace the hotkey with nothing if the checkbox is not enabled
}

if (lParam > 0)
{
  // replace the hotkey with nothing if the checkbox is not enabled
}


If the checkbox is enabled do some other code in the if's, example:

Code:

if (wParam > 0)
{
   MessageBoxA(0, "No Hotkeys", "No Hotkeys", MB_OK);
}

if (lParam > 0)
{
   MessageBoxA(0, "No Hotkeys", "No Hotkeys", MB_OK);
}
Back to top
View user's profile Send private message MSN Messenger
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