📄 wzdthrd.cpp
字号:
// WzdThrd.cpp : thread process
//
#include "stdafx.h"
#include "WzdThrd.h"
/////////////////////////////////////////////////////////////////////////////
// CWzdThread
UINT WzdThread( LPVOID pParam )
{
// get data from thread creator
THREADDATA *pData=(THREADDATA *)pParam;
// get current data
int nInt;
float fFloat;
DWORD dwWord;
pData->pWzdData->GetData(&nInt,&fFloat,&dwWord);
// do calulations
for (int i=nInt;i<1000000;i++)
{
}
// save data back to thread creator
pData->pWzdData->SetData(nInt,fFloat,dwWord);
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -