Hi there,
I have been following the examples to place
internet explorere into an SWT frame. The example doesn't actually specify any
specific need for the Canvas or Shell that it is embedded into,
here is my code so far (taken stratight from the
example)
display = new Display(); mainShell = new
Shell(display); OleFrame oleFrame = new OleFrame(mainShell,
SWT.CENTER); OleControlSite controlSite = new OleControlSite(oleFrame,
SWT.NONE, "Shell.Explorer"); OleAutomation automation = new
OleAutomation(controlSite); int[] rgdispid = automation.getIDsOfNames(new
String[]{"Navigate"}); int dispIdMember = rgdispid[0]; Variant[] rgvarg =
new Variant[1]; // this is the URL parameter rgvarg[0] = new Variant("www.ibm.com"); Variant pVarResult =
automation.invoke(dispIdMember, rgvarg);
mainShell.pack(); SWTUtils.center(mainShell); mainShell.open();
now whether I put the navigate
code
***
int[] rgdispid = automation.getIDsOfNames(new
String[]{"Navigate"}); int dispIdMember = rgdispid[0]; Variant[] rgvarg =
new Variant[1]; // this is the URL parameter rgvarg[0] = new Variant("www.ibm.com"); Variant pVarResult =
automation.invoke(dispIdMember, rgvarg);
***
before or after opening the shell, I still get a
grey window about 50x50 pixels.
Nothing is displayed in it.
What am I doing wrong, I am sure it's simple, so be
nice ;)
Any help would be appreciated
Regards
Steve
|