Beispiel #1
0
	def redraw(self):
		"""Redraw the display for this object.
		"""
		left, top, width, height = self.location
		left, top = winUser.ScreenToClient(self.windowHandle, left, top)
		winUser.RedrawWindow(self.windowHandle,
			winUser.RECT(left, top, left + width, top + height), None,
			winUser.RDW_INVALIDATE | winUser.RDW_UPDATENOW)
Beispiel #2
0
    def redraw(self):
        """Redraw the display for this object.
		@raise WindowsError: If redrawing fails.
		"""
        # Conversion to client coordinates may fail if the window handle of this object is incorrect.
        # This will most likely be caused by a died window.
        location = self.location.toClient(self.windowHandle)
        if not winUser.RedrawWindow(
                self.windowHandle, location.toRECT(), None,
                winUser.RDW_INVALIDATE | winUser.RDW_UPDATENOW):
            raise ctypes.WinError()