def on_destroy(self, hwnd, msg, wparam, lparam): """Clean after notification ended.""" nid = (self.hwnd, 0) Shell_NotifyIcon(NIM_DELETE, nid) PostQuitMessage(0) return None
def on_destroy(self, hwnd, msg, wparam, lparam): """Clean after notification ended.""" if self.delay != None and self.destroy_window: self.remove_window(hwnd) PostQuitMessage(0) return None
def on_destroy(self, hwnd, msg, wparam, lparam): """Clean after notification ended. :hwnd: :msg: :wparam: :lparam: """ print("destroy how many?????") nid = (self.hwnd, 0) Shell_NotifyIcon(NIM_DELETE, nid) PostQuitMessage(0) return None
def on_destroy(self, hwnd, msg, wparam, lparam): """Clean after notification ended. :hwnd: :msg: :wparam: :lparam: """ # Give time to read sleep(10) nid = (self.hwnd, 0) Shell_NotifyIcon(NIM_DELETE, nid) PostQuitMessage(0) return None
def destroy(self): """Destroys active toast""" delay = self.toast_data["delay"] while delay != None and delay > 0: sleep(0.1) delay -= 0.1 try: DestroyWindow(self.toast_data["hwnd"]) UnregisterClass(self.toast_data["wnd_class"].lpszClassName, self.toast_data["hinst"]) Shell_NotifyIcon( NIM_DELETE, (self.toast_data["hwnd"], 0) ) # Sometimes the try icon sticks around until you click it - this should stop that except WinTypesException: pass PostQuitMessage() self.active = False
def on_destroy(self, hwnd, msg, wparam, lparam): nid = (self.hwnd, 0) Shell_NotifyIcon(NIM_DELETE, nid) PostQuitMessage(0) return None
def on_destroy(self, hwnd, msg, wparam, lparam) -> None: """Clean after notification ended.""" Shell_NotifyIcon(NIM_DELETE, (self.window_handle, 0)) PostQuitMessage(0)