Multithreading & Doc_View
-
Hi, I'm writing a MDI application and I want to put each pair of Doc-View rinning in a separate thread. Does anyone know how to do this? Thanks in advance!
AFAIK, it's not safe or desirable to put user interface elements in separate threads with MFC. Use threading to do the jobs that will take a long time to do in the user interface (and which usually lock it up), for example: Loading a large file, or performing a calculation on a large set of data can be usefully done in a separate thread. ================== The original message was: Hi,
I'm writing a MDI application and I want to put each pair of Doc-View rinning in a separate thread.
Does anyone know how to do this?
Thanks in advance! -
Hi, I'm writing a MDI application and I want to put each pair of Doc-View rinning in a separate thread. Does anyone know how to do this? Thanks in advance!
Hello, Check the MS Advanced MFC sample -- MTMDI. It does exactly what you want. When I studied this the first reaction was why will someone do anything like this, since the sample will still run correctly without the threaded support. Now, I realize such a need do exist!!! Regards, Paul.