You may not access and should not attempt to create MFC objects from within threads created using the Threads.h++ runnable object classes. The MFC library relies on thread-local storage to store handles to any underlying Windows objects that were created within a given thread. The MFC class, CWinThread, creates this thread-local storage when it launches a thread. The restriction on access also applies to MFC threads; one thread may not access an MFC object created by another thread. If you need to manipulate a Windows object encapsulated by an MFC object instance created by another thread, you will need to acquire a handle to underlying Windows object and use that handle to manipulate the object directly.
Although you are not allowed to manipulate MFC instances from Threads.h++, you may still use the Threads.h++ synchronization and communication mechanisms with threads created by MFC and CWinThread.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.