On Jun 13, 3:01 am, "peng" <
p...@...> wrote:
> Hello:
> I'm new to embed mozilla,I use mozilla as activex in bcb6,I want to get
> and use the dom,
> I can get two object(Variant Toobj=MozillaBrowser->OleObject; LPDISPATCH
> md=MozillaBrowser->Document;)
> I want to create an Mouse event for Element and then dispatchthis event.
> How to use them to do this?
>
> Thanks.
>
> peng
Unfortunately, the Mozilla ActiveX control doesn't implement many
(any??) of the onXxx handlers (like onclick). Therefore, your best bet
is to fallback to using the Mozilla interfaces from the ActiveX
control. The control has a "backdoor" interface. You can
QueryInterface to it and get access to the raw Mozilla C++ interfaces.
See:
http://mxr.mozilla.org/seamonkey/source/embedding/browser/activex/src/control/MozillaControl.idl#451Call the GetWebBrowser method and cast to a nsIWebBrowser. See:
http://mxr.mozilla.org/seamonkey/source/embedding/browser/webBrowser/nsIWebBrowser.idlOnce there, you can get access to the content DOM window,
nsIDOMWindow. See:
http://mxr.mozilla.org/seamonkey/source/dom/public/idl/base/nsIDOMWindow.idlYou can then attach event listeners to elements, just like Mozilla
code does. Use Mozilla IRC (
http://irc.mozilla.org) or XPCOM, DOM
newsgroups for more help.
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding