bloodwinner wrote:
I am using the MFC dialog application.
Then you're not using C++/CLI, are you ?
bloodwinner wrote:
dlg.m_sum=dlg.m_add1+dlg.m_add2
I assume you have associated ints with the text boxes, not edit controls ? Then you need to call UpdateData before you do the calculation, to bring down the variables, and UpdateData(FALSE) after the calculation, to populate the controls again. Or, maybe the other way around. Please ask in the right forum next time :-)
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog