[python-win32] How to take a snapshot of a specific control?
Mark Hammond
mhammond at skippinet.com.au
Mon Dec 11 05:06:25 CET 2006
RayS wrote:
> I'm trying to do a fast desktop capture myself, and having DC/pyDC
> confusion.
I'm not sure exactly what this means, but I'm guessing you are having
trouble with the pythonwin/win32ui GetSafeHdc objects, versus those used by
win32gui.
The short story is that unless you really need to (or otherwise need MFC
functionality), you should stick to win32gui functions. You should let me
know if win32ui has features lacking in win32gui that you need. If you are
stuck using PyCDC objects, you can get the integer handle by calling the
GetSafeHdc() function, which is then suitable for use with win32gui -
win32gui uses integers for most handles, but that also means you are
responsible for managing their lifetime correctly.
HTH,
Mark
More information about the Python-win32
mailing list