?
Solved

CEditView edit control data

Posted on 1998-05-14
3
Medium Priority
?
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 150 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

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: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses

764 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