MFC Multithread question
-
This is my first crack at Multithreading and I am going to do it on MFC. I read that MFC has 2 types of threads (The User Interface Thread and The Worker Thread). Obvious one is for the GUI Message Queue and the other is for the programs internal Work. Now onto my question: 1). Since an MFC program already has a its main thread that does all the work when you open the program, could I just leave that as the GUI thread and make one more thread as the worker thread? Or Do I have to make one thread for each? Thanks
-
This is my first crack at Multithreading and I am going to do it on MFC. I read that MFC has 2 types of threads (The User Interface Thread and The Worker Thread). Obvious one is for the GUI Message Queue and the other is for the programs internal Work. Now onto my question: 1). Since an MFC program already has a its main thread that does all the work when you open the program, could I just leave that as the GUI thread and make one more thread as the worker thread? Or Do I have to make one thread for each? Thanks
Just one extra thread as a worker thread is OK. I suggest you have a look at Joseph M. Newcomer's MVP pages, under "Threads and Processes" http://www.flounder.com/mvp_tips.htm[^]. Paul