a scope is any section of code enclosed in { },
see below
void test()
{
out_str("before enter scope with progressBox");
// new scope, can also be if(1) { }
{
out_str("progressBox now opens");
int imax = 100;
progressBox aa("This is an example:", PBOX_TOPMOST);
aa.SetRange(0,imax);
string str;
for(int ii = 0; ii < imax; ii++)
{
if(aa.Set(ii))
{
str.Format("Current at %d", ii);
aa.SetText(str, PBOXT_TITLE);
}
else
{
out_str("User abort!");
break;
}
LT_execute("sec -p 0.5"); // wasting some time
}
out_str("progressBox will close shortly");
}
out_str("after scope with progressbox");
LT_execute("sec -p 1.5"); // wasting some time
out_str("end program");
}
CP