Reader small image

You're reading from  C++ Windows Programming

Product typeBook
Published inSep 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781786464224
Edition1st Edition
Languages
Right arrow
Author (1)
Stefan Björnander
Stefan Björnander
author image
Stefan Björnander

Stefan Björnander is the author of the books Microsoft Windows C++ and C++ Windows Programming. He holds a Master of Engineering and a Licentiate in Computer Science. He has worked as a software developer and as a teacher in computer science and mathematics for many years.
Read more about Stefan Björnander

Right arrow

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.

Cell.h

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

A cell can be aligned at the left, center, right or justified in the horizontal direction, and it can be aligned at the top, center, or bottom in the vertical direction:

enum Alignment {Left, Center...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
C++ Windows Programming
Published in: Sep 2016Publisher: PacktISBN-13: 9781786464224

Author (1)

author image
Stefan Björnander

Stefan Björnander is the author of the books Microsoft Windows C++ and C++ Windows Programming. He holds a Master of Engineering and a Licentiate in Computer Science. He has worked as a software developer and as a teacher in computer science and mathematics for many years.
Read more about Stefan Björnander