Skip to content

Instantly share code, notes, and snippets.

@nibasya nibasya/KCSSDlg.cpp
Last active Aug 29, 2018

Embed
What would you like to do?
Updating CProgressCtrl State
// Updates progress bar
void CKCSSDlg::UpdateInfo()
{
double mem = m_MemUse;
mem = mem / m_MemMax;
if (mem > 0.8){
m_CtrlProgressMemory.SetState(PBST_PAUSED);
}
else if (mem > 0.95) {
m_CtrlProgressMemory.SetState(PBST_ERROR);
} else
m_CtrlProgressMemory.SetState(PBST_NORMAL);
m_CtrlProgressMemory.SetPos(short(mem*PROGRESSMAX));
}
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.