afx_msg void OnVScroll( UINT nSBCode, UINT nPos, CWnd* pScrollBar );
nSBCode
Contains a scroll-bar code that specifies the user's scrolling request. This parameter can be one of the following values:
Value | Description |
SB_BOTTOM | Scroll to bottom. |
SB_ENDSCROLL | End scroll. |
SB_LINEDOWN | Scroll one line down. |
SB_LINEUP | Scroll one line up. |
SB_PAGEDOWN | Scroll one page down. |
SB_PAGEUP | Scroll one page up. |
SB_THUMBPOSITION | Scroll to the absolute position. The current position is provided in nPos. |
SB_THUMBTRACK | Drag scroll box to specified position. The current position is provided in nPos. |
SB_TOP | Scroll to top. |
nPos
Contains the scroll-box position if the scroll-bar code is SB_THUMBPOSITION; otherwise, not used.
pScrollBar
If the message is sent by a scroll-bar control, pScrollBar identifies the control. If the message is sent as a result of the user clicking a pop-up window's scroll bar, pScrollBar is not used. The pointer may be temporary.
Called when the user clicks a vertical scroll bar.
OnVScroll typically is used by applications that give some feedback while the scroll box is being dragged.
If OnVScroll scrolls the contents of CWnd, it must also reset the position of the scroll box by using the SetScrollPos member function.
This message-handler member function calls the Default member function. Override this member function in your derived class to handle the WM_VSCROLL message.
CWnd::SetScrollPos, CWnd::OnHScroll, WM_VSCROLL, CWnd::Default