15,979
社区成员
发帖
与我相关
我的任务
分享
class CExecuteDlg : public CDialog
{
...
public:
static UINT MyThread(LPVOID pParam);
...
};
UINT CExecuteDlg::MyThread(LPVOID pParam)
{
//弹出消息提示框
//完成其他功能的代码
//关闭消息提示框
return 0;
}
void CExecuteDlg::OnButtonTest()
{
// TODO: Add your control notification handler code here
CWinThread *pThread = AfxBeginThread(MyThread, this);
::WaitForSingleObject(pThread->m_hThread, INFINITE);
}