Andrea Gavana schrieb:
> Hi all,
> I am having some troubles mixing py2exe and winxptheme. Basically,
> I am using wxPython 188.8.131.52 with Python 2.5, and painting some window
> background using the UxTheme via winxptheme. This is what I am doing:
> hwnd = MyWindow.GetHandle()
> self.hTheme = winxptheme.OpenThemeData(hwnd, "Window")
> winxptheme.DrawThemeBackground(self.hTheme, dc.GetHDC(), 5, 1,
> (rc.top, rc.left, rc.right, rc.bottom), None)
> This works very well using python directly, but when I generate and
> executable file with py2exe, I get this error when executing that last
> TypeError: an integer is required
> This is because self.hTheme is *None*. It seems like OpenThemeData can
> not be initialized in an executable, or at least that I am not able to
> do it.
Let me try to guess: Do you have an XP-style manifest for the exe?