【发布时间】:2012-03-20 17:13:21
【问题描述】:
我正在尝试使用 MFC 创建一个工作线程,所以这里是代码:
struct ThreadParam
{
HWND mDlg; // Note: A handle.
};
UINT TestMFCThread::Test( LPVOID pParam ){
//do work!
}
void TestMFCThread::OnBnClickedButton2()
{
ThreadParam* param = new ThreadParam;
param->mDlg = m_hWnd;
AfxBeginThread(Test, param);
}
但它给了我这个错误:
1 IntelliSense: no instance of overloaded function "AfxBeginThread" matches the argument list
argument types are: (UINT (LPVOID pParam), ThreadParam *)
idk whats wrong 它应该是正确的!
【问题讨论】:
标签: c++ multithreading mfc