[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] Internet Explorer in SWT example doesn't work
|
You have not given the OleFrame any size.
The following line (or something like it) is required:
mainShell.setLayout(new FillLayout());
"Steve Vanspall" <steve@xxxxxxxxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
10/07/2004 11:04 PM
Please respond to
platform-swt-dev
To
<platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] Internet Explorer in SWT example doesn't work
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