OLE clipping

Mike Hearn m.hearn at signal.qinetiq.com
Fri May 16 05:41:14 CDT 2003


On Mon, 2003-05-12 at 19:03, Ulrich Czekalla wrote:
> Hi Mike,
> 
> It could be a z-order issue. If you want, I'll have a look if you send
> me a sample app or point me to a download link.

Hmm, the only way I can think of sending you this test case would be to
send a complete fake windows directory :( Basically, what you'd need to
do in order is this:

1) Install IE (i use v6)

2) Install Java 1.4.1 SDK from java.sun.com (to c:\java to make things
easy)

3) Download and install Neva Coroutine (30 day trial) from
www.nevaobject.com

4) Copy corojdk.dll from the Coroutine/ directory to fake windows
system, and the Coroutine4Java.jar file to c:\java\jre\lib

5) Apply the attached patch in the Java2COM/Examples directory (the last
section may not be needed). This ports the example to Swing.

6) The bootstrap script I've been using is also attached (to be put into
the Examples/WebBrowser directory) which will compile then run the
program.

I'll completely understand if you'd rather skip this one :|

Anyway, perhaps you could elaborate on what exact z-ordering problems
there might be? Are there any good docs on how this should work around?
I'll go have a look at MSDN now....

thanks -mike

-- 
Mike Hearn <m.hearn at signal.qinetiq.com>
QinetiQ - Malvern Technology Center
-------------- next part --------------
--- WebBrowser-old/WebBrowser.java	2001-11-01 18:09:12.000000000 +0000
+++ WebBrowser/WebBrowser.java	2003-05-16 10:34:16.000000000 +0100
@@ -18,6 +18,7 @@
 import java.awt.event.*;
 import java.util.*;
 import java.net.*;
+import javax.swing.*;
 import com.neva.*;
 import Shdocvw.*;
 import Mshtml.*;
@@ -45,25 +46,25 @@
 	public Dimension getPreferredSize() { return new Dimension(400,200);}
 	public Dimension getMinimumSize() { return new Dimension(50,50);}
 }	
-class ControlPanel extends java.awt.Panel {
+class ControlPanel extends javax.swing.JPanel {
 	public Dimension getPreferredSize() { return new Dimension(400,120);}
 	public Dimension getMinimumSize() { return new Dimension(400,120);}
 }
-public class WebBrowser extends Frame implements Shdocvw.DWebBrowserEvents2_If {
-	public Button go,stop,print,find;
-	public TextField url,search;
-	public Label status,lab1;
+public class WebBrowser extends JFrame implements Shdocvw.DWebBrowserEvents2_If {
+	public JButton go,stop,print,find;
+	public JTextField url,search;
+	public JLabel status,lab1;
 	public IE ie;	
 	public ControlPanel panel;
 
 	public static void main(String [] param) {
-		new WebBrowser(param.length==0?"www.yahoo.com":param[0]);
+		new WebBrowser(param.length==0?"http://www.google.com/":param[0]);
 	}
 	public WebBrowser(String initUrl) {
 		super("Internet Explorer");
-		GridBagLayout gbl=new GridBagLayout();
-		GridBagConstraints gbc=new GridBagConstraints();
-		setLayout(gbl);
+		GridBagLayout gbl = new GridBagLayout();
+		GridBagConstraints gbc = new GridBagConstraints();
+		getContentPane().setLayout(gbl);
 		gbc.gridwidth=GridBagConstraints.REMAINDER;
 		gbc.anchor=GridBagConstraints.NORTH;
 		gbc.weightx=1.0;
@@ -71,19 +72,19 @@
 		gbc.fill=GridBagConstraints.BOTH;
 		ie=new IE(this,initUrl);
 		gbl.setConstraints(ie,gbc);
-		add(ie);
-		panel=new ControlPanel();
+		getContentPane().add(ie);
+		panel = new ControlPanel();
 		panel.setLayout(null);
 		gbc=new GridBagConstraints();
 		gbc.gridwidth=GridBagConstraints.REMAINDER;
 		gbc.anchor=GridBagConstraints.SOUTH;
 		gbl.setConstraints(panel,gbc);
-		add(panel);
-		url=new TextField("http://www.yahoo.com",255);
+		getContentPane().add(panel);
+		url=new JTextField("http://www.yahoo.com",255);
 		panel.add(url);
 		url.setBounds(105,30,250,20);
 		url.setFont(new Font("Verdana",Font.PLAIN,12)); 
-		go=new Button("Go");
+		go=new JButton("Go");
 		panel.add(go);
 		go.setBounds(50,30,40,20);
 		go.addActionListener(new ActionListener()  {
@@ -96,7 +97,7 @@
 				}
 			}
 		});
-		stop=new Button("Stop");
+		stop=new JButton("Stop");
 		panel.add(stop);
 		stop.setBounds(120,60,40,20);
 		stop.addActionListener(new ActionListener()  {
@@ -109,7 +110,7 @@
 				}
 			}
 		});
