I played around trying to create a transparent window that overlays another application. I find that win32 extensions are a bit messy, there are win32ui, win32gui, winxpgui, etc. Somewhat confusing.
In any case, I'm trying to pass a handle to the win32gui.UpdateLayeredWindow window of this function.
the first argument he wants is a descriptor, like a pyhandle type.
all methods to search for a window handle, all return an int, not a pyhandle type. even those from the same modules. win32gui.findwindow (None, "windowtitle") finds and returns the handle to the window that I want, but only in int form, and not like PyHandle.
here are the documents for the object.
http://docs.activestate.com/activepython/2.5/pywin32/PyHANDLE.html
here are the docs for the findwindow method. docs.activestate.com/activepython/2.5/pywin32/win32gui__FindWindow_meth.html
and here are the docs for the method that will not accept int. docs.activestate.com/activepython/2.5/pywin32/win32gui__UpdateLayeredWindow_meth.html
I even tried using WX to create and search for window handles; it also returns an int.
there is another function that wants a descriptor written by the same people and accepts int as a descriptor. win32api.SetWindowLong
Question: is there a way to create a PyHANDLE object from int i? I can not understand.
source
share