Click here to Skip to main content
15,922,007 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have set a hot key with:

RegisterHotKey(g_hWnd, g_iHotKeyID, HOTKEYF_ALT | HOTKEYF_CONTROL, 0x42);


The function returns not zero, so it is successful.

To the window proc for g_hWnd I added:

switch(msg)
{
...
   case WM_HOTKEY:
   {
     MessageBox(NULL, "HOT KEY PRESSED", "", 0);
     return TRUE;
   }
...
}


But I do not receive the message! Also Spy++ does not show the WM_HOTKEY message!

Can anybody give me a hint where to start searching?

What could be the problem? Does the window need to satisfy specific properties?

Regards,
Posted
Updated 25-Jul-10 9:02am
v2

1 solution

I have the solution!

Use MOD_ALT instead of HOTKEYF_ALT etc.!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900