The cell

The cell can hold three modes: (possible empty) text, a numerical value, or a formula. Its mode is stored in the cellMode field. It can hold the value TextMode, ValueMode, or FormulaMode. Similar to CalcDocument in this chapter and WordDocument in the previous chapters, we refer to the current value of cellMode in expressions such as in text mode, in value mode, and in formula mode.

HeaderWidth, HeaderHeight, ColWidth, and RowHeight are the size of the headers and cells of the spreadsheet. In order for the cell text to not overwrite the cell's borders, CellMargin is used. The spreadsheet is made up of ten rows and four columns.


extern const int HeaderWidth, HeaderHeight, ColWidth, RowHeight, CellMargin; #define Rows 10 #define ...

Get C++ Windows Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.