Parameter | Description |
---|---|
iType | User scrolling request |
iData | Scrollbox position |
Procedure SetHScrollbox Integer iType Integer iData
SetHScrollbox is sent when windows sends the WM_HSCROLL message, which is sent in response to a horizontal 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_HSCROLL Procedure SetHScrollbox Integer iType Integer iNewPos Boolean bOk tScrollInfo ScrollInfo Integer iLineScrollUnit Get piLineScrollUnit to iLineScrollUnit Get GetScrollBarInfo False (&ScrollInfo) to bOk If bOk Begin Case Begin Case (iType=SB_PAGEDOWN) Send hScroll ScrollInfo.nPage Case Break Case (iType=SB_PAGEUP) Send hScroll (-ScrollInfo.nPage) Case Break Case (iType=SB_LINEDOWN) Send hScroll iLineScrollUnit Case Break Case (iType=SB_LINEUP) Send hScroll (-iLineScrollUnit) Case Break Case (iType=SB_BOTTOM) Send hScroll (ScrollInfo.nMax-ScrollInfo.nPos) Case Break Case (iType=SB_Top) Send hScroll (-ScrollInfo.nPos) Case Break Case (iType=SB_THUMBPOSITION) Case Break Case (iType=SB_THUMBTRACK) Send hScroll (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.