Objective Chart : PART II Programmer’s Guide : Chapter 20 Communication Document System
Chapter 20 Communication Document System
Introduction
One of the main goals of Objective Chart was to provide an exclusively MFC-based method for producing charts and integrating them with other applications, at a source code level. Of course, interaction with Objective Grid, allowing changes on the grid to affect the graph and vice-versa, was an important consideration.
Under the current MFC document architecture, it is not possible to generate a chart document from a command handler in the grid document and then initialize the chart with data. If you invoke a new document in an application with more than one document template, the MFC system brings up a dialog asking which document type you want to use. Even if you know that you need a particular kind of document, there is no way of picking it from the list automatically.
The ComDoc system allows these kinds of actions. It makes it possible to:
1. Call up a document of a certain type.
2. Initialize it with data.
3. Maintain a two-way stream of communication between the original or parent document and the newly created child document.
The ComDoc system is not a required item when using Objective Chart. It is a useful tool to allow complex document management and communication. It may be used to enhance applications that do not use Objective Chart or Objective Grid.
The classes that implement the ComDoc system, SECComDoc and SECDocManager, are discussed in this chapter.