The CHKBOOK sample demonstrates how to simulate multiple views in Windows CE by hiding/showing windows. (Windows CE doesn't support Multi-Document Interface (MDI).)
There is only one view of the document, implemented in class CCheckBookView. To enter or view data for a single check, select the menu item View Check, and a dialog is displayed. To show a summary of each check in the checkbook, select the menu item View Book, and an edit window is displayed. The two views cannot be seen at the same time, but you can toggle between them.
You can change the current selection in the checkbook view by using the menu items Previous and Next, or by tapping a check item with the stylus. The check view always shows the current selection in the checkbook view.
The check amount field in the check form view validates and converts a textual representation such as "19.98" to an internal DWORD representation. CHKBOOK does not do arithmetic, but it easily could be extended to add up all the check amounts and display the total on a bottom line.
Record-Based Document
A record-based document is one whose persistent data is updated each time the user adds, deletes, or modifies some portion of its data. This requires overriding the framework's default implementation for file-based documents. The default behavior is to read a file entirely into memory upon File Open and write it entirely back to the disk on File Close.
CHKBOOK Simplifications
The CHKBOOK sample has several simplifications to keep the code focused on MFC features and techniques the sample is designed to illustrate. For example:
This sample demonstrates the following keywords:
You can find the CHKBOOK project files in the Wce\Samples\Mfc\CHKBOOK directory.
To build the CHKBOOK sample, follow the procedure described in Building the Sample Applications, selecting one or more of the following project configurations.