def update_start(self): h = self.update_control.handle style = win32gui.GetWindowLong(h, win32con.GWL_STYLE) style |= win32con.WS_DISABLED win32gui.SetWindowLong(h, win32con.GWL_STYLE, style) win32gui.SendMessage(h, win32con.WM_ENABLE, 0, 0) win32gui.SetFocus(self.copy_control.handle)
def disable(self): style = win32gui.GetWindowLong(self.handle, win32con.GWL_STYLE) style |= win32con.WS_DISABLED win32gui.SetWindowLong(self.handle, win32con.GWL_STYLE, style) win32gui.SendMessage(self.handle, win32con.WM_ENABLE, 0, 0)
def enable(self): style = win32gui.GetWindowLong(self.handle, win32con.GWL_STYLE) style &= (~win32con.WS_DISABLED) win32gui.SetWindowLong(self.handle, win32con.GWL_STYLE, style) win32gui.SendMessage(self.handle, win32con.WM_ENABLE, 1, 0)
def update_done(self): h = self.update_control.handle style = win32gui.GetWindowLong(h, win32con.GWL_STYLE) style &= (~win32con.WS_DISABLED) win32gui.SetWindowLong(h, win32con.GWL_STYLE, style) win32gui.SendMessage(h, win32con.WM_ENABLE, 1, 0)