Skip to content

Instantly share code, notes, and snippets.

@nibasya nibasya/KCSSDlg.cpp
Created Aug 29, 2018

Embed
What would you like to do?
Disabling Progress Bar Animation and let SetState Affect Immediately
// Updates progress bar and text
void CKCSSDlg::UpdateInfo()
{
double mem = m_MemUse;
mem = mem / m_MemMax;
if (mem > 0.9){
m_CtrlProgressMemory.SetState(PBST_ERROR);
}
else if (mem >= 0.8) {
m_CtrlProgressMemory.SetState(PBST_PAUSED);
} else
m_CtrlProgressMemory.SetState(PBST_NORMAL);
m_CtrlProgressMemory.SetPos(short(mem*PROGRESSMAX+1));
m_CtrlProgressMemory.SetPos(short(mem*PROGRESSMAX));
CString buff;
buff.Format(_T("残%d枚 %dMB"), m_RemainPhoto, m_MemMax - m_MemUse);
m_CtrlProgressMemory.SetWindowText(buff);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.