Active Documents

OverviewHow Do I

Active documents provide an extension to traditional embedded objects. The Active documents may be multipage and are displayed in the entire client area. They do traditional menu negotiation, and can be edited in-place as well as in an open window in the server application. Instead of displaying as a small rectangle surrounded by a hatched border, Active documents are full frame and always in-place active.

Active documents can be viewed in a container like the Microsoft Office Binder, which provides a way to create a compound document made up of different document types like Excel, Word, and your custom document type, each of which can be edited full frame. Active documents can also be displayed in a browser such as Microsoft Internet Explorer 3.0, which is an Active document container.

Advantages of Active Documents

Active document features include:

  • Documents can be viewed full frame, in the entire client window.

  • Documents can be opened in a separate application window.

    For the document to open, the helper application must exist on the client, or be downloaded separately before the application can run. A viewer may be written to provide limited functionality (Word, PowerPoint, and Excel provide viewers for their documents). The full version of the application can provide full editing support.

  • Documents are always in-place active.

  • Menu commands invoked from the container can be routed to your document.

  • Documents can be viewed in a Web browser. This provides seamless integration between your documents and other Web pages.

    A user can browse an HTML Web page, then an Excel spreadsheet, and then to a document that you've written using MFC support for Active documents. The user can navigate using the familiar Web interface, as the browser switches seamlessly between the menus and views of an HTML page, Excel, and your application's document.

  • All applications are displayed in a common frame.

Requirements for Active Documents

The interfaces listed in the table below include interfaces already required for embedded servers and several new interfaces specific to Active documents. MFC provides default implementations for most of these interfaces in the class.

A document that . . . Implements these interfaces
Uses compound files as its storage mechanism. IpersistStorage.
Supports the basic embedding features of Active documents, including Create From File. IpersistFile, IoleObject, and IDataObject.
Supports in-place activation. IoleInPlaceObject and IoleInPlaceActiveObject (using the container's IOleInPlaceSite and IoleInPlaceFrame interfaces).
Supports the Active document extensions that involve these new interfaces. Some interfaces are optional. IoleDocument, IOleDocumentView, IoleCommandTarget, and IPrint.

MFC provides support for extending existing embedded server support to Active documents.

What do you want to do?

See Also   Internet: Where Is...