please dont rip this site Prev Next

GetScrollPos info  Overview  Group

The GetScrollPos function retrieves the current position of the scroll box (thumb) in the specified scroll bar. The current position is a relative value that depends on the current scrolling range. For example, if the scrolling range is 0 through 100 and the scroll box is in the middle of the bar, the current position is 50.

The GetScrollPos function is provided for backward compatibility. New applications should use the GetScrollInfo function.

int GetScrollPos(

    HWND hWnd,

// handle of window with scroll bar

    int nBar 

// scroll bar flags

   );

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 to be examined. This parameter can be one of the following values:

Value

Meaning

SB_CTL

Retrieves the position of the scroll box in a scroll bar control. The hWnd parameter must be the handle of the scroll bar control.

SB_HORZ

Retrieves the position of the scroll box in a window’s standard horizontal scroll bar.

SB_VERT

Retrieves the position of the scroll box in a window’s standard vertical scroll bar.

Return Values

If the function succeeds, the return value is the current position of the scroll box.

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

Remarks

The GetScrollPos function enables applications to use 32-bit scroll positions. Although the messages that indicate scroll bar position, WM_HSCROLL and WM_VSCROLL, are limited to 16 bits of position data, the functions SetScrollPos, SetScrollRange, GetScrollPos, and GetScrollRange support 32-bit scroll bar position data. Thus, an application can call GetScrollPos while processing either the WM_HSCROLL or WM_VSCROLL messages to obtain 32-bit scroll bar position data.

To get the 32-bit position of the scroll box (thumb) during a SB_THUMBTRACK notification in a WM_HSCROLL or WM_VSCROLL message, use the GetScrollInfo function.

See Also

GetScrollInfo, GetScrollRange, SetScrollInfo, SetScrollPos, SetScrollRange, WM_HSCROLL, WM_VSCROLL 


file: /Techref/os/win/api/win32/func/src/f38_8.htm, 4KB, , updated: 2000/4/7 11:19, local time: 2024/11/7 12:37,
TOP NEW HELP FIND: 
18.190.253.128:LOG IN
©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!

 ©2024 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://techref.massmind.org/techref/os/win/api/win32/func/src/f38_8.htm"> GetScrollPos</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?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .