为什么我得点击一下窗口才能执行,我如何把时间设置到PROGRESS控件上去。 
m_progress_findcity.SetRange(0,100); //Set the range to between 0 and 100
     m_progress_findcity.SetStep(1); // Set the step amount
   
   m_nPos=m_progress_findcity.GetPos();
m_progress_findcity.SetPos(m_nPos);   for (int I = 0; I < 100; I++)
      {
            Sleep(20);
            m_progress_findcity.StepIt();
       }
CPROGESSDLG::OnCancel();