From the code you can identify which is worker thread and which is UI thread.
The UI thread class is always derived from
CWinThread
. You can check in the code who is inherting the class
CWinThread
.
The worker thread function may look like below
UINT ThreadFunc (LPVOID pParam)
{
:
:
return 0;
}
and code starting this thread may like this
CWinThread* pThread = AfxBeginThread (ThreadFunc, &threadInfo);
A UI thread class declartion may look like below
class CUIThread : public CWinThread
{
DECLARE_DYNCREATE (CUIThread)
public:
virtual BOOL InitInstance ();
};
and the code creating the UI thread as below
CWinThread* pThread = AfxBeginThread (RUNTIME_CLASS (CUIThread));
This just helps you in identfying. May be to proceed further, you should have good understnding on the difference between both. For that you can refer any good tutorial