[python-win32] Adding New API functions

Andrew Wilkinson ajw126@student.cs.york.ac.uk
Mon, 17 Jun 2002 17:20:14 +0100


Hi,

I've been trying to write a skinnable win32 application in Python, I
recently added some extra functions to the CRgn class which I've submitted
to Mark, but I've come across some other api's which are missing and I was
wondering how I should add them...

The api calls are TransparentBlt and AlphaBlt, I have added them to my own
copy of the source and they work fine. I have added them as member functions
of the CDC class even though they aren't actually included as part of MFC.
Is this an okay thing todo or is Win32all supposed to be an exact copy of
the Windows api and MFC classes?

In a similar vein I almost crashed my machine when I was creating about
200,000 regions and not calling DeleteObject on them. IMHO Microsoft should
have added a simple hRgn != NULL check into MFC, but that ain't never going
to happen, so it would make sense to me to add this check to Python wrapper
function and greatly reduce the scope for memory leaks.

Cheers,
Andrew
---
Ditch The Decimal System!
Lets Use Hex - http://www.intuitor.com/hex/switch.html