heres my code for keyown:
Code:
static char altkey;
static bool keypress=false;
//.................
case WM_KEYUP:
//exit the program
if(wParam==VK_ESCAPE)
{
DestroyWindow(hwnd);
}
keypress=false;
return 0;
case WM_KEYDOWN:
if (KeyPressed(VK_MENU))
{
if(KeyPressed(altkey) && keypress==false)
{
SendMessage(hwnd,WM_COMMAND,BN_CLICKED,0);
keypress=true;
}
}
return 0;
i need these code works like the alt key combination, but seems that only works, when i press on that 2 keys in same time
so how can i press alt+altkey without be in same time?
(if the question is confused think on underline button caption letters('&'))