-
Book Overview & Buying
-
Table Of Contents
Microsoft Visual C++ Windows Applications by Example
By :
This application supports the Document/View model. CCalcDoc is the document class and CCalcView is the view class.
The class CCalcDoc is generated by the Application Wizard. We add the document's data and methods to handle the data. The class is inherited from the MFC class CDocument.
The field m_CalcState represents the status of the current spreadsheet. The user can choose to edit a specific cell or to mark one or more cells. The application always has to be in one of the two modes. When in the mark state, at least one cell is always marked. When the application starts, it is in the mark state and the top left cell is marked.
There is also the field m_iKeyboardState. It keeps track of the insert state of the keyboard. It can hold the insert and overwrite state. The fields have the enumeration types CalcState and KeyboardState. As KeyboardState is used by the cell class, it is defined in Cell.h.
enum CalcState {CS_MARK, CS_EDIT};
enum KeyboardState...
Change the font size
Change margin width
Change background colour