I've not done much API work or subclassing...
So I'm curious what this does:
I'm already doing this in my app:VB Code:
WindowProc = CallWindowProc(LocalPrevWndProc.Item("#" & Lwnd), Lwnd, Lmsg, Wparam, Lparam)
So I need to add your MOUSEWHEEL message check to this existing routine - and it's already working to call the MSGBOX when I use the wheel...VB Code:
Public Function WndProc(ByVal hwnd As Long, _ ByVal wMsg As Long, ByVal wParam As Long, _ ByVal lParam As Long) As Long 'Let the window process messages as well WndProc = CallWindowProc(m_lPrevProc, hwnd, wMsg, wParam, lParam) 'See what message has been sent to the window If wMsg = WM_ACTIVATEAPP Then 'It's the activateapp message so call the sub on the form Call m_frmHooked.AppFocus(CBool(wParam)) End If If wMsg = WM_MOUSEWHEEL Then Call MsgBox("test") End If End Function




Reply With Quote