用的PB8,窗体、自定义对象的vscroll不能通过鼠标滚轮进行滚动。
请问如果要实现鼠标滚轮滚动时,窗体的vscroll也进行相应滚动,应该如何写
other事件:
Choose Case Message.Number
Case 522
If IntHigh(Message.WordParm) = 120 Then
//鼠标向上滚动代码
Else
//鼠标向下滚动代码
End If
End Choose
------解决方案--------------------
- C/C++ code
constant long SB_LINEUP = 0 constant long SB_LINELEFT = 0 constant long SB_LINEDOWN = 1 constant long SB_LINERIGHT = 1 constant long SB_PAGEUP = 2 constant long SB_PAGELEFT = 2 constant long SB_PAGEDOWN = 3 constant long SB_PAGERIGHT = 3 constant long SB_TOP = 6 constant long SB_LEFT = 6 constant long SB_BOTTOM = 7 constant long SB_RIGHT = 7 constant long WM_HSCROLL= 276 constant long WM_VSCROLL = 277 Choose Case Message.Number Case 522 If IntHigh(Message.WordParm) = 120 Then //鼠标向上滚动代码 SEND(handle(this), WM_VSCROLL, SB_LINEUP, 0) Else //鼠标向下滚动代码 SEND(handle(this), WM_VSCROLL, SB_LINEDOWN, 0) End If End Choose