allNextHookEx(m_hHook(WH_FOREGROUNDIDLE), nCode,
    wParam, lParam)
End Function
Private Function MessageProc(ByVal nCode As Long, ByVal wParam As Long, ByVal
 lParam As Long) As Long
   ' This hook allows you to intercept every message sent to every window
   ' in your application
   If nCode &gt;= 0 Then
      If HookCall(WH_MSGFILTER, nCode, wParam, lParam) = 1 Then
         MessageProc = 0
         Exit Function
      End If
   End If
   MessageProc = CallNextHookEx(m_hHook(WH_MSGFILTER), nCode, wParam