Hello, I'm looking to solve this problem.
I'm programming a simple beginning application to learn multithreading under WinXP and using VC++ and MFCs.
My single-threaded app does a timed access to a slow data source, say 1 access every 30 secs. Every time I start the "download" it takes more than 5 seconds to be completed, and in this time the GUI is blocked.
I was thinking to do this work by using a thread for download while the main window continues with its message pump, but I have a problem: the classes/objects that I use to do the download work are created before calling the thread, and not created by the thread, so I can't use those objects from the thread...
How can I do? I read about syncronization mechanisms but I don't know if this is the case: how can I syncronize the access to entire objects? The thread needs to use also the thread calling object...
Thank you for all the hints,