win32 DeleteObject ??

David Bolen db3l at fitlinxx.com
Fri Feb 15 19:00:07 EST 2002


Robin Becker <robin at jessikat.fsnet.co.uk> writes:

> In Mark Hammond's excellent win32 extensions I can see how to obtain a
> handle to a bitmap, but how does one remove from memory? I can't seem to
> find DeleteObject.

Well, the extensions wrap the MFC objects with Python objects.  The
only one that seems to explicitly include the DeleteObject method is
the region object.  I would assume that the others automatically clean
up after themselves after the wrapping Python object is destroyed, but
am not completely certain.

> Similarly I can't seem to find things like CreateCompatibleDC, BitBlt
> etc which are part of win32. It almost seems as though I'm missing
> win32gdi.pyd :)

Those are all methods on a pyCDC object which you get from calls like
CreateDC().

Note that this is all in the win32ui.pyd module, which has its own
documentation and is located in the Pythonwin subdirectory rather than
the win32 subdirectory in an installation.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list