The WM_VSCROLL message is sent to a window when a scroll event occurs in the window’s standard vertical scroll bar. This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control.
WM_VSCROLL nScrollCode = (int) LOWORD(wParam); // scroll bar value nPos = (short int) HIWORD(wParam); // scroll box position hwndScrollBar = (HWND) lParam; // handle of scroll bar
Value |
Meaning |
SB_BOTTOM |
Scrolls to the lower right. |
SB_ENDSCROLL |
Ends scroll. |
SB_LINEDOWN |
Scrolls one line down. |
SB_LINEUP |
Scrolls one line up. |
SB_PAGEDOWN |
Scrolls one page down. |
SB_PAGEUP |
Scrolls one page up. |
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. |
If an application processes this message, it should return zero.
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_VSCROLL message carries only 16 bits of scroll box position data. Thus, applications that rely solely on WM_VSCROLL (and WM_HSCROLL) 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.
GetScrollInfo, GetScrollPos, GetScrollRange, SetScrollInfo, SetScrollPos, SetScrollRange, WM_HSCROLL
file: /Techref/os/win/api/win32/mess/src/msg28_20.htm, 5KB, , updated: 2000/4/7 11:20, local time: 2024/12/2 04:59,
18.119.105.155:LOG IN
|
©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? <A HREF="http://sxlist.com/Techref/os/win/api/win32/mess/src/msg28_20.htm"> WM_VSCROLL</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.