基于Dialog的程序为什么不能使用类似VK_0的KeyEvent
在基于Dialog的程序中对键盘消息处理,为什么不能使用类似VK_0的KeyEvent?
BOOL CDrawScreenDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base Class
CDrawScreenDlg *pDlg=(CDrawScreenDlg*)AfxGetApp()->m_pMainWnd;
if(pMsg->message==WM_KEYDOWN)
{
switch(pMsg->wParam)
{
case VK_RIGHT:// 正确
myfunc1();
break;
case VK_0://error C2065: 'VK_0' : undeclared Identifier myfunc2();
default:
break;
}
}
return CDialog::PreTranslateMessage(pMsg);
}