## win32-ole-container library

This project contains an example program which demonstrates use of the Functional Developer's ole-container library to support embedding of graphical OLE objects produced by other programs.

The OLE-Container library is documented in the Functional Developer "OLE, COM, ActiveX and DBMS" reference manual.

This example provides the same simple functionality as the sample-ole-container example under the "Low-level OLE" examples, which uses the low-level Windows OLE API directly. This example uses the framework provided by the OLE-Container library to simplify the program. It uses the low-level Win32 API for its user interface. See also the sample-duim-container project for an example of a container program which uses DUIM for its user interface.

This example has the following limitations:

- It has no support for saving state to a file.
- It only supports one embedded object at a time.
- It supports only the basic OLE compound document protocols, not any of the newer optional ActiveX features.
- The embedded object cannot be moved or resized.

Program execution begins in `main-program` in main.dylan, which contains the Windows event loop. The file windows.dylan contains the function `main-wnd-proc`, which handles Windows events. When the "Insert Object" command is invoked from the "Edit" menu, the function `insert-object` in the file appdoc.dylan calls `insert-object-from-dialog` from the ole-container library to handle choosing and connecting to an object.

After building the program, run it and use the "Insert Object" command from the "Edit" menu to choose an object from among those registered on your system. Some may directly draw in the container window, while others pop up a separate application window in which you create the object, which is inserted in the container when you exit the application. Some objects add their own commands to the menu bar. Click outside the object to de-activate it; double click on it to re-activate. You can invoke "New" from the "File" menu to erase the current object and enable selecting another.