Solved

CEditView edit control data

Posted on 1998-05-14
3
330 Views
Last Modified: 2013-11-20
I am using the statement:
((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
in a simple text editor.  How do I call GetEditCtrl in CView, so that I can get at the data which comes into the edit control, and then operate on it with CString (Left, Mid, etc.)?.
0
Comment
Question by:dchicks
3 Comments
 
LVL 1

Expert Comment

by:guruprasad031298
ID: 1311145
I don't understand what is your problem.

You have a list of views (m_viewList). You retrieve views one by one from this list and type cast with (CEditView *), which should give you a pointer to the EditView if it is valid.

If the EditView is valid, you should be able to call GetEditCtrl() to get the edit control of the view. What is the problem here ?
0
 
LVL 7

Accepted Solution

by:
galkin earned 50 total points
ID: 1311146
CEdit& edit = ((CEditView*)m_viewList.GetHead())->GetEditCtrl();
CString str;
edit.GetWindowText(str);
0
 

Author Comment

by:dchicks
ID: 1311147
I entered the code and it was fine.  My problem is I am learning MFC, and I am learning about C language pointers, typecasts, etc.

Thanks for your help, galkin.

I don't know how many points to assess the answer.  It was an easy one for an expert, but not at my level.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

825 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