TScrollInfo 其实就是 API 结构 ScrollInfo 的 Delphi 类型。
用 SetScrollInfo / GetScrollInfo 对窗口句柄传送此信息以设置/获得滚动条信息。
typedef struct tagSCROLLINFO { // si
UINT cbSize; // 本结构大小
UINT fMask; // 设置标志,表示你希望设置那几个属性
int nMin; // 滚动范围
int nMax; // ...
UINT nPage; // 每页滚动数
int nPos; // 滚动块位置
int nTrackPos; // 返回 Track 位置(只读)
} SCROLLINFO;
typedef SCROLLINFO FAR *LPSCROLLINFO;
具体可以看下面:
The SCROLLINFO structure contains scroll bar parameters to be set by the SetScrollInfo function (or SBM_SETSCROLLINFO message), or retrieved by the GetScrollInfo function (or SBM_GETSCROLLINFO message).
typedef struct tagSCROLLINFO { // si
UINT cbSize;
UINT fMask;
int nMin;
int nMax;
UINT nPage;
int nPos;
int nTrackPos;
} SCROLLINFO;
typedef SCROLLINFO FAR *LPSCROLLINFO;
Members
cbSize
Specifies the size, in bytes, of this structure.
fMask
Specifies the scroll bar parameters to set or retrieve. This member can be a combination of the following values:
Value Meaning
SIF_ALL Combination of SIF_PAGE, SIF_POS, and SIF_RANGE.
SIF_DISABLENOSCROLL This value is used only when setting a scroll bar's
parameters. If the scroll bar's new parameters make the scroll bar unnecessary,
disable the scroll bar instead of removing it.
SIF_PAGE The nPage member contains the page size for a proportional scroll bar.
SIF_POS The nPos parameter contains the scroll box position.
SIF_RANGE The nMin and nMax members contain the minimum and maximum values for the
scrolling range.
nMin
Specifies the minimum scrolling position.
nMax
Specifies the maximum scrolling position.
nPage
Specifies the page size. A scroll bar uses this value to determine the appropriate
size of the proportional scroll box.
nPos
Specifies the position of the scroll box.
nTrackPos
Specifies the immediate position of a scroll box that the user is dragging. An
application can retrieve this value while processing the SB_THUMBTRACK notification
message. An application cannot set the immediate scroll position; the SetScrollInfo
function ignores this member.
See Also
SBM_GETSCROLLINFO, SBM_SETSCROLLINFO, GetScrollInfo, SetScrollInfo