void CMultiThread5Dlg::OnStart() ...{ // TODO: Add your control notification handler code here UpdateData(TRUE); Info.nMilliSecond=m_nMilliSecond; Info.pctrlProgress=&m_ctrlProgress; pThread=AfxBeginThread(ThreadFunc, &Info); }
在函数BOOL CMultiThread3Dlg::OnInitDialog()中添加语句:
...{ …… // TODO: Add extra initialization here m_ctrlProgress.SetRange(0,99); m_nMilliSecond=10; UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control }