View previous topic :: View next topic |
Author |
Message |
Sharel972 Newbie cheater
Reputation: 0
Joined: 02 Nov 2009 Posts: 24 Location: israel
|
Posted: Mon Nov 09, 2009 12:57 am Post subject: [C++] Disable Hot keys - Dll injection |
|
|
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 |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Nov 09, 2009 2:05 am Post subject: |
|
|
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 |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Mon Nov 09, 2009 6:00 am Post subject: |
|
|
Alternatively IsDlgButtonChecked() |
|
Back to top |
|
 |
Sharel972 Newbie cheater
Reputation: 0
Joined: 02 Nov 2009 Posts: 24 Location: israel
|
Posted: Tue Nov 10, 2009 1:49 pm Post subject: |
|
|
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 |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Tue Nov 10, 2009 2:20 pm Post subject: |
|
|
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 |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Nov 10, 2009 3:27 pm Post subject: |
|
|
or you could just simply not handle WM_HOTKEY i suppose. |
|
Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Thu Nov 19, 2009 7:06 pm Post subject: |
|
|
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 |
|
 |
|