Solved

CEditView edit control data

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

707 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