Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to get a Value

Status
Not open for further replies.

Hasch2o

Programmer
Oct 1, 2001
12
CH
Hello Everybody,

my problem is that I want to make a window, where a user can put information.
After that I want to calculate with this information, the information-variable
is a double. I got the Program as a Console-file, but I want to do it with the
MFC Appwizard.
I have no Idea if anyone understands what im writing here, but if so, Pleae help
me!!!!!

Thanx a lot, I'm just a little Newbie :)

Hasch2o
 
Hi,
in asking questions like this it's highly recommnded that you tell about your knowledge of C, C++, VISUAL C++ !
windows programs work quite different then console (maybe DOS) programs, in inputting data as well as in outputting !
 
Hi Fheyn

All Right then:

I'm in a Apprenticeship and I started with c++ in school 3 months ago. Visual C++ is just something I do for fun, more or less. Now I started to do a win32 console apllication which allows me to bring out the 2 solutions of ax^2*bx*c=0 . This worked really well and I had no Problems with that. And now I want to do the same with Visual C++. But I've got no great Idea, so I'm just trying.
But now I've got the problem that I started with the Appwizard and I've got the DIALOG like I wanted. but now I want that I can get the Value (a,b,c) from the equation i've written allready. But I don't know how I can get these Values for calculations I Have to do.

I hope it is written a little bit more understandable.

Hasch2o
 
OK
Here is what you do :
you'll create three edit-controls for inputting your values a, b, c. Use Class-Wizard to create a member variable for
each control.
Create a button-control which will start your calculation.
On the buttons click-event call your calculation-function.
create an edit-control with member variable for showing the functions result.
Try it out ! it's fairly easy.
And don't forget : UpdateData(TRUE) writes the control-value
(that's what you see) to the associated member-variable.
UpdateData(FALSE) updates your control (if the member-variables value has changed).
 
THX a lot, It work for now, but now i've got the problem that i have to #Include<math> , but I don't know where, so I tried but it didn't work at all,
it gave me 60 errors out.

Do you know a solution for that problem too???

Thx again for the first solution

Hasch2o
 
Include it in your dialogs headerfile.
and it's math.h
 
Thx a lot it works and now I'm really happy.

greetings from Switzerland

Yours Hasch2o
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top