Just to add....
case WM_KEYDOWN:
{
int keyCode = (int)wParam;
switch (keyCode)
{
case VK_LMENU: //Left ALT
{
MessageBox(NULL, "left POP!", "", 0);
break;
}
case VK_RMENU: //Right ALT
{
MessageBox(NULL, "right POP!", "", 0);
break;
}
case VK_PRIOR: //Page Up
{
MessageBox(NULL, "foobar!", "", 0);
break;
}
}
break;
}
Only Page Up gets detected in the keydown, where is ALT going?!
VK_MENU gets fired on Key Down but only with the Right ALT, not the Left...
Sorry to go on...
Nick
(For some really stupid reason I just accidently posted to the wrong group /
thread entirely.. stupid me!)
Post by NickPHi Dave,
Well the application is basically just an empty form with graphics
being drawn onto it with a combination of GDI / GDI+, so I have no
standard Win32 controls on it. The only place that I'm actually checking
for the ALT key being pushed is in the main window handles message
handler...
{
int keyCode = (int)wParam;
switch (keyCode)
{
case VK_RETURN: //Return-Enter
{
if(GetKeyState(VK_LMENU) & 0x8000)
//Do stuff;
break;
}
}
break;
}
I can use VK_MENU, VK_LMENU or VK_RMENU but the only key that gets
detected is the right ALT. Maybe I should be just raising a flag on the
VK_LMENU keydown. I'll try a few things now.
Nick.
Post by David LowndesPost by NickPI had tried that too at one point, and still no luck, I just get beeped
at by the PC speaker, would that mean something else is getting focus when
ALT is pressed? The window that this is being trapped in contains no
standard Win32 controls at all, I can trap the right ALT perfectly but not
the left. Any ideas?
Nick,
You'll need to explain a bit more about your situation.
Dave