void CDialogLAMP::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
SCROLLINFO scrollinfo;
GetScrollInfo(SB_VERT, &scrollinfo, SIF_ALL);
switch (nSBCode)
{
case SB_BOTTOM:
ScrollWindow(0, (scrollinfo.nPos - scrollinfo.nMax) * 10);
scrollinfo.nPos = scrollinfo.nMax;
SetScrollInfo(SB_VERT, &scrollinfo, SIF_ALL);
break;
case SB_TOP:
ScrollWindow(0, (scrollinfo.nPos - scrollinfo.nMin) * 10);
scrollinfo.nPos = scrollinfo.nMin;
SetScrollInfo(SB_VERT, &scrollinfo, SIF_ALL);
break;
case SB_LINEUP:
scrollinfo.nPos -= 1;
if (scrollinfo.nPos < scrollinfo.nMin)
{
scrollinfo.nPos = scrollinfo.nMin;
break;
}
SetScrollInfo(SB_VERT, &scrollinfo, SIF_ALL);
ScrollWindow(0, 10);
break;
case SB_LINEDOWN:
scrollinfo.nPos += 1;
if
OnVScroll的通常处理
最新推荐文章于 2021-01-04 10:40:13 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)