How does a CRichEditCtrl know a paste operation has been performed?

前端 未结 5 1406
说谎
说谎 2020-12-19 16:02

It has methods like CRichEditCtrl::Copy(), CRichEditCtrl::Paste() which you can call, but I can\'t spot any messages the control is sent by Windows

5条回答
  •  梦毁少年i
    2020-12-19 16:52

    i have to perform like below

    void MyRichEcit::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
    {
    
    
    if( ( GetKeyState(VK_CONTROL)<0 && nChar==88 ) || (nChar==VK_DELETE && GetKeyState(VK_SHIFT) < 0) ) //cut
        {
    
        }
    
    if( ( GetKeyState(VK_CONTROL)<0 && nChar==86 ) || (nChar==VK_INSERT && GetKeyState(VK_SHIFT) < 0) ) //paste
        {
    
        }
    
    
        CWnd::OnKeyDown(nChar, nRepCnt, nFlags);    
    }
    

提交回复
热议问题