开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