MFC objects are not thread safe. So you can't call MFC functions like
from another thread.
A usual solution to this problem is posting user defined messages from the worker thread to the other (main) thread.
As a starting point you may read Multithreading: Programming Tips
] and follow the links. This has not changed much since VC 6. But you should think about using a more recent version.