I am using the MFC dialog application.
There are 3 edit box, add1, add2 and sum
and a button "add",
when exectuing, I input add1, add2, and use the "add" function dlg.m_sum=dlg.m_add1+dlg.m_add2
how to make the sum appears in the "sum" edit box? Do I have to add a view class or how to modify the OnPaint?
I now only have add.cpp and addDlg.cpp
linq
0
Light Poster
Recommended Answers
Jump to Postin the OnButtonAdd() event handler for the button
1. assume m_sum, m_add1 and m_add2 are integer class member variables which were defined using ClassWizard (VC++ 6.0 compiler), just call UpdateData() after setting m_sum = m_add1 + m_add2.void OnButtonAdd() { // move window text into member variables …
All 4 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
linq
0
Light Poster
linq
0
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.