please dont rip this site Prev Next

GetScrollRange info  Overview  Group

The GetScrollRange function retrieves the current minimum and maximum scroll box (thumb) positions for the specified scroll bar.

The GetScrollRange function is provided for compatibility only. New applications should use the GetScrollInfo function.

BOOL GetScrollRange(

    HWND hWnd,

// handle of window with scroll bar

    int nBar,

// scroll bar flags

    LPINT lpMinPos,

// address of variable that receives minimum position

    LPINT lpMaxPos 

// address of variable that receives maximum position

   );

Parameters

hWnd
Identifies a scroll bar control or a window with a standard scroll bar, depending on the value of the nBar parameter.
nBar
Specifies the scroll bar from which the positions are retrieved. This parameter can be one of the following values:

Value

Meaning

SB_CTL

Retrieves the positions of a scroll bar control. The hWnd parameter must be the handle of the scroll bar control.

SB_HORZ

Retrieves the positions of the window’s standard horizontal scroll bar.

SB_VERT

Retrieves the positions of the window’s standard vertical scroll bar.

lpMinPos
Points to the integer variable that receives the minimum position.
lpMaxPos
Points to the integer variable that receives the maximum position.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

If the specified window does not have standard scroll bars or is not a scroll bar control, the GetScrollRange function copies zero to the lpMinPos and lpMaxPos parameters.

The default range for a standard scroll bar is 0 through 100. The default range for a scroll bar control is empty (both values are zero).

The messages that indicate scroll bar position, WM_HSCROLL and WM_VSCROLL, are limited to 16 bits of position data. However, because SetScrollInfo, SetScrollPos, SetScrollRange, GetScrollInfo, GetScrollPos, and GetScrollRange support 32-bit scroll bar position data, there is a way to circumvent the 16-bit barrier of the WM_HSCROLL and WM_VSCROLL messages. See the GetScrollInfo function for a description of the technique.

See Also

GetScrollInfo, GetScrollPos, SetScrollInfo, SetScrollPos, SetScrollRange, WM_HSCROLL, WM_VSCROLL


file: /Techref/os/win/api/win32/func/src/f38_9.htm, 4KB, , updated: 2000/4/7 12:19, local time: 2022/9/25 01:03,
TOP NEW HELP FIND: 
3.238.199.4:LOG IN

 ©2022 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://www.piclist.com/techref/os/win/api/win32/func/src/f38_9.htm"> GetScrollRange</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2022 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found
- Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .