please dont rip this site Prev Next

WM_HSCROLL Overview  Group

The WM_HSCROLL message is sent to a window when a scroll event occurs in the window’s standard horizontal scroll bar. This message is also sent to the owner of a horizontal scroll bar control when a scroll event occurs in the control.

WM_HSCROLL 

nScrollCode = (int) LOWORD(wParam);  // scroll bar value 

nPos = (short int) HIWORD(wParam);   // scroll box position 

hwndScrollBar = (HWND) lParam;       // handle of scroll bar 

 

Parameters

nScrollCode
Value of the low-order word of wParam. Specifies a scroll bar value that indicates the user’s scrolling request. This parameter can be one of the following values:

Value

Meaning

SB_BOTTOM

Scrolls to the lower right.

SB_ENDSCROLL

Ends scroll.

SB_LINELEFT

Scrolls left by one unit.

SB_LINERIGHT

Scrolls right by one unit.

SB_PAGELEFT

Scrolls left by the width of the window.

SB_PAGERIGHT

Scrolls right by the width of the window.

SB_THUMBPOSITION

The user has dragged the scroll box (thumb) and released the mouse button. The nPos parameter indicates the position of the scroll box at the end of the drag operation.

SB_THUMBTRACK

The user is dragging the scroll box. This message is sent repeatedly until the user releases the mouse button. The nPos parameter indicates the position that the scroll box has been dragged to.

SB_TOP

Scrolls to the upper left.

nPos
Value of the high-order word of wParam. Specifies the current position of the scroll box if the nScrollCode parameter is SB_THUMBPOSITION or SB_THUMBTRACK; otherwise, nPos is not used.
hwndScrollBar
Value of lParam. If the message is sent by a scroll bar, then hwndScrollBar is the handle of the scroll bar control. If the message is not sent by a scroll bar, hwndScrollBar is NULL.

Return Values

If an application processes this message, it should return zero.

Remarks

The SB_THUMBTRACK notification message is typically used by applications that provide feedback as the user drags the scroll box.

If an application scrolls the content of the window, it must also reset the position of the scroll box by using the SetScrollPos function.

Note that the WM_HSCROLL message carries only 16 bits of scroll box position data. Thus, applications that rely solely on WM_HSCROLL (and WM_VSCROLL) for scroll position data have a practical maximum position value of 65,535.

However, because the SetScrollInfo, SetScrollPos, SetScrollRange, GetScrollInfo, GetScrollPos, and GetScrollRange functions 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 GetScrollInfo for a description of the technique.

See Also

GetScrollInfo, GetScrollPos, GetScrollRange, SetScrollInfo, SetScrollPos, SetScrollRange, WM_VSCROLL 


file: /Techref/os/win/api/win32/mess/src/msg24_12.htm, 5KB, , updated: 2000/4/7 11:20, local time: 2024/11/8 18:31,
TOP NEW HELP FIND: 
3.16.217.59: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://linistepper.com/Techref/os/win/api/win32/mess/src/msg24_12.htm"> WM_HSCROLL</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?