win32gui.DeleteObject

DeleteObject(handle)

Deletes a logical pen, brush, font, bitmap, region, or palette, freeing all system resources associated with the object. After the object is deleted, the specified handle is no longer valid.

Parameters

handle : PyGdiHANDLE

handle to the object to delete.