code: def hook_wnd_proc(self):
          
          self.__local_wnd_proc_wrapped = WndProcType(self.local_wnd_proc)
          self.__old_wnd_proc = SetWindowLong(self.__local_win_handle,
                                          GWL_WNDPROC,
                                          self.__local_wnd_proc_wrapped)
docs: Attach to OS Window message handler