请教各位高手,
我的VC程序在PreTranslateMessage(MSG* pMsg)函数中响应键盘F8时,要求显示一个对话框,可是当我响应F8时居然PreTranslateMessage(MSG* pMsg)没有接获消息,可是F10和F11就可以,这个问题怎么解决呢??
多谢!!!

解决方案 »

  1.   

    BOOL CSingleviewView::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    switch(pMsg->message)
    {
    case WM_KEYDOWN:
    switch(pMsg->wParam)
    {
    case VK_F8:
    AfxMessageBox("aaaa");
    break;
    default:
    break;
    }
    break;
    default:
    break;
    }
    return CView::PreTranslateMessage(pMsg);
    }
      

  2.   

    好了 多谢! 因为刚才是在WM_SYSKEYDOWN下响应的消息,不知道在这个下就不可以。