TODOSVR

ToDoSvr is a simple example of a combination OLE Control and Document Object server based on the OLE Controls Framework sample code. Generic extensions to the framework which would apply to any Document Object server are contained in the class CDocumentObject, which is defined in cdocobj.h. Any code which is specific to making ToDoSvr act as a Document Object is marked with a comment containing the word DOCOBJ. Any code which is specific to hyperlinking support is marked with a comment containing the work HLINK.

Building ToDoSvr

Before attempting to build ToDoSvr, first run setenv.bat to be sure the Internet SDK include, bin, and lib directories are included in your environment.

ToDoSvr depends on the FrameWrk sample, which must be built first. To build a debug version of the framework library, use the command line nmake from the FrameWrk directory. To build a retail version of the framework, use the command line nmake nodebug=1 from the FrameWrk directory. Debug and retail libraries are placed in the FrameWrk\Debug and FrameWrk\Retail subdirectories, respectively.

After building the FrameWrk library you can build the ToDoSvr control by moving to the ToDoSvr directory and entering the command nmake to build a debug version, or nmake nodebug=1to build a retail version. The ToDoSvr sample will be automatically registered as part of the build process.

What ToDoSvr Does

In its current state, ToDoSvr shows nothing more than the minimal amount of code required to act as a Document Object from within Office Binder. It does not manage any data and it doesn't display anything.

In its completed form, ToDoSvr will be a simple to-do list manager that can act as a Document Object within any Document Object container. A to-do list consists of a collection of tasks. A task consists of the following information:

ToDoSvr will expose a simple object model which lets you manage this information via OLE automation. In addition to providing hyperlinks to documents you are working on, ToDoSvr objects will act as hyperlink targets, so that you can easily jump to particular tasks.

Running ToDoSvr

After you have built and registered ToDoSvr, start Office Binder, then select the Section|Add... command. From the list of available document types, choose ToDoCtl Object. The window which is displayed is the ToDoSvr window.

Known Problems

  1. ToDoSvr does not do anything at the moment. It does not manage any data, expose any OLE automation model, or use hyperlinks. All you can do is insert a ToDoSvr object into a control container or DocObject container. You will see a empty rectangle where there should be the server's data.

Keywords: OLE Control, Document Object, DocObject, DocObj, Hyperlink, HLink, IOleDocument, IOleDocumentView, IOleCommandTarget, IPrint, IHlinkTarget, IHlinkSite, HlinkCreateFromString.