I have a loop that changes the text using
SetWindowText(a);
UpdateWindow();
But the window is not being updated to the text. I know this because when I'm in debugging mode, updatewindow does not change the text after the debug step. I'm I using UpdateWindow() wrong?
Last edited by printz0r; June 19th, 2012 at 04:57 PM.
SetWindowText does not require a call to UpdateWindow() to show the updated content. CWnd itself take care of that and you no need to specify that explicitly.
Window is redrawn only when current message handler exits. Don't expect window to be redrawn on every loop iteration.
UpdateWindow is not required after SetWindowText.
Replace loop with timer, changing window text on every timer tick.
Window is redrawn only when current message handler exits. Don't expect window to be redrawn on every loop iteration.
UpdateWindow is not required after SetWindowText.
Replace loop with timer, changing window text on every timer tick.
Using SetEventMask(GetEventMask()|ENM_UPDATE); fixed the problem, so directly after UpdateWindow() is called, the text gets displayed. But how would I do a timer tick method?? That seems more efficient.
Bookmarks