这种问题...在你的OnKeyDown函数里SHORT LeftKeyState = GetKeyState(VK_LEFT);
SHORT RightKeyState = GetKeyState(VK_RIGHT);
SHORT DownKeyState = GetKeyState(VK_DOWN);
SHORT UpKeyState = GetKeyState(VK_UP);//判断一下
//If the high-order bit is 1, the key is down; otherwise, it is up.
if( (LeftKeyState&0x80) &&(RightKeyState&0x80) )
{
//左右键按下
....
}
//同理可得其他情况。
SHORT RightKeyState = GetKeyState(VK_RIGHT);
SHORT DownKeyState = GetKeyState(VK_DOWN);
SHORT UpKeyState = GetKeyState(VK_UP);//判断一下
//If the high-order bit is 1, the key is down; otherwise, it is up.
if( (LeftKeyState&0x80) &&(RightKeyState&0x80) )
{
//左右键按下
....
}
//同理可得其他情况。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货