Thread: Vertical Scroll Bar

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    610

    Vertical Scroll Bar

    Busy making my first attempt on scroll bars. Came across the function SetScrollRange.... What value do i set to nMaxPos (4th argument)...

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Read the MSDN page on it for information on nMaxPos:

    http://msdn.microsoft.com/en-us/libr...99(VS.85).aspx

    The default range for a standard scroll bar is 0 through 100. The default range for a scroll bar control is empty (both the nMinPos and nMaxPos parameter values are zero). The difference between the values specified by the nMinPos and nMaxPos parameters must not be greater than the value of MAXLONG.
    However, please note this:

    Note The SetScrollRange function is provided for backward compatibility. New applications should use the SetScrollInfo function.
    So, you should be using this: http://msdn.microsoft.com/en-us/libr...95(VS.85).aspx

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    610
    Quote Originally Posted by MacGyver View Post
    The default range for a standard scroll bar is 0 through 100.
    Noticed the 100 in most examples, but wasn't sure if it's standard... Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  2. Bitmap with a scroll bar
    By SuperNewbie in forum Windows Programming
    Replies: 1
    Last Post: 10-29-2003, 11:36 PM
  3. no horizontal scroll bar?
    By scott27349 in forum C++ Programming
    Replies: 0
    Last Post: 03-16-2002, 10:41 PM
  4. Problem with Scroll Bar
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 11-05-2001, 05:34 AM
  5. Problem with Scroll Bar
    By Garfield in forum Windows Programming
    Replies: 3
    Last Post: 11-01-2001, 02:23 PM