Announcement

Collapse
No announcement yet.

Scroll Bar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scroll Bar

    Hi, guys --
    Just now I work under Win2000 and it looks that maximum value of trackpos in %SB_THUMBTRACK =
    si.nMax - si.nPage (unlke %SB_LINE...)
    I can adapt a code, but this confuses me, because in MSDN I don't see any information.
    Question: is it true (and in all OSes) or I'm somewhere wrong ?


    ------------------
    E-MAIL: [email protected]

  • #2
    It seems Microsoft finally got it right. I always wondered by that brain
    dead scrollbar could not figure out what the maximum track position should be
    given a specific page size. Under Windows95 if you had a page size of 16 and
    260 lines to display, you would set the range to 1 through 244 so that the last
    line would be at the bottom of the display and not off the top somewhere.

    ------------------
    Dominic Mitchell

    [This message has been edited by Dominic Mitchell (edited January 30, 2001).]
    Dominic Mitchell
    Phoenix Visual Designer
    http://www.phnxthunder.com

    Comment


    • #3
      Yes, both SB_THUMBTRACK and SB_THUMBPOSITION is si.nMax - si.nPage + 1.
      (not sure about +1, but think so) Natural, since that gives full view.
      Set nMax a bit higher if you need to scroll past end.

      Forgot to mention - tested in Win98. Don't if it's same in 95.
      ------------------


      [This message has been edited by Borje Hagsten (edited January 30, 2001).]

      Comment


      • #4
        Borje --
        I more or less solved questions under Win2000 (Source forum, Rotate bitmap, part 2).
        Just now I am under 95. And it looks that I lose at least 1 pixel - the most right and bottom).
        Guys, what do you see ?

        ------------------
        E-MAIL: [email protected]

        Comment


        • #5
          He, to ask me look for a lost pixel is like asking a blind to find
          needle in haystack, or even the haystack itself. Look good to me,
          even took off glasses and put my nose to the screen, but entire
          picture seems to be there. (unreliable test, I can hardly even
          find the screen sometimes..

          PS, forgot to say - nice pieces of code, especially the rotation
          code.
          ------------------


          [This message has been edited by Borje Hagsten (edited January 30, 2001).]

          Comment

          Working...
          X