Click to See Complete Forum and Search --> : copy/paste with edit control, HOW TO?
chamo
June 15th, 1999, 11:17 AM
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
Chris Meyer
June 15th, 1999, 11:31 AM
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
chamo
June 16th, 1999, 02:25 AM
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
Jason Teagle
June 16th, 1999, 02:38 AM
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 (jteagle@solartron.com).
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.