Click to See Complete Forum and Search --> : updating my CEdit control
Lim Dau Hee
March 28th, 1999, 09:33 PM
I have a dialog based application. I am using SetWindowText to output some message in my CEdit control. I have several messages I want to show in one function. So let say I press the OK button, the CEdit control will show "Starting", "Downloading", "Completed" in sequence. However it seems that the CEdit control will only update once at the end of the function. So only the message "Completed" is shown at the end. What code should I add in to force windows to update my CEdit control several times in a function? Thanks
Ramon Saenz-Badillos
March 28th, 1999, 09:55 PM
Sounds like you are not using UpdateData(FALSE) to update your CEdit
after each of your SetWindowTexts.
Or maybe the three mesages are being written,but too fast for you to notice?
If Im way off pls let me know
Lim Dau Hee
March 28th, 1999, 11:21 PM
I added in UpdateData(FALSE) but it still doesn't work but I did a search on that and it seems that there is a UpdateWindows. I tried that and it works. Thanks for the reply. :)
Masaaki Onishi
March 28th, 1999, 11:59 PM
Hi.
Try ::Sleep API function.
For example,
CMyEdit->SetWindowText("Starting");
::Sleep(3000); //3 second to show "Starting"
CMyEdit->SetWindowText("Downloading");
::Sleep(3000);
CMyEdit->SetWindowText("Completed);
This is not one function.
However, actual FTP program seems to use the other process.
When you try to show FTP process, I don't know it yet.
Hope for help.
-Masaaki Onishi-
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.