i have a module for work with mouse whell, but the horizontal mouse whell isn't detected
i do the horizontal scroll, but these message isn't showedCode:Option Explicit Private PrevWin2 As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Const GWL_WNDPROC = (-4) Private Const WM_MOUSEWHEEL = &H20A Private Const WM_KEYDOWN = &H100 Public MouseOverControl As Long ' Handle for User Control (mouse move) Private Const WM_HSCROLL = &H114 'with these public variable i can, only, use these event when the mouse is in control 'because out off it, isn't need it;) Private Function Proc2(ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long If Msg = WM_HSCROLL Then MsgBox "oi" Proc2 = CallWindowProc(PrevWin2, hWnd, Msg, wParam, lParam) End Function Public Sub Hook2(handle As Long) If PrevWin2 = 0 Then PrevWin2 = SetWindowLong(handle, GWL_WNDPROC, AddressOf Proc2) End If End Sub Public Sub Unhook2(handle As Long) If PrevWin2 Then Call SetWindowLong(handle, GWL_WNDPROC, PrevWin2) PrevWin2 = 0 End If End Sub
can anyone explain to me what isn't right(i use the toutchpad)?
thanks






Reply With Quote