You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
573 B
C++

#include "StdAfx.h"
#include "ProgressMgr.h"
#include "GlobalFunction.h"
CProgressMgr gProgressMgr;
CProgressMgr::CProgressMgr(void)
{
m_WorkProgress = NULL;
}
CProgressMgr::~CProgressMgr(void)
{
}
//ÉèÖõ±Ç°½ø¶È
void CProgressMgr::SetCurProgress(int cur,int total)
{
if(gExitApp)
return;
if(cur<=total && total != 0)
{
double progress = (static_cast<double>(cur)/static_cast<double>(total))*100;
if(m_WorkProgress)
{
m_WorkProgress->SetPos(static_cast<int>(progress));
}
}
}