ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> py2exe-users
py2exe-users
[Py2exe-users] py2exe and winxptheme
by Andrea Gavana other posts by this author
Nov 14 2006 7:28AM messages near this date
[Py2exe-users] libgdk-win32-2.0-0.dll | Re: [Py2exe-users] py2exe and winxptheme
Hi all,

    I am having some troubles mixing py2exe and winxptheme. Basically,
I am using wxPython 2.7.2.0 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
line:

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.
Does anyone have a possible solution to this problem? I have tried all
the possibilities with py2exe, meaning bundle=1, bundle=2, bundle=3,
compressed=1, compressed=2, every possible combination. But it doesn't
work :-(

I attach my setup file, if it can be of any help.

Thank you very much for every pointer.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
Thread:
Andrea Gavana
Thomas Heller
Andrea Gavana
Thomas Heller
Andrea Gavana
Andrea Gavana

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved