Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CEdit: Getting a line of text...

Posted on 1998-08-12
3
Medium Priority
?
492 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 150 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

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: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

704 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