I saw today how to use UpdateData() to grab some text in an EditBox and put it in a MessageBox, when I click a button. But I don’t think I understand UpdateData() right.
I’ve defined a CString for the Edit Box in OnInitDialog() like this:
I don’t get what UpdateData() do here- could you please explain?Code:m_strread = "the last supper"; UpdateData(FALSE);
The lines for displaying that string in the MessageBox are:
As I understand UpdateData() above tells to update the MessageBox’s data to EditBox’s data. Am I right?Code:UpdateData(TRUE); AfxMessageBox(m_strread);
Thanks.



LinkBack URL
About LinkBacks


