wxPython in C++ app using wxWidgets

Stephen Hansen apt.shansen at gmail.com
Sat Aug 18 01:26:19 CEST 2007


On 8/17/07, Marcin Kalicinski <kalita at poczta.onet.pl> wrote:
>
> I have an application written in C++ that uses wxWidgets for GUI. I use
> embedded Python for scripting inside of this application. I want to use
> wxPython to add GUI to my scripts - because my C++ App uses wxWidgets I
> thought it to be easy. The problem is that wxPython knows nothing about
> wxApp/wxFrame objects created in my C++ application, and insists (by
> giving
> me asserts) that I create another wxApp object for wxPython inside my
> scripts. Obviously, this is not what I want. I want the scripts to use the
> same wxApp/wxFrame object that my C++ application already created. More
> specifically, I want to create dialogs in wxPython that will have my
> application wxFrame as parent.
>

I have nooo idea how to do it with pure wx, buut, you could try passing the
handle for the parent via wx.Window.GetHandle() to Python, then create a
reference to it in python via wx.Window_FromHWND(handle). Maybe! Its just a
guess :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070817/45b12e34/attachment.html>


More information about the Python-list mailing list