Quote Originally Posted by krmed View Post
The problem you have is that UpdateData, Invalidate, SetDlgItemText, and other similar calls actually perform what they are supposed to do, but the edit control itself does not repaint (with the new text) until the windows messages are processed. While you are in your function (waiting with a sleep or whatever) those windows messages are not processed.

However, you can force the window to repaint by using the UpdateWindow function.
Code:
SetDlgItemText (IDC_WHATEVER, _T("Text to be displayed."));
GetDlgItem(IDC_WHATEVER)->UpdateWindow();
// do your other stuff here - the window has already been updated
Hope that helps.
Didn't I say that already?