我文档试图结构中的试图里面 使用Create(WS_VISIBLE|WS_CHILD,....)创建了
一个编辑框,在编辑框里点右键时可以复制和粘贴,但是这个编辑框不响应 ctrl+c,ctrl+v等快捷键。不知要怎么处理?

解决方案 »

  1.   

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/msdn_editctls.asp
      

  2.   

    继承一下
    在PreTranslateMessage中把这两个消息屏蔽掉
      

  3.   

    BOOL CMyEdit::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    if(pMsg->wParam == 'c'&& GetKeyState(VK_CONTROL) < 0)
    {
    AfxMessageBox("kkkk");
    }
    return CEdit::PreTranslateMessage(pMsg);
    }
    这样的代码怎么if始终为假?
      

  4.   

    问题解决了
    BOOL CMyEdit::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    if(pMsg->wParam == 'C'&& GetKeyState(VK_CONTROL) < 0)
    {
    AfxMessageBox("kkkk");
    }
    return CEdit::PreTranslateMessage(pMsg);
    }
    pMsg->wParam == 'C'就可以了//表示 ctrl c