CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 1999
    Posts
    19

    Progressbar starts from the middle?

    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


  2. #2
    Join Date
    May 1999
    Location
    Republic of Korea
    Posts
    100

    Re: Progressbar starts from the middle?

    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



  3. #3
    Guest

    Re: Progressbar starts from the middle?

    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 :
    [email protected]


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured