控件使用--CProgressCtrl

来源:互联网 发布:小猪cms微信营销系统 编辑:程序博客网 时间:2024/06/06 08:35

初始化Progress, 不是必须的

BOOL CDlgProgress::OnInitDialog()
{
 CDialog::OnInitDialog();
 
 // TODO: Add extra initialization here
 m_progress.SetRange(0, 1000);
 m_progress.SetStep(2);
 return TRUE;  // return TRUE unless you set the focus to a control
               // EXCEPTION: OCX Property Pages should return FALSE
}

显示进度

void CDlgProgress::OnShow()
{
 // TODO: Add your control notification handler code here
 int i=0;
 for(i=0; i<1000; i++)
 {
  m_progress.SetPos(i);
 }
}

 
原创粉丝点击