奇怪,AfxBeginThread创建UI线程失败,并抛出访问非法内存的异常
m_pMsgProcThread = AfxBeginThread(RUNTIME_CLASS(CMsgProcThread),
THREAD_PRIORITY_NORMAL,
0,
CREATE_SUSPENDED);
CMsgProcThread是CWinThread的子类,CMsgProcThread类的头文件中有
DECLARE_DYNCREATE(CMsgProcThread)
CMsgProcThread的实现文件中有:
IMPLEMENT_DYNCREATE(CMsgProcThread, CWinThread)
这么会出这样的事呢?查了半天的资料没有找到为什么啊?