Last active
August 29, 2018 15:04
-
-
Save nibasya/a9c3d3870e5d21bbb444db7cb0d90051 to your computer and use it in GitHub Desktop.
Updating CProgressCtrl State
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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