Google Answers Logo
View Question
 
Q: C++/MFC ( No Answer,   1 Comment )
Question  
Subject: C++/MFC
Category: Computers > Programming
Asked by: jimmyjrosu-ga
List Price: $5.00
Posted: 06 Sep 2003 04:31 PDT
Expires: 06 Oct 2003 04:31 PDT
Question ID: 252857
Just a short question.  If I build an application using MFC, pretend I
only have a button and a text box.  How do I make it so that when the
button is clicked, the text in the box is inputed and sent to a
fuction(in another file)?

Request for Question Clarification by mathtalk-ga on 06 Sep 2003 06:50 PDT
Hi, jimmyjrosu-ga:

I'm not sure what you mean by "sent to a function (in another file)". 
If you are trying to call a function with a command button, you assign
that function as the event handler for that button.  If the function
you have in mind is defined in a source code file, already belonging
to your project, then you should have no problem making this
assignment.  If instead the function belongs to a DLL (dynamic link
library) that you aren't compiling as part of the project, you'll
probably want to add a ".LIB" file to your project which lists the
"entry points" available to you within that DLL.  A vendor who
supplies a DLL to a developer would typically provide the .LIB for it.

In short I need to hear a bit more about what you are trying to do in
order to help.

regards, mathtalk-ga

Clarification of Question by jimmyjrosu-ga on 06 Sep 2003 18:31 PDT
For example, I would have one text box.  The user would type in a
word, hit the "enter"  button and the word in the text box would be
put into a stack , queue.
Answer  
There is no answer at this time.

Comments  
Subject: Re: C++/MFC
From: vbary-ga on 10 Sep 2003 23:45 PDT
 
Use GetWindowText() function to get user's input from the edit
control. Handle BN_CLICKED message for the "enter" button and call
GetWindowText() there.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy