Solved

IDC_EDIT Question

Posted on 2002-03-20
4
1,071 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 20 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

688 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