rt

解决方案 »

  1.   

    请参考如下文章及代码:
    http://www.vckbase.com/document/viewdoc.asp?id=328
      

  2.   

    void CxxxView::OnRButtonDown(UINT nFlags, CPoint point) 
    {
    CMenu menu;
    VERIFY(menu.LoadMenu(IDR_POPUP_MENU)); CMenu* pPopup = menu.GetSubMenu(0);
    ASSERT(pPopup != NULL);
    CWnd* pWndPopupOwner = this; pWndPopupOwner = pWndPopupOwner->GetParent();
    ASSERT(pWndPopupOwner!=NULL);
         ClientToScreen(&point);
    pPopup->TrackPopupMenu(TPM_LEFTALIGN  | TPM_RIGHTBUTTON, point.x, point.y,
    pWndPopupOwner);

    CRichEditView::OnRButtonDown(nFlags, point);
    }
      

  3.   

    谢谢,此问题我已解决,上文所示是一种简单的方法,还可以通过派生自己的CMyRichEdit类,通过作一些定制来处理,多谢两位!