调用窗口类的成员函数

.h文件中声明如下:public:VOIDtest(TCHAR*str);.cpp文件中内容如下:#include<thread>usingnamespacestd;voidCMFCApplication2Dlg::OnBnClickedButton6(){TCHAR*p=_T("helloworld");std::threadt(&CMFCApplication2Dlg::test,this,p);t.join();}VOIDCMFCApplication2Dlg::test(TCHAR*str){AfxMessageBox(str);}

VC++2015编译