Solved

CEditView edit control data

Posted on 1998-05-14
3
328 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

12 Experts available now in Live!

Get 1:1 Help Now