[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform.swt] Embedded Contents: SWT OLE into Canvas
|
- From: oe_promos@xxxxxxxx (Oscar)
- Date: Thu, 2 Jun 2005 15:03:22 +0000 (UTC)
- Newsgroups: eclipse.platform.swt
- Organization: not organized
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I am trying to use a swt ole component into my awt application.
My code:
Frame f = new Frame( "Example" );
Canvas c1 = new Canvas();
f.add(c1);
f.show();
Display display = new Display();
SWT_AWT a1 = new SWT_AWT();
Shell shell= SWT_AWT.new_Shell(display,c1);
OleFrame oleFrame = new OleFrame(shell, SWT.NONE);
OleControlSite oleControlSite;
oleControlSite = new OleControlSite(oleFrame, SWT.NONE, "Shell.Explorer");
oleControlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
That works fine... the problem is that in my appication I can not use a
Frame I need to put the canvas over a awt.Panel:
Frame f = new Frame( "Example" );
Canvas c1 = new Canvas();
Panel p1 = new Panel();
p1.add(c1);
f.add(p1);
f.show();
Display display = new Display();
SWT_AWT a1 = new SWT_AWT();
Shell shell= SWT_AWT.new_Shell(display,c1);
OleFrame oleFrame = new OleFrame(shell, SWT.NONE);
OleControlSite oleControlSite;
oleControlSite = new OleControlSite(oleFrame, SWT.NONE, "Shell.Explorer");
oleControlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
BUT IT DOESN'T WORK .... ANY IDEA?