?
Solved

IDC_EDIT Question

Posted on 2002-03-20
4
Medium Priority
?
1,084 Views
Last Modified: 2013-11-20
Hi, I'm using Visual C++ 6.0 how would i get the text of a textbox named "IDC_EDIT1" and display it in a AfxMessageBox?

Thanks
0
Comment
Question by:will29131
[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
4 Comments
 
LVL 4

Accepted Solution

by:
inpras earned 80 total points
ID: 6883647
char valOfEdit[100];
GetDlgItemText( IDC_EDIT1, LPTSTR(valOfEdit), 100 );
AfxMessageBox(valOfEdit);
Hope this helps
inpras
0
 

Expert Comment

by:l_angelo
ID: 6912386
you could also do a message mapping under class wizard.

Map the edit control to a member variable.

Ex. IDC_EDIT1 -> m_strEdit1

Mapped as a CString.

In the place u need to show on the message box,

you do

UpdateData(FALSE);
AfxMessageBox(m_strEdit1);



0
 
LVL 11

Expert Comment

by:griessh
ID: 7203943
Dear will29131

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "inpras"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7233999
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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: 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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 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