How to show a value in an Edit Textbox
-
Hi guys, I've written an application in pure C++ and the command line and now I'd like to convert it to Windows. I am at the very first steps in using MFC and I am wondering if anyone could be kind enough to help. To simplify the problem, let's suppose my application is composed of 2 input edit text boxes (Box1, Box2), a button (Calculate), and 1 output textbox (Box3). What is the correct code required to display the result of the calculation (Box1+Box2) in the output textbox (Box3)? I've read 1300 pages of the excellent Ivor Horton's Beginning C++ 2008 book....only to discover that this simple topic is not covered!! Many thanks jEDI
-
Hi guys, I've written an application in pure C++ and the command line and now I'd like to convert it to Windows. I am at the very first steps in using MFC and I am wondering if anyone could be kind enough to help. To simplify the problem, let's suppose my application is composed of 2 input edit text boxes (Box1, Box2), a button (Calculate), and 1 output textbox (Box3). What is the correct code required to display the result of the calculation (Box1+Box2) in the output textbox (Box3)? I've read 1300 pages of the excellent Ivor Horton's Beginning C++ 2008 book....only to discover that this simple topic is not covered!! Many thanks jEDI
J_E_D_I wrote:
What is the correct code required to display the result of the calculation (Box1+Box2) in the output textbox (Box3)?
Call
SetWindowText()
, or send the control aWM_SETTEXT
message."Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
-
Hi guys, I've written an application in pure C++ and the command line and now I'd like to convert it to Windows. I am at the very first steps in using MFC and I am wondering if anyone could be kind enough to help. To simplify the problem, let's suppose my application is composed of 2 input edit text boxes (Box1, Box2), a button (Calculate), and 1 output textbox (Box3). What is the correct code required to display the result of the calculation (Box1+Box2) in the output textbox (Box3)? I've read 1300 pages of the excellent Ivor Horton's Beginning C++ 2008 book....only to discover that this simple topic is not covered!! Many thanks jEDI
in
MFC
you may also map the three textboxes to three integer variables and use theUpdateData
mechanism see [^]. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
J_E_D_I wrote:
What is the correct code required to display the result of the calculation (Box1+Box2) in the output textbox (Box3)?
Call
SetWindowText()
, or send the control aWM_SETTEXT
message."Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch