解决方案 »

  1.   

    BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) 
    {
    if(pMsg->message == WM_KEYDOWN)
    {
    if(GetAsyncKeyState(VK_CONTROL)<0 &&
    GetAsyncKeyState(86)<0)
    {
    ....
    }
    return TRUE;
    }
    return CFrameWnd::PreTranslateMessage(pMsg);
    }
    我已经试过了,绝对可行。
    http://expert.csdn.net/Expert/topic/2290/2290228.xml?temp=.8782007lzwcom(梅花香自苦寒来)  的回复。
      

  2.   

    BOOL CMydilog::PreTranslateMessage(MSG* pMsg) 
    {
    if (pMsg->message == WM_KEYDOWN)
    {
    switch (pMsg->wParam)
    {
    case VK_ESCAPE:
    SetFocus ();
    return TRUE;
    case 'V':
    if(::GetKeyState(VK_CONTROL) < 0)
    MessageBox("hello");
    return TRUE;

    }
    }
    return CFrameWnd::PreTranslateMessage(pMsg);
    }呵呵,一样可行^_^