afx_msg void OnHScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar )的参数和作用分析

1.nSBCode:代表滚动方向


Specifies a scroll-bar code that indicates the user's scrolling request. This parameter can be one of the following:
表名用户滚动需求的代码,参数是以下的几种之一:
SB_LEFT   Scroll to far left.滚动到左边

SB_ENDSCROLL   End scroll.滚动到末尾

SB_LINELEFT   Scroll left.向左滚动

SB_LINERIGHT   Scroll right.向右滚动

SB_PAGELEFT   Scroll one page left.向左滚动一页

SB_PAGERIGHT   Scroll one page right.向右滚动一页

SB_RIGHT   Scroll to far right.滚动到右边

SB_THUMBPOSITION   Scroll to absolute position. The current position is specified by the nPos parameter.到绝对位置,位置参数由nPos确定

SB_THUMBTRACK   Drag scroll box to specified position. The current position is specified by the nPos parameter.拖动滚动条到自定义位置,位置参数由nPos定义


2.nPos:如果nSBCode 为:SB_THUMBPOSITION or SB_THUMBTRACK其中之一,代表滚动条的位置。其他情况未用


Specifies the scroll-box position if the scroll-bar code is SB_THUMBPOSITION or SB_THUMBTRACK; otherwise, not used. Depending on the initial scroll range, nPos may be negative and should be cast to an int if necessary.
当nSBCode是SB_THUMBPOSITION 或SB_THUMBTRACK时该参数定义了滚动条的位置,否则处于未使用状态,这取决于你对该控件初始的设置.


3.pScrollBar:滚动条窗口包装类指针


If the scroll message came from a scroll-bar control, contains a pointer to the control. If the user clicked a window's scroll bar, this parameter is NULL. The pointer may be temporary and should not be stored for later use.
如果滚动的消息来自滚动控件,它包含了指向这个控件的指针。如果用户单击一个窗口的滚动条,这个参数为空。这个指针可能是临时的,所以不要为了以后的使用而存储这个参数。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值