VC++6.
I have a simple Dialog app. There is one Edit Box, updated in a function triggered by a Button. In the function, the Edit Box's CString member variable is modified twice, firstly as "a", then with "b". I have added a wait of 1 second between the two settings (to simulate some data collection tasks).
Whether I use
SetDlgItemText(IDC_DATA,m_data);
or
UpdateData(false) or UpdateData(NULL)
in conjunction with, or without
Invalidate();
only the text "b" appears in the Edit Box.
If however I insert
AfxMessageBox("paws");
after UpdateData(false), the text "a" does indeed appear in the Edit Box, and on quitting the AfxMessageBox, the text "b" appears in the Edit Box.
Obviously Winclows needs to perceive some or all of the Dialog Window as needing to be repainted - as evinced by the inclusion of the AfxMessageBox, which forces a repaint, but I cannot find a method which does this seamlessly.