====================================
添加4个测试按钮
//定义为全局的,好进行操作
HANDLE thread_handle;
void C_002_Dlg::OnBnClickedButton3()
{
LPDWORD tip=NULL;
thread_handle = CreateThread(NULL, 0, ThreadProc, 0, CREATE_SUSPENDED, tip);
//参数1 暂且默认为NULL 用于确定返回的句柄是否可以被子进程继承
//参数2 初始堆栈大小,暂且默认填写0,为可执行文件的默认大小
//参数3 指向由线程执行的函数的指针
//参数4 指向要传递给线程的参数
//参数5 0表示创建后既运行,4表示创建后挂起
//参数6 指向接收线程标识符的变量的指针。如果此参数为 NULL,则不返回线程标识符
//CreateThread文档
//https://docs.microsoft.com/zh-cn/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createthread
}
void C_002_Dlg::OnBnClickedButton5()
{
ResumeThread(thread_handle);
}
void C_002_Dlg::OnBnClickedButton4()
{
SuspendThread(thread_handle);
}
void C_002_Dlg::OnBnClickedButton6()
{
TerminateThread(thread_handle, 0);//参数2默认
//TerminateThread文档
//https ://docs.microsoft.com/zh-cn/windows/desktop/api/processthreadsapi/nf-processthreadsapi-terminatethread
}
=