Que. What are the different types of threads supported by MFC and Win32 ? Answers.....
MFC And Win32 supports two types of threads.
1. Worker thread. 2. UI Thread.
Worker Thread - this thread is used only for background processing. User can not interact with this thread as it has no User interface. It is represented by a global fuction.
This thread can be created using AfxBeginThread , _beginthread or CreateThread by passing a global fuction as parameter.
UI Thread - this thread has a user interface( Window). User can interact with it( for providing input/output).
This thread can be created using AfxBeginThread , _beginthread or CreateThread by passing a object of a class derived form CWinThread. This derived class must have message mapping and UI related code implemented.
In case of Win32 we need to pass a windows registered class with wndproc implemented.