[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] OleClientSite strange behavior
|
There is a simple program
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.ole.win32.*;
import org.eclipse.swt.widgets.*;
public class OleTest {
public static void main(String[] args) {
Display disp = new Display();
Shell mainWnd = new Shell(disp);
mainWnd.setText("OleTest");
mainWnd.setLayout(new FillLayout());
OleFrame frame = new OleFrame(mainWnd, SWT.BORDER);
String progID = "Word.Document";
OleClientSite fSite = new OleClientSite(frame, SWT.NONE, progID);
mainWnd.open(); while (!mainWnd.isDisposed()) {
if (!disp.readAndDispatch()) {
disp.sleep();
}
} }
}
On some computers with Windows 2000 this works fine, on some with Windows 2000 program hangs. Investigation showed that program hangs inside doVerb(OLE.OLEIVERB_SHOW) call. There are now obvious difference between computer configurations. Tha analogous program written in MFC works fine.
Any ideas?
Thanks in advance.
Airat.