mfc-vs2010 -线程的创建

1.
命名全局
C*Dlg *plg;
在对话框的init函数中添加:
pdlg = this;
2.
按钮函数添加:
HANDLE hThread;
hThread = CreateThread(NULL,0,MakeThread,NULL,0,NULL);
CloseHandle(hThread);
3.
定义全局线程函数:
//处理线程
DWORD WINAPI MakeThread(
LPVOID lpParameter //thread data
)
{
//你的处理过程

return 0;

4.
mfc-vs2010 -线程的用法
over!

Leave a Reply