|
-
June 15th, 1999, 11:17 AM
#1
copy/paste with edit control, HOW TO?
Hi All,
I should test the content of an edit.
But I don't know how to catch the paste event from edit menu (right button mouse)
With Ctrl+V, the CMyEdit::OnChar(...) method is called.
But with the mouse this method is not called.
Has anyboby an idea how to treat this event
thanks
oliver
-
June 15th, 1999, 11:31 AM
#2
Re: copy/paste with edit control, HOW TO?
Are you talking about a CEdit control? If so, maybe the EN_CHANGE event is triggered when this happens. Try handling that event for the control and call your check function in the handler.
Best of luck,
Chris
"No! Try not. Do...or do not. There is no try."
- Yoda, Jedi Master
-
June 16th, 1999, 02:25 AM
#3
Re: copy/paste with edit control, HOW TO?
Hi Chris,
Thanks for your answer.
I already triggered this event in the CDialog that using a such CEdit.
And when I implement the CEdit::OnChange, the CDialog is not notifyed by this event.
So, how can I forwarding this event to the CDialog?
Cheers
oliver
-
June 16th, 1999, 02:38 AM
#4
Re: copy/paste with edit control, HOW TO?
Firstly, I notice you said 'CEdit::OnChange()' - just to clarify, are you aware that you should add a handler for EN_CHANGE to the dialogue box class itself, not attempt to add it to the edit control as a reflected message or anything like that?
Secondly, I believe that both <Ctrl>V as a key combination and choosing Paste from the right-click menu result in WM_PASTE being sent TO THE EDIT CONTROL ITSELF. This means that you would need to derive your own class from CEdit and subclass the existing edit control, then handle the WM_PASTE message as required. If you want information on how to do this, e-mail me ([email protected]).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|