15,471
社区成员
发帖
与我相关
我的任务
分享
#include <process.h>
class A
{
public:
void Init(char* str,int a)
{
strcpy(m_str,str);
}
friend UINT _stdcall Begin(void* p);
char m_str[260];
};
A ga;
UINT _stdcall Begin(void* p)
{
A* pa=(A*)p;
char s1[260];
strcpy(s1,pa->m_str);
AfxMessageBox(s1);
//
return 0;
}
void CAboutDlg::OnButton1()
{
// TODO: Add your control notification handler code here
ga.Init("ssss",5);
// Sleep(1000);
_beginthreadex(0,0,Begin,(LPVOID)&ga,0,0);
}