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 


[VC++ 6] How do you creat a hotkey in a gui app?

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

Joined: 21 Jun 2006
Posts: 1944
Location: Florida

PostPosted: Fri Oct 05, 2007 2:27 pm    Post subject: [VC++ 6] How do you creat a hotkey in a gui app? Reply with quote

ive looked on google and they all wind up being for cmd prompts
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri Oct 05, 2007 2:28 pm    Post subject: Reply with quote

RegisterHotKey

http://msdn2.microsoft.com/en-us/library/ms911003.aspx

is this what you want to do?
Back to top
View user's profile Send private message
Splizes
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Jun 2006
Posts: 1944
Location: Florida

PostPosted: Fri Oct 05, 2007 2:34 pm    Post subject: Reply with quote

I need an example of this used.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Fri Oct 05, 2007 2:48 pm    Post subject: Reply with quote

Code:
RegisterHotKey(hwnd, 0x0001, 0, VK_F5);

we register our hotkey, it's ID is 1 and the key is F5.

http://msdn2.microsoft.com/en-us/library/ms912649.aspx
looking at this we see: WM_HOTKEY idHotKey = (int) wParam so...

Code:
case WM_HOTKEY:      
switch(wParam)
{
   case 0x0001:
      //do wonderful things
      break;
}
return TRUE;

Code:

UnregisterHotKey(hwnd, 1);

When we're done, free up the resources.
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Fri Oct 05, 2007 2:50 pm    Post subject: Reply with quote

use
if(!RegisterHotkey(crap in here)){
show your error message
}

it will attempt to register it, if it can't you get a message

_________________
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