CEdit cut,paste etc. abilities

I created a CEdit Ctrl which its parent is the view:

void CIrisGUITestsView::OnCreateedit()
     CEdit* mEdit = new CEdit();
     CRect aEditRect(CPoint(10,10),CPoint(150,35));
     mEdit->Create (WS_BORDER | WS_CHILD |ES_AUTOHSCROLL|WS_EX_LTRREADING  ,aEditRect,this,0);
     mEdit->ShowWindow (SW_SHOW);          
when I tried to use copy & paste abilities of the CEdit Ctrl it does not working.
I found out that the same code is working when the parent is a dialog box...

Can someone please help me with this matter ??
Who is Participating?
PacmanConnect With a Mentor Commented:
The Window Procedure of the CDialog class handles the controls. If you add controls to a CWnd then you'll have no "control support". If you want this support in your CWnd then you've to create a CFormView in it and add the controls to the CFormView object.
What about using CFormView ?
iriszAuthor Commented:
I am not using a CFormView.
Besides, in my real app the parent of the CEdit is a CWnd and not a CView. I think that the problem occurs because that the parent of the Edit is not a dialog.
do you have any questions?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.