Solved

CEdit cut,paste etc. abilities

Posted on 2001-06-19
4
372 Views
Last Modified: 2013-11-20
Hi,
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 ??
thanks,
Iris.
0
Comment
Question by:irisz
  • 3
4 Comments
 
LVL 9

Expert Comment

by:Pacman
ID: 6206006
What about using CFormView ?
0
 

Author Comment

by:irisz
ID: 6206025
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.
0
 
LVL 9

Accepted Solution

by:
Pacman earned 25 total points
ID: 6206049
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.
0
 
LVL 9

Expert Comment

by:Pacman
ID: 6213927
do you have any questions?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now