code: def local_wnd_proc(self, h_wnd, msg, w_param, l_param):
          
          # performance note: has_key is the fastest way to check for a key when
          # the key is unlikely to be found (which is the case here, since most
          # messages will not have handlers).  This is called via a ctypes shim
          # for every single windows message so dispatch speed is important
          if msg in self.__msg_dict:
              # if the handler returns false, we terminate the message here Note
              # that we don't pass the hwnd or the message along Handlers should
              # be really, really careful about returning false here
              if self.__msg_dict[msg](w_param, l_param) == False:
                  return
  
          # Restore the old WndProc on Destroy.
          if msg == WM_DESTROY:
              self.unhook_wnd_proc()
  
          return CallWindowProc(self.__old_wnd_proc,
                                  h_wnd, msg, w_param, l_param)
docs: Call the handler if one exists.