Rich Editor
-
I have one dialog with CRichEditCtrl and a button. The function OnButton() will do the following: - display 'Please wait..' in rich editor - do some processing - display 'Done' in rich editor. - exit. Now, my problem is, the rich editor will not display 'Please wait..' immediately. Instead, the rich editor will display 'Please wait..' and 'Done' only after the OnButton() is exited. How can I force the rich editor to refresh immediately?
-
I have one dialog with CRichEditCtrl and a button. The function OnButton() will do the following: - display 'Please wait..' in rich editor - do some processing - display 'Done' in rich editor. - exit. Now, my problem is, the rich editor will not display 'Please wait..' immediately. Instead, the rich editor will display 'Please wait..' and 'Done' only after the OnButton() is exited. How can I force the rich editor to refresh immediately?
-
Do the processing in a separate thread. That will keep the dialog "alive" during the processing.
-
I have one dialog with CRichEditCtrl and a button. The function OnButton() will do the following: - display 'Please wait..' in rich editor - do some processing - display 'Done' in rich editor. - exit. Now, my problem is, the rich editor will not display 'Please wait..' immediately. Instead, the rich editor will display 'Please wait..' and 'Done' only after the OnButton() is exited. How can I force the rich editor to refresh immediately?
after you write the "please wait" message, try calling RedrawWindow() on the rich edit object to force an immediate repaint. Then continue with the processing. If pRichEdit is a pointer to your rich edit object, then you would call pRichEdit->RedrawWindow(). Regards, Dan Remember kids, we're trained professionals.
Don't try this at home! -
after you write the "please wait" message, try calling RedrawWindow() on the rich edit object to force an immediate repaint. Then continue with the processing. If pRichEdit is a pointer to your rich edit object, then you would call pRichEdit->RedrawWindow(). Regards, Dan Remember kids, we're trained professionals.
Don't try this at home!