|
-
November 20th, 2009, 01:30 PM
#10
Re: Dialog : How to update an Edit Box?
 Originally Posted by krmed
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|