DWT OLE, embedding VIM

Bjoern nanali at nospam-wanadoo.fr
Tue Feb 19 10:08:45 PST 2008


I want to embed VIM using OLE, No success at all :(, I also tried 
"Shell.Explorer" 'cause VIM is known as problematic, same result.
Maybe I miss some imports, Dunno, Hope someone is able to help;
Kind regards, Bjoern
oh, linking is done with subsystem:console:5, like helloworld stuff  ...

module dwtexamples.helloworld.hellovim;

import dwt.DWT;
import dwt.layout.FillLayout;
import dwt.widgets.Display;
import dwt.widgets.Shell;
import dwt.ole.win32.OLE;
import dwt.ole.win32.OleAutomation;
import dwt.ole.win32.OleControlSite;
//import dwt.ole.win32.OleClientSite;
import dwt.ole.win32.OleFrame;
import dwt.ole.win32.Variant;

/*
  * This example builds on HelloVim and demonstrates how to use OLE
  */
void main ()
{
     Display display = new Display ();
     Shell shell = new Shell (display);
     shell.setSize(600, 400);
     shell.setLayout(new FillLayout());

     OleControlSite oleControlSite;

     OleFrame oleFrame = new OleFrame(shell, DWT.NONE);
     oleControlSite = new OleControlSite(oleFrame, DWT.NONE, 
"Vim.Application"); // "Shell.Explorer"
     oleControlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);

     shell.pack();
     shell.open();
     while (!shell.isDisposed ())
     {
         if (!display.readAndDispatch ()) display.sleep ();
     }
     display.dispose ();
}


// for unknown reason, there are linker errors. These imports are the 
workaround
import tango.io.Stdout;
import tango.math.Math;
import tango.text.convert.Format;
import tango.util.Convert;
import tango.util.PathUtil;


More information about the Digitalmars-d-dwt mailing list