MakeActiveXClass and MSHTML - 2 problems...
psparago at yahoo.com
Thu Oct 7 14:21:30 CEST 2004
I figured out the answer to the SECOND question. I still have a
question on how to set focus to the MSHTML editor control. Help would
be greatly appreciated.
I have yet another question. This time about makegw. Once you generate
the C++ interfaces and/or gateways, what do you do with them :-)??
C'mon Python COM gurus! Help! :-)
psparago at yahoo.com (Peter Sparago) wrote in message news:<584da15e.0410061511.2f828552 at posting.google.com>...
> I figured out the answer to the first question. For anyone interested,
> in order to perform the QueryInterface call, you must make the call on
> the embedded "OLE" (COM) object of the ActiveXControl like so:
> persist = self.editor._oleobj_.QueryInterface(pythoncom.IID_IPersistFile)
> I still need help with the second issue. Anyone?
> psparago at yahoo.com (Peter Sparago) wrote in message news:<584da15e.0410051513.60b77760 at posting.google.com>...
> > I have been mostly successful in embedding the Microsoft MSHTML editor
> > in a python application. However, there are two issues that are
> > driving me bananas.
> > Issue 1:
> > I can't set focus to the editor control. Since the ActiveX wrapper
> > extends wx.Window, if I do something like:
> > self.editor.SetFocus
> > it returns false. Has anyone been able to programmatically set focus
> > to the MSHTML editor control?
> > Issue 2:
> > I want to be able to query the IHTMLDocument object (interface) that
> > MakeActiveXClass generates for the ICustomDoc interface (in order to
> > take control of the right-click context menu). However, QueryInterface
> > is NOT supported by the IHTMLDocument object (I did a dir(self.editor)
> > to prove it - no QueryInterface). Has anyone queried the ActiveX
> > object for another interface it implements?
> > Thanks
> > peter
More information about the Python-list