Kelly Kranabetter wrote: > > I am occasionally getting back negative HWND values from > EnumChildWindows. They appear to round trip properly, for example > win32gui.GetClassName(-1901131990) appears to function properly. Not > exactly a bug but is somewhat unexpected. > > > > I had grabbed this code from the net somewhere to get the currently > focused window which returns HWND as an unsigned long: > > ... > > My code would fail occasionally and I’d wonder why but never got into > debugging it until one day it was failing constantly. After much head > scratching the simple fix for me was to change the focus-finding-code > to use ctypes.c_long so the result is not unsigned from both HWND sources. >
How does this cause a failure? c_long and c_ulong are both 32-bit quantities. It shouldn't cause a problem. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32