fenye

所属分类:打印编程
开发工具:Visual C++
文件大小:40KB
下载次数:33
上传日期:2005-08-23 10:02:30
上 传 者dian889
说明:  VC在实现打印功能过程中,由此程序可实现分页功能.
(VC in achieving printing process, this process can be realized tabs.)

文件列表:
fenye (0, 2005-08-23)
fenye\BOOKVW.CPP (4045, 1998-03-27)
fenye\BOOKVW.H (1884, 1998-03-27)
fenye\CHECKDOC.CPP (8315, 1998-03-27)
fenye\CHECKDOC.H (2866, 1998-03-27)
fenye\CHECKVW.CPP (5151, 1998-03-27)
fenye\CHECKVW.H (1873, 1998-03-27)
fenye\CHKBKFRM.CPP (927, 1998-03-27)
fenye\CHKBKFRM.H (1252, 1998-03-27)
fenye\CHKBOOK.CLW (3277, 1998-03-27)
fenye\CHKBOOK.CPP (7104, 1998-03-27)
fenye\CHKBOOK.DSP (7726, 1998-03-27)
fenye\CHKBOOK.DSW (537, 1998-03-27)
fenye\CHKBOOK.H (1362, 1998-03-27)
fenye\CHKBOOK.MAK (12975, 1998-03-27)
fenye\CHKBOOK.RC (15056, 1998-03-27)
fenye\CHKBOOK.REG (215, 1998-03-27)
fenye\DOLLCENT.CPP (6537, 1998-03-27)
fenye\DOLLCENT.H (842, 1998-03-27)
fenye\FXRECDOC.CPP (6049, 1998-03-27)
fenye\FXRECDOC.H (2792, 1998-03-27)
fenye\MAINFRM.CPP (3655, 1998-03-27)
fenye\MAINFRM.H (1345, 1998-03-27)
fenye\MAKEFILE (671, 1998-03-27)
fenye\RESOURCE.H (3326, 1998-03-27)
fenye\ROWVIEW.CPP (10501, 1998-03-27)
fenye\ROWVIEW.H (2879, 1998-03-27)
fenye\STDAFX.CPP (628, 1998-03-27)
fenye\STDAFX.H (703, 1998-03-27)
fenye\RES (0, 2005-08-23)
fenye\RES\CHECKVW.ICO (766, 1998-03-27)
fenye\RES\CHKBOOK.ICO (766, 1998-03-27)
fenye\RES\DOC.ICO (766, 1998-03-27)
fenye\RES\TOOLBAR.BMP (958, 1998-03-27)

This is a part of the Microsoft Foundation Classes C++ library. Copyright (C) 1992-19*** Microsoft Corporation All rights reserved. This source code is only intended as a supplement to the Microsoft Foundation Classes Reference and related electronic documentation provided with the library. See these sources for detailed information regarding the Microsoft Foundation Classes product. ------------------------------------------------------- CHKBOOK Sample Microsoft Foundation Classes Application ------------------------------------------------------- The CHKBOOK sample application primarily serves to illustrate the following Microsoft Foundation Classes features and programming techniques: 1. Transaction-based file i/o, where the document (file) is written to on a per transaction basis rather than on a load/save basis. 2. Multiple views of a document, where (a) each view is of a different CView-derived class, and (b) each view is in a separate MDI child window. 3. Using the CScrollView class, which supports viewing of a document in a scrolling window. 4. Using the CFormView class, which supports viewing of a document using a form with controls laid out in a dialog template resource. 5. Implementing page breaks during printing. 6. Writing custom data exchange and validation (DDX/V) functions. 7. Using a private INI file to automatically open a document when the application is started. 8. Using Registry entries to define a specific icon for a data file, and to allow running the application by double-clicking on the data file. The CHKBOOK sample illustrates the above using the following user interface: * The CHKBOOK sample is a single document application in the sense that it only allows only one checkbook file to be open at a time. But CHKBOOK uses MDI features of MFC to provide multiple views of the document via views in separate MDI child windows. To enforce that only one document is open at a time, we simply remove the File New and File Open commands from the menus and toolbars of the MDI children, which represent an already opened document. * The two views of the document are a check view and a book view. The check view, implemented in class CCheckView, provides a form for entering or viewing the data for a single check. The book view, implemented in CBookView, provides a scrolling window showing a summary of each check. * The CHKBOOK application supports the concept of current selection. The user can change the current selection in the book view by using up and down arrow keys, and by clicking a check with the mouse. The second check view always shows the current selection in the book view. * The check amount field in the check form view validates and converts a textual representation such as "19.***" to an internal DWORD representation. The use of DWORD facilitates money arithmetic better than, for example, floating point. CHKBOOK happens to not do money arithmetic, but it easily could, for example, add up all the check amounts and display it on a bottom line. * The check view shows an English text presentation of the check amount, such as "Nineteen and ***/100ths Dollars" as the user types along in the numeric field. The CHKBOOK sample has several simplifcations in order to keep the code focused on the above MFC features and techniques the sample is designed to illustrate. For example: * CHKBOOK supports only checks and no other money transactions such as deposits. CHKBOOK does not support the deletion (voiding) of checks. The check data is written using fixed length records rather than using a more space-efficient variable length records. These simplications allow the CChkBookDoc class to access individual check records according to the following very simple algorithm. The location of the check is equal the length of the file header, plus the times the fixed length of a check record, where is the number of sequentially issued checks before this one. The reusable class CFixedLenRecDoc implements the behavior of a fixed-length record document, separately from the the details about the particular check document, which is implemented in the a CChkBookDoc class derived from CFixedLenRecDoc. Similarly, the reusable class CRowView implements the behavior of a scroll view that rows of fixed heights. The class CCheckView, derived from CRowView, implements the details about the row-based scroll view that are particular to the check book application. * CHKBOOK does not fully support resource-based localization to other languages. In particular, the check amount field assumes dollar and cents, and the written-out check amount ("Nineteen and ***/100ths Dollars") is displayed in English. * CHKBOOK supports a limited number of checks, equal to the 32K devided by the pixel height of text on the display or printer. * CHKBOOK.REG must be edited to include the full path to CHKBOOK.EXE wherever it appears. Once that is done, double clicking on the CHKBOOK.REG icon merges the entries into the registration database.

近期下载者

相关文件


收藏者