|
本帖最后由 xjwldlover 于 2012-8-28 09:48 编辑
只是翻译,不知道是否可用~
- Const GWL_WNDPROC = (-4)
- Const WM_COMMAND = &H111
- Const WM_MBUTTONDOWN = &H207
- Const WM_MBUTTONUP = &H208
- Const WM_MOUSEWHEEL = &H20A
- dim Oldwinproc
- Set wshell = CreateObject("wscript.Shell")
- Extern.Declare micLong ,"SetWindowLong","user32.dll", _
- "SetWindowLongA",micLong,micLong,micLong
- Extern.Declare micLong ,"CallWindowProc","user32.dll", _
- "CallWindowProcA",micLong,micLong,micLong,micLong
- Extern.Declare micLong ,"GetWindowLong","user32.dll", _
- "SetWindowLongA",micLong,micLong
- Function FlexScroll(hWnd, wMsg , wParam, lParam)
- '支持滚轮的滚动 Yu 2004-5-10 15:33
- Select Case wMsg
- Case WM_MOUSEWHEEL
- Select Case wParam
- Case -7864320 '向下滚
- wshell.SendKeys "{PGDN}"
- Case 7864320 '向上滚
- wshell.SendKeys "{PGUP}"
- End Select
- End Select
- FlexScroll = CallWindowProc(Oldwinproc, hWnd, wMsg, wParam, lParam)
- End Function
复制代码 |
|