UI thread dialog?
Hi everyone,
I like to write a MFC program where files will be copied from one place to another. While worker thread is copying the files, I like to show users a window with file copying (the copied files will be displayed, then the some other file operations that worker thread will be processig at a time, are also to be reported). But the thing is that I don't know what kind of class would be used to implement that reporting window and UI thread to have the program with this feature. Can you please help me with that?
Thanks!!!
[551 byte] By [
vcboy] at [2007-12-24]
MTRECALC sample shows progress information in the satatus bar. You can create your own dialog and show progress information by any way you want - progress bar, text etc.
Specifically about copying files, you can do this by simple way with progress indication using SHFileOperation function.
Thanks for the hint. But I am a beginner in multithreading and need a whole picture. Now, I have created a dialog class (named as "CStatusDialog") that is activated by AfxBeginThread() call as a UI thread. So, I have to move my file copying codes to the CStatusDialog as worker thread function? So, is it a concept that worker thread must always be implemented in the UI class that user interface (UI) thread use?
According to the program design, the (compiled html) files are copied then need to be decompiled into html format. I have already written codes for decompilation process, but that process can't be called until files are copied. So, how can I handle this situation to happen?
Thanks a lot.
vcboy