Click to See Complete Forum and Search --> : Progressbar starts from the middle?
Magnus Ohlin
April 21st, 1999, 09:47 AM
Hiya!
How do I make a progressbar that starts from the middle and depending on the value show progress to right or the left?
/Magnus
Walter I An
April 22nd, 1999, 12:36 AM
I believe by default progressbar's range
is set between 0 to 100.
So if U want to start from middle,
then set m_ProgressCtrl.SetPos(50).
And use appropriate number for
m_ProgressCtrl.SetPos(number).
Good luck and hope U can help others, too. :)
Walter
April 22nd, 1999, 01:13 AM
Hello,
1 ) It's very easy, create your how class "derived" from the progresse barre.
2 ) Create a new fonction that you use to set the value of the progresse barre.
int xxxxxxxx :: SetValueEx ( int Value )
{
int TotalSize <= Initialise it with the max range of the slider.
int Min = -TotalSize / 2;
int Max = -Min;
// To prevente overflow
if ( Value > Max )
Value = Max
else
if ( Value < Min )
Value = Min;
// Set the slider Value
Initialise the progrogresse barre with ( Max + Value );
}
It don't put yhe fonction name because i don't remenber it and i haven't got the time to loock on help, search....
Bye,
Arnaud at :
Terrasse.Gaetan@wanadoo.fr
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.