标签:int log public c++ read i++ start mil test
struct TThreadParam { LPVOID pThis; int visionIndex; }; class CMilTestDlg : public CDialog { // Construction public: CMilTestDlg(CWnd* pParent = NULL); // standard constructor TThreadParam threadParma[MaxVisionNum]; static UINT VisionThread(LPVOID param); } void CMilTestDlg::Start() { for (int i=0;i<MaxVisionNum;i++) { threadParma[i].pThis = this; threadParma[i].visionIndex = i; AfxBeginThread(VisionThread,&(threadParma[i])); } } UINT CMilTestDlg::VisionThread(LPVOID param) { TThreadParam * pParam = (TThreadParam *)param; CMilTestDlg * pDlg = (CMilTestDlg *)(pParam->pThis); int visionIndex = pParam->visionIndex; pDlg->VisionProcess(visionIndex); return 1; }
标签:int log public c++ read i++ start mil test
原文地址:http://www.cnblogs.com/profession/p/7418938.html