Solved

CEditView edit control data

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
if loop in java 3 160
Doc'in system (example?) BA 7 120
countEvens challenge 2 113
JQuery serialize and unserialize 8 179
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

679 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