Where should we write the original thread-function in a thread class
I was going through the CWinThread tutorial and found that the classes derived from CWinThread can be used inside AfxBeginThread. Please tell me where(under which function) should i write the logic for the threading or which is the alternative for UINT MyControllingFunction( LPVOID pParam ); inside the 开发者_StackOverflow社区CWinThread class.
Regards,
John.
Hi usualy thread function logic written in class member function
UINT CMyThread::ThreadProc( LPVOID param )
{
CMyClass * pInstance = reinterpret_cast<CMyClass*>(param);
return pInstance->DoMyLogic();
}
if i understand your question
精彩评论