Solved

CEdit: Getting a line of text...

Posted on 1998-08-12
3
482 Views
Last Modified: 2013-11-20
I am new to MFC and I am using ClassWizard to make an application.  I know how to receive text from a CEdit
object using SetSel, and then GetLine when I am creating and destroying everything myself.  But, when I use classWizard, I am not sure how to get a pointer to the two CEdit boxes that are in my application.
Thanks very much for your time.
0
Comment
Question by:bass_glen
[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 2

Accepted Solution

by:
SamratAshok earned 50 total points
ID: 1320697
You can write code to get window pointers using class wizard. You can use function the
GetDlgItem(int idofControl) function to obtain the pointer though. In most cases, you have
to cast the return value to something more useful.

Refer to documentation on GetDlgItem function for more info.
0
 
LVL 9

Expert Comment

by:Priyesh
ID: 1320698
Please make it specific where u have Edit boxes?? Did u create them? or are they in a dialog??
If they are in a dialog, use CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT1) ;
provided IDC_EDIT1 is the id of u'r edit box....
      Regards..
0
 

Author Comment

by:bass_glen
ID: 1320699
Yes, after casting it to a CEdit, I had no problem getting the data from the CEdit box.  Thanks very much.  I really appreciate your help.  Sorry it took me so long to get back, I had to try it out first and make sure that I could figure out what was going on.
Thanks again.
-GLEN...
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

626 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