On Sun, 20 Mar 2005 23:56:33 -0500, Marcus Goldfish <[EMAIL PROTECTED]> wrote:

As an addendum to my previous post: I was able to successfully do
screen capturing using win32gui + win32ui, [though I am still looking
for a solution that works without win32ui].


Why? win32ui is just a wrapper around user32.dll. That's the way you get UI stuff done on Windows.


In the C/C++ code snippets I've seen, the cleanup step usually
involves ReleaseDC(hwnd, hDC), DeleteDC(myDC), and
DeleteObject(myBitmap).


Right, and every programmer forgets those. That's why there are so many wrapper classes to handle them automatically.


Are these steps automatically handled in
Python by win32gui and win32ui?  If not, can someone post a snippet of
cleanup code that works for this example?


Yes, it is automatic. When the objects are destroyed, the resources will be released.


--
- Tim Roberts, [EMAIL PROTECTED]
 Providenza & Boekelheide, Inc.

_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to