如题。

解决方案 »

  1.   

    重载EditBox的按键消息,判断是CTRL时不做处理
      

  2.   

    PreTranslateMessage里去抓消息呢?
    pMsg->hwnd == m_editbox.m_hwnd  && pMsg->message ==wm_keydown && pMsg->wParam == VK_CONTROL 这三个条件满足 return TRUE
      

  3.   

    To: forover(天下无吥散dě宴席) 
        能否给点样例代码?To: tyro1(栖息的飞鸟) 
        PreTranslateMessage 抓消息,请问具体怎么弄的?
      

  4.   

    用classwizard,重写editbox所在对话框的PreTranslateMessage。
    BOOL CBmptranceDlg::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class

    return CDialog::PreTranslateMessage(pMsg);
    }
      

  5.   

    BOOL CExDlg::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_CONTROL && pMsg->hwnd ==  GetDlgItem(IDC_EDIT1)->m_hWnd) {
             return TRUE;
    }
    return CDialog::PreTranslateMessage(pMsg);
    }
      

  6.   

    还不行! “CTRL + C”、“CTRL +V”还是能用.我的代码,请问哪不对?
    BOOL CAboutDlg::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class

    if(pMsg->hwnd ==  GetDlgItem(IDC_EDIT2)->m_hWnd  && pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_CONTROL )
    {  
    return true;
    }
    return CDialog::PreTranslateMessage(pMsg);
    }
      

  7.   

    BOOL CDeriveDlgDlg::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    if(pMsg->message==WM_KEYDOWN)
    {   
    if(pMsg->wParam=='V' && (GetKeyState(VK_CONTROL) & 0x80))
    {   
    {
    return TRUE;
    }
    }   
    }   

    return CDialog::PreTranslateMessage(pMsg);
    }
    其他同理..