[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Setting the ppDispId param in an OleControl

I don't know as much about embedding IE as I would like to, but I will give
a stab at this question:

The MSDN says:
"Create a new, hidden, nonnavigated WebBrowser or InternetExplorer object
that is returned in ppDisp."

I do not think that means an IDispatch object for the OleFrame (which
currently does not implement an IDispatch interface).  I think you would
need to create a second OleFrame + OleControlSite for Shell.Explorer and
pass the address of the IDispatch interface for the IWebBrowser object.

e.g.:

OleFrame frame = new OleFrame(parent, SWT.NONE);
OleControlSite controlSite = new OleControlSite(frame, SWT.NONE,
"Shell.Explorer");
OleAutomation oleObject = new OleAutomation(controlSite);
int address = oleObject.getAddress(); // this unfortunately is not public
API so you would have to hack the OleAutomation class to get it.  Request
support from SWT
COM.MoveMemory(ppDispID, new int[] {address}, 4);


"Dave" <chaotica1974@xxxxxxxxxxx> wrote in message
news:b7opsh$rbo$1@xxxxxxxxxxxxxxxx
> Hello all,
>     I am trying to alter the behavior of my IE ActiveX control by making
all
> new pop up windows fall under my application's control. I have succesfully
> stopped the NEWWINDOW2 event and that works great, however in some
> circumstances I want a new window (one of mine) to come up when a
NEWWINDOW2
> event is received. According to MSDN, to do this I have to set the
ppDispId
> parameter of the OleEvent to my new window's handle. I guess the real
> question is not how to set the ppDispId but how to get the ppDispId of the
> OleFrame that I am using to house the IE ActiveX Control. I have seen
> similar posts in the old eclipse.tools forum but no one has answered.
>
>
> Any help is greatly appreciated!
>
> Thanks
> Dave
>
>