On Jun 13, 3:01 am, "peng" <[EMAIL PROTECTED]> 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#451 Call the GetWebBrowser method and cast to a nsIWebBrowser. See: http://mxr.mozilla.org/seamonkey/source/embedding/browser/webBrowser/nsIWebBrowser.idl Once there, you can get access to the content DOM window, nsIDOMWindow. See: http://mxr.mozilla.org/seamonkey/source/dom/public/idl/base/nsIDOMWindow.idl You 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 [email protected] https://lists.mozilla.org/listinfo/dev-embedding
