Maritimer
asked on
Learning Visual C++ - Working with edit boxes
I have just started with Visual C++.
I have created a MFC application Diaglog. On the form I have created a Edit box.
I have assigned the the control's the following ID's
IDC_user_message
Using the Class wizard I have assigned a member variable m_message using the class wizard.
In the code I want to make the edit box display some text that I will hard code.
I have created a MFC application Diaglog. On the form I have created a Edit box.
I have assigned the the control's the following ID's
IDC_user_message
Using the Class wizard I have assigned a member variable m_message using the class wizard.
In the code I want to make the edit box display some text that I will hard code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
UpdateData(FALSE) refresh all members values into the linked controls.
So be carefull if you want to upgrade only one control, it is more secure to do this (in order to record any user changes) :
UpdateData(TRUE); // Retrieve values from control
m_message=myvalue;
UpdateData(FALSE); // Refresh m_message