| Parameter | Description |
|---|---|
| iType | User scrolling request |
| iData | Scrollbox position |
Procedure SetVScrollbox Integer iType Integer iData
SetVScrollbox is sent when windows sends the WM_VSCROLL message, which is sent in response to a vertical scrollbar change. This is a low level message and it is not expected that developers will need to use this. Using this requires a knowledge of the windows API and how they are handled with windows objects. You are advised to research the Microsoft MSDN documentation for the WM_VSCROLL, WM_HSCROLL, SetScrollInfo, GetScrollInfo, SetScrollPos interfaces and the windows WS_HSCROLL and WS_VSCROLL styles.
iType is the hi-order word of wParam. It represents the user's scrolling request. Values can be SB_LINEUP, SB_LINELEFT, SB_LINEDOWN, SB_LINERIGHT, SB_PAGEUP, SB_PAGELEFT, SB_PAGEDOWN, SB_PAGERIGHT, SB_THUMBPOSITION, SB_THUMBTRACK, SB_TOP, SB_LEFT, SB_BOTTOM, SB_RIGHT and SB_ENDSCROLL. Refer to MSDN documentation for information about these values.
iType is the low-order word of wParam. It represents the current position of the scrollbox it iType is SB_THUMBPOSITION or SB_THUMBTRACK.
// should be sent by WM_VSCROLL
Procedure SetVScrollbox Integer iType Integer iNewPos
Boolean bOk
tScrollInfo ScrollInfo
Integer iLineScrollUnit
Get piLineScrollUnit to iLineScrollUnit
Get GetScrollBarInfo True (&ScrollInfo) to bOk
If bOk Begin
Case Begin
Case (iType=SB_PAGEDOWN)
Send VScroll ScrollInfo.nPage
Case Break
Case (iType=SB_PAGEUP)
Send VScroll (-ScrollInfo.nPage)
Case Break
Case (iType=SB_LINEDOWN)
Send VScroll iLineScrollUnit
Case Break
Case (iType=SB_LINEUP)
Send VScroll (-iLineScrollUnit)
Case Break
Case (iType=SB_BOTTOM)
Send VScroll (ScrollInfo.nMax-ScrollInfo.nPos)
Case Break
Case (iType=SB_Top)
Send VScroll (-ScrollInfo.nPos)
Case Break
Case (iType=SB_THUMBPOSITION)
Case Break
Case (iType=SB_THUMBTRACK)
Send VScroll (ScrollInfo.nTrackPos-ScrollInfo.nPos)
Case Break
Case End
End
End_Procedure
With the exceptions of the notifications for scrollbars and the mouse wheel evetns, all of the windows scrollbar interfaces can be accessed by creating external_functions. The events SetVScrollBox, SetHScrollBox and OnWMMouseWheel are provided to give you low level access to these events.