我想添加一个线程,用来判断数据,代码如下UINT CMy1Dlg::judge(LPVOID pParam)
{
if((m_a.GetCurSel()==0)
{
int a=1;
int b=2;
}
}这样定义可以吗?
如果可以的话 那LPVOID pParam怎么办?我在pThread=AfxBeginThread(judgedatebiaoshi, ??)的问号处该怎么写呢?谢谢
{
if((m_a.GetCurSel()==0)
{
int a=1;
int b=2;
}
}这样定义可以吗?
如果可以的话 那LPVOID pParam怎么办?我在pThread=AfxBeginThread(judgedatebiaoshi, ??)的问号处该怎么写呢?谢谢
不可以的话再说,还有其他的方法
??=NULL
{
CMy1Dlg *pThis;
pThis = (CMy1Dlg*)pParam;
if((pThis->m_a.GetCurSel()==0)
{
int a=1;
int b=2;
}
...线程函数使用类成员函数要用静态的, this指针需要传递
pThread=AfxBeginThread(judgedatebiaoshi, this)