Book Image

Microsoft Visual C++ Windows Applications by Example

By : Stefan Bjornander, Stefan Björnander
Book Image

Microsoft Visual C++ Windows Applications by Example

By: Stefan Bjornander, Stefan Björnander

Overview of this book

Table of Contents (15 chapters)
Microsoft Visual C++ Windows Applications by Example
Credits
About the Author
About the Reviewer
Preface
Index

The Spreadsheet


The spreadsheet of the application is represented by the classes Cell, CellMatrix, and TSetMatrix.

The Cell—Holding Text, Value, or Formula

The information of a spreadsheet is organized in cells. Each cell contains a text representing a numerical value, a formula, or (possibly empty) plain text. The value of the cell may affect the values in other cells. If the cell contains a formula, its value may depend on the values in other cells. This implies that each cell has a set of cells whose values it depends on, a source set, and a set of cells. The set's values depend on the cell's value and are called its target set.

There are three classes in this section: Cell, which handles a single cell, CellMatrix, which handles the whole spreadsheet, and TSetMatrix, which handles the target set for all cells. You may wonder why there is a matrix for the target sets, but not for the source sets. The answer is that the cell itself decides its source set. Only formulas have a source set, texts...