Next Previous Up Top Contents Index

3.4 Building a compound document server in DUIM

3.4.1 Differences from ordinary DUIM applications

To build a compound document server application in DUIM, write your application as you would a normal DUIM application, but with the few differences summarized below.

1. Use the DUIM-OLE-Server library.
In addition to the DUIM libraries you would normally use, use the DUIM-OLE-Server library and its DUIM-OLE-Server module in your server application's library and module definitions.
2. Define the application as a subclass of <embeddable-frame>.
Instead of defining your application as a subclass of <simple-frame>, define it as a subclass of <embeddable-frame> (page 146).
3. Give the application a COM Class ID (a GUID).
When creating an instance of <embeddable-frame> with make, supply a class-id: argument (whose value is usually created by make-GUID, page 351). This argument is recorded next to the name of the server application in the Windows registry; it is the key that client applications use to find the server application. There are other, optional arguments that allow further control over registration. See <embeddable-frame>, page 146.
4. Define methods to handle persistent storage in compound documents.
Define methods for save-frame-to-storage (page 159) and load-frame-from-storage (page 160). These functions handle your server application's persistent data, ensuring that it can be saved as part of a compound document and reloaded next time the user accesses the compound document. When your application needs to save its data, call note-embedded-data-changed (page 155) on the instance of <embeddable-frame>.
5. Use frame-status-message for application status bar messages
To display status bar messages, instead of referring directly to frame-status-bar, use this idiom:
  frame-status-message(frame) := "Message-text string";

This ensures that status bar messages always work, whether or not the application is running embedded.

For more information, see the code for the DUIM OLE Scribble example in:

Examples\duim-ole\ole-scribble\


OLE, COM, ActiveX and DBMS Reference - 31 MAR 2000

Next Previous Up Top Contents Index