[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


get paste and cut event in CEditView

Posted on 2003-04-01
Medium Priority
Last Modified: 2013-11-20
In my program I must do something when do paste or cut in Editview.

But I found When Right mouse click in the view, it will show a pop menu which is not my menu. In the pop menu,it can paste and cut too! I can not detect the paste and cut event from the menu.

How can I get the event from the pop menu.
Question by:dead_fish
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 48

Expert Comment

ID: 8244117
Try to handle WM_COPY and WM_PASTE messages in CEditView.

Author Comment

ID: 8244157
LVL 12

Accepted Solution

williamcampbell earned 375 total points
ID: 8248718
Use pretranslate message

BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
   if ((GetDlgItem(IDC_EDIT1)->GetSafeHwnd() == pMsg->hwnd) &&     
        ((pMsg->message == WM_COPY) || (pMsg->message == WM_PASTE) )
         // Do you stuff here
         return TRUE; //don't process
        // it's either not our box or another message...
        return CDialog::PreTranslateMessage(pMsg);

Author Comment

ID: 8259099
I could not hands WM_CUT,WM_PASTE messages in PreTranslateMessage(MSG* pMsg) or

but I hands these in LRESULT CDsbView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam).

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question