Solved

IDC_EDIT Question

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

839 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