-
Question
Hi,
I’m rather new to windows programming and trying to make my first program with WinApi. As a first program I chose calculator. I have done the GUI part and currently trying to make the calculation. But that is the thing, what causes me the problems…I just cant figure out how to do it. So my question would be, what algorithm (I don’t know, id its the best word for describing that, maybe function would be better) to use for getting values from 2 fields, multiplying them (also subtraction, addition etc.) and printing the value to Static text.
-
statictext = value1 * value2
?
-
Once you have the text of the number you need to convert it to a number, you can do this using the atoi function.
Then as dagdarian said value1*value2.
-
Hi,
I'm sorry, I couldn't answer before, but I could reform my question: How to take input from a field and later display it at Static text? (Considering I can do neither)
-
There are any number of basic tutorials which show you how to create a simple dialog and get values back from it.
http://faq.cprogramming.com/cgi-bin/...&id=1031248558