VC处理按键消息
BOOL CMFCApplication1Dlg::PreTranslateMessage(MSG* pMsg) { // TODO: 在此添加专用代码和/或调用基类 if (pMsg->message == WM_KEYDOWN) { switch (pMsg->wParam) { case VK_ESCAPE: SetFocus(); return TRUE; case 'X': if ((::GetKeyState(VK_CONTROL)&0x8000) > 0) MessageBox(_T("hello")); return TRUE; } } return CDialogEx::PreTranslateMessage(pMsg); }
网页题目:VC处理按键消息
转载注明:http://scyanting.com/article/jiogji.html