wzdthrd.cpp
来自「MFC扩展编程实例」· C++ 代码 · 共 29 行
CPP
29 行
// WzdThrd.cpp : thread process
//
#include "stdafx.h"
#include "WzdThrd.h"
/////////////////////////////////////////////////////////////////////////////
// CWzdThread
UINT WzdThread( LPVOID pParam )
{
// get data from thread creator
THREADDATA *pData=(THREADDATA *)pParam;
// do calulations
for (int i=pData->nData;i<1000000;i++)
{
}
// save data back to thread creator
pData->nData=i;
// tell creator we're done
::SendMessage(pData->hDoneWnd, WM_DONE, 0, 0);
return 0; // return value up to you--parent can retrieve with GetExitCodeThread();
// can also call AfxEndThread(0) where the meaning of the argument is up to you
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?