-		print=new Button("Print");
+		print=new JButton("Print");
 		panel.add(print);
 		print.setBounds(50,60,40,20);
 		print.addActionListener(new ActionListener()  {
@@ -133,7 +134,7 @@
 				}
 			}
 		});
-		find=new Button("...");
+		find=new JButton("...");
 		panel.add(find);
 		find.setBounds(360,30,40,20);
 		find.addActionListener(new ActionListener() {
@@ -149,15 +150,15 @@
 			}
 			public boolean accept(java.io.File dir, String file) {return true;}
 		});
-		status=new Label("",Label.LEFT);
+		status=new JLabel("",Label.LEFT);
 		panel.add(status);
 		status.setBounds(50,10,300,15);
 		status.setFont(new Font("Verdana",Font.PLAIN,12)); 
-		lab1=new Label("Search:",Label.LEFT);
+		lab1=new JLabel("Search:",Label.LEFT);
 		panel.add(lab1);
 		lab1.setBounds(50,90,50,20);
 		lab1.setFont(new Font("Verdana",Font.PLAIN,12)); 
-		search=new TextField("",255);
+		search=new JTextField("",255);
 		panel.add(search);
 		search.setBounds(105,90,250,20);
 		enableEvents(java.awt.event.WindowEvent.WINDOW_CLOSING);
@@ -376,6 +377,17 @@
 	public void FileDownload(boolean [] /*[in out]*/ _Cancel ) {}
 
 	public void StatusTextChange(String /*[in]*/ _Text ) {status.setText(_Text);}
+	
+	public void NavigateError(com.neva.COMIDispatch /*[in]*/ _pDisp , com.neva.COMVariant /*[in]*/ _URL , com.neva.COMVariant /*[in]*/ _Frame , com.neva.COMVariant /*[in]*/ _StatusCode , boolean [] /*[in out]*/ _Cancel ) {}
+
+	public void PrintTemplateInstantiation(com.neva.COMIDispatch /*[in]*/ _pDisp ) {}
+
+	public void PrintTemplateTeardown(com.neva.COMIDispatch /*[in]*/ _pDisp ) {}
+
+	public void UpdatePageStatus(com.neva.COMIDispatch /*[in]*/ _pDisp , com.neva.COMVariant /*[in]*/ _nPage , com.neva.COMVariant /*[in]*/ _fDone ) {}
+
+	public void PrivacyImpactedStateChange(boolean /*[in]*/ _bImpacted ) {}
+
 
 	public void DocumentComplete(com.neva.COMIDispatch /*[in]*/ _pDisp , com.neva.COMVariant /*[in]*/ _URL ) {
 		try {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: run
Type: text/x-sh
Size: 543 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20030516/aa062d3e/run.sh


More information about the wine-devel mailing list