Short-cut Key (ALT-key) problem....

Hi everyone,

Im having problem with the ALT key as it does't functions when pressed. The other keys are OK.Can u guys give me some suggestion what minght be the problem...TQ.

Code:
void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
BOOL vkControl = (GetKeyState( VK_CONTROL ) < 0);
BOOL vkAlt = (GetKeyState( VK_MENU ) < 0);
}

This code i used to check whether the keys function...Control is OK except for MENU(ALT).
Hmm, I seem to recall there is a valid reason for that... but I'll have to spend some time looking it up. Give me a few days until I get a chance.
Hi - noticed you have the same question on the Windows forum - could you pelase delete that one (since it has no answers yet) to avoid duplicate posts?
Last edited on
closed account (z05DSL3A)
I'm a little unclear on what you are asking. If you want to do somthing when only the ALT key is pressed you will have to handle the WM_SYSKEYDOWN message.
Yes, that's it.
Topic archived. No new replies allowed.