[Please respond to me as well as the list; I'm not subscribed. Thanks!]
I have a Visual Basic (yuck) app which needs to display some HTML in a
subwindow on a form. I figure the best (only?) way to do that is via an
ActiveX control.
I know it's easy (almost trivial) to use Python to make an ActiveX control
using win32com.server.register(class), and I know I can use wxPython to make
an HTML view window. I've done all that already.
But my shiny new HTML window (a wx.Frame) floats independently; I'd like it
to be embedded in the form like other ActiveX controls. I guess I just need
to parent my frame properly, but I have no idea where to get the native
Windows parent window handle from, or what to do with it if I had it. And I
suppose there might be event-handling issues too?
I've seen lots of examples of doing the opposite thing: embedding non-Python
ActiveX controls in wxWidgets frames, but I want to go the other way.
[Please respond to me as well as the list; I'm not subscribed. Thanks!]
I have a Visual Basic (yuck) app which needs to display some HTML in a
subwindow on a form. I figure the best (only?) way to do that is via an
ActiveX control.
I know it's easy (almost trivial) to use Python to make an ActiveX control
using win32com.server.register(class), and I know I can use wxPython to make
an HTML view window. I've done all that already.
I know it's a bit blasphemous for me to say this but why not just embed the IE activeX in the VB app?
But my shiny new HTML window (a wx.Frame) floats independently; I'd like it
to be embedded in the form like other ActiveX controls. I guess I just need
to parent my frame properly, but I have no idea where to get the native
Windows parent window handle from, or what to do with it if I had it. And I
suppose there might be event-handling issues too?
I've seen lots of examples of doing the opposite thing: embedding non-Python
ActiveX controls in wxWidgets frames, but I want to go the other way.
Any hints? Has anyone ever tried this before?
I don't know enough about COM and ActiveX to say for sure but I don't think it is possible. I think wxWindow would need to implement some COM interfaces to make it possible to plug it into an ActiveX container, and it doesn't do that.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I know it's a bit blasphemous for me to say this but why not just
embed the IE activeX in the VB app?
That was my first attempt. Unfortunately it's hard to make that control
do just what I want -- not load more pages on clicks, just display an HTML
string directly, make it non-editable, and various other things.
I don't know enough about COM and ActiveX to say for sure but I don't
think it is possible. I think wxWindow would need to implement some COM
interfaces to make it possible to plug it into an ActiveX container, and
it doesn't do that.
Thanks for the info! Seeing as that's probably not possible, does anyone
know if a python COM object can define & send COM events to its container?
In other words, if my Python COM object starts up and later wants to
asynchronously tell the VB code something, VB normally implements an event
handler and the COM server raises that event, which calls back into VB. (I
know this is more a Python/COM question than wxpython. Maybe I need to ask
it somewhere else.)
I know it's a bit blasphemous for me to say this but why not just
embed the IE activeX in the VB app?
That was my first attempt. Unfortunately it's hard to make that control
do just what I want -- not load more pages on clicks, just display an HTML
string directly, make it non-editable, and various other things.
I don't know enough about COM and ActiveX to say for sure but I don't
think it is possible. I think wxWindow would need to implement some COM
interfaces to make it possible to plug it into an ActiveX container, and
it doesn't do that.
Thanks for the info! Seeing as that's probably not possible, does anyone
know if a python COM object can define & send COM events to its container?
In other words, if my Python COM object starts up and later wants to
asynchronously tell the VB code something, VB normally implements an event
handler and the COM server raises that event, which calls back into VB. (I
know this is more a Python/COM question than wxpython. Maybe I need to ask
it somewhere else.)