ultimatepp/uppdev/Progress/main.cpp
cxl 3cd394812c Merge continued
git-svn-id: svn://ultimatepp.org/upp/trunk@10263 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-10-04 08:34:39 +00:00

26 lines
530 B
C++

#include <CtrlLib/CtrlLib.h>
using namespace Upp;
GUI_APP_MAIN
{
Progress pi;
for(;;) {
if(pi.StepCanceled())
break;
// Sleep(rand() % 1000);
}
// Ctrl::SetXPStyle(false);
TopWindow win;
ProgressIndicator p1, p2;
win.Add(p1.LeftPos(10, 100).TopPos(10, 16));
win.Add(p2.LeftPos(10, 16).TopPos(40, 100));
win.Open();
p1.SetTotal(300);
p1.SetColor(Red);
while(win.IsOpen()) {
p1.Set(GetTickCount() / 20 % 300, 300);
p2.Set(GetTickCount() / 20 % 300, 0);
Ctrl::ProcessEvents();
}
}