📄 vcgfm.htm
字号:
<BR>
<A NAME="E68E11"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>How This Book Is Organized</B></FONT></CENTER></H3>
<BR>
<P>This book is divided into six parts that contain 24 chapters. Each part deals with related database application design subjects. The parts are ordered in a way that parallels a typical database application development program. The contents of each part and chapter are described in the sections that follow.
<BR>
<BR>
<A NAME="E69E4"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Part I</B></FONT></CENTER></H4>
<BR>
<P>Part I, "Visual C++ Data Access," introduces you to Visual C++'s capabilities as a Windows database application development environment. Chapter 1, "Positioning Visual C++ in the Desktop Database Market," analyzes the features that Visual C++ offers database developers and shows how the language fits into Microsoft's strategy to dominate the desktop and client-server database development markets. Chapter 2, "Understanding MFC's ODBC Database Classes," provides a detailed description of how you create and manipulate Visual C++ MFC classes and collections using Access .MDB databases. Chapter 3, "Using Visual C++ Data Access Functions," covers the ODBC API-level SQL...() functions and presents some functions that use the ODBC API and that can be called from both C and C++ programs.
<BR>
<BR>
<A NAME="E69E5"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Part II</B></FONT></CENTER></H4>
<BR>
<P>Part II, "Database and Query Design Concepts," deals with relational database design and shows you how to use SQL to create SELECT and action queries that employ the Access database engine and the ODBC API to process the queries. Chapter 4, "Optimizing the Design of Relational Databases," shows you how to normalize data in order to eliminate data redundancy in your application. Chapter 5, "Learning Structured Query Language," discusses ANSI SQL-89 and SQL-92 and tells how Access SQL differs from the "standard" SQL used by client-server and mainframe databases. Chapter 6, "The Microsoft Jet Database Engine," provides insight on the use of the Jet ODBC drivers with xBase, Paradox, and Btrieve tables. It also introduces you to Microsoft's Data Access Objects (DAO), a technology newly incorporated into Visual C++ 4.0. Chapter 7, "Using the Open Database Connectivity API," shows how Visual C++ applications interface with ODBC drivers. Chapter 8, "Running Crosstab and Action Queries," advances beyond simple SQL SELECT queries and shows you how to write queries that include TRANSFORM, PIVOT, INTO, and other less commonly used SQL reserved words that modify the data in your tables.
<BR>
<BR>
<A NAME="E69E6"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Part III</B></FONT></CENTER></H4>
<BR>
<P>Part III, "An Introduction to Database Front-End Design," is devoted to creating commercial-quality decision-support front ends for databases. Chapter 9, "Designing a Decision-Support Application," describes the principles of converting raw data into easily comprehensible information that can be displayed on Visual C++ forms. Chapter 10, "Creating Your Own Data Access Controls," shows you how to take advantage of OLE Custom Controls. Chapter 11, "Using the New Win32 Common Controls," gives examples of using Visual C++ with the new Win32 Common Controls in programs that will work in both Windows 95 and Windows NT. Chapter 12, "Printing Reports with Report Generators," shows you how to design reports and how to seamlessly integrate report generation with your database applications.
<BR>
<BR>
<A NAME="E69E7"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Part IV</B></FONT></CENTER></H4>
<BR>
<P>Part IV, "Advanced Programming with Visual C++," takes you deeper into the realm of commercial database application development. Chapter 13, "Understanding MFC's DAO Classes," shows you the new MFC 4 implementation of the Data Access Object interface to the Microsoft Jet database engine, providing a reference to the DAO classes. Chapter 14, "Using MFC's DAO Classes," presents a practical tutorial dealing with the DAO classes. Chapter 15, "Designing Online Transaction-Processing Applications," describes how to design forms for heads-down, high-speed data entry and how to use Visual C++'s transaction-processing reserved words to speed bulk updates to tables. Chapter 16, "Creating OLE Controls with Visual C++ 4," explains how to develop practical OLE controls. Chapter 17, "Using OLE Controls and Automation with Visual C++ Applications," describes how to add OLE controls to your applications using Visual C++ 4. Part IV concludes with Chapter 18, "Translating Visual Basic for Applications Code to Visual C++," for Access developers who are porting Access applications to Visual C++.
<BR>
<BR>
<A NAME="E69E8"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Part V</B></FONT></CENTER></H4>
<BR>
<P>Up until Part V, "Multiuser Database Applications," this book is devoted to self-contained applications designed for a single user. Part V provides the background and examples you need to add networking and client-server database capabilities to your Visual C++ database applications. Examples employ Windows 95, Windows NT Server 3.51, and SQL Server 6 for Windows NT. Chapter 19, "Running Visual C++ Database Applications on a Network," describes how to use peer-to-peer and network servers to share databases among members of a workgroup or throughout an entire organization. Chapter 20, "Creating Front Ends for Client-Server Databases," describes how to use the ODBC API to set up and connect to client-server and mainframe data sources with your Visual C++ applications. Decision-support and online transaction processing examples that connect Microsoft SQL Server for Windows NT are included. Chapter 21, "Interacting with Microsoft Mail, MAPI, and TAPI," details the use of the MAPI custom control, the Schedule+ Access Library (SAL), and TAPI. Examples of using Microsoft's Electronic Forms Designer (EFD) to create mail-enabled Visual C++ applications are provided as well. Chapter 21 also gives you a brief glimpse of what you can expect when you begin to develop applications for Microsoft Exchange.
<BR>
<BR>
<A NAME="E69E9"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Part VI</B></FONT></CENTER></H4>
<BR>
<P>Part VI, "Distributing Production Database Applications," shows you that no production database application is complete without full documentation and an online help system for users. Chapter 22, "Documenting Your Database Applications," shows you how to use Visual C++'s database object collections to create a data dictionary in the form of a text file that you can import into other applications, such as Word for Windows 7 or Excel 7. Chapter 23, "Creating Help Files for Database Applications," describes how to use Word for Windows and commercial WinHelp assistants, such as Doc-To-Help and RoboHelp, to speed the addition of context-sensitive help to your Visual C++ applications. Chapter 24, "Creating Distribution Disks for Visual C++ Applications," shows you how to create a professional installation application that uses either the Microsoft Setup application for Visual C++ or other mainstream Windows setup applications.
<BR>
<BR>
<A NAME="E69E10"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Appendixes</B></FONT></CENTER></H4>
<BR>
<P>The appendixes provide useful reference data. Appendix A, "Resources for Developing Visual C++ Database Applications," lists add-in products that offer new features to your database applications. It also lists publishers of periodicals devoted to Visual C++ and databases in general. Suppliers and publishers are categorized by subject, and entries include addresses, telephone numbers, and fax numbers, as well as brief descriptions of the products listed. Appendix B, "Naming and Formatting Conventions for Visual C++ Objects and Variables," describes the prefix tags used in this book to identify the object or data type of variables. These naming conventions are based on a slightly modified form of Hungarian Notation that is commonly used in C and C++ programming. This notation was invented by Charles Simonyi, who at one time worked on the development of Access 1.0 at Microsoft. Appendix C, "Using the CD-ROM," describes the files included on the CD that comes with this book.
<BR>
<BR>
<A NAME="E68E12"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Conventions Used in This Book</B></FONT></CENTER></H3>
<BR>
<P>This book uses several typesetting styles to distinguish between explanatory material, the entries you make in Windows dialog boxes, components of initialization (.INI) files, and the code you enter in Visual C++'s code editing window. The sections that follow describe the typographic conventions used in this book.
<BR>
<BR>
<A NAME="E69E11"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Key Combinations and Menu Options</B></FONT></CENTER></H4>
<BR>
<P>Accelerator key combinations (Alt-<I>key</I>) and shortcut key combinations (Ctrl-<I>key</I>) that you use to substitute for mouse operations are designated by joining the key with a hyphen (-). Ctrl-C, for example, is the shortcut key for copying a selection to the Windows clipboard. Alt-H is a common accelerator key combination that takes the place of clicking the Help button in dialog boxes. Some applications, such as Microsoft Word 6, use multiple-key shortcuts, such as Ctrl-Shift-<I>key,</I> to activate macros.
<BR>
<P>Menu options are separated by a vertical bar. For example, "File | Open" means "Choose the File menu and select the Open option."
<BR>
<BR>
<A NAME="E69E12"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Visual C++ Code, SQL Statements, and Source Code in Other Languages</B></FONT></CENTER></H4>
<BR>
<P>Visual C++ code, Visual C++ reserved words, keywords (such as the names of collections), SQL statements, and source code fragments in other programming languages appear in monospace type. Reserved words and keywords in ANSI SQL and xBase programming languages appear in uppercase monospace. Here is an example of the formatting of an SQL statement:
<BR>
<PRE>
<FONT COLOR="#000080">SELECT Name, Address, City, Zip_Code FROM Customers WHERE Zip_Code >= 90000</FONT></PRE>
<P>The equivalent of the preceding statement in xBase is formatted as
<BR>
<PRE>
<FONT COLOR="#000080">USE customers LIST name, address, city zip_code WHERE zip_code >= 90000</FONT></PRE>
<P>The code line continuation character [ic:ccc] is used when the length of a code line exceeds the margins of this book. For example:
<BR>
<PRE>
<FONT COLOR="#000080">EXF=3.0;File;&Export Folder...;11;IMPEXP.DLL;0;;Exports folders to a
[ic:ccc]backup file;MSMAIL.HLP;2860</FONT></PRE>
<P>Note that this separator character isn't a valid character when embedded in an SQL statement String variable, nor is it valid in C/C++ source code. Wherever possible, C/C++ code is broken so that the [ic:ccc] character isn't needed. Some listings created by Visual C++'s AppWizard contain lines that are too long to fit on one line of this book. These lines are printed on two lines. When you look at the code in an editor, however, you will see these lines as one long line.
<BR>
<P>Special implementations of SQL that don't conform to ANSI SQL-92 standards, such as the {ts <I>DateVariable</I>} syntax that Microsoft Query uses to indicate the timestamp data type, appear as in the SQL dialog box of the application. The PIVOT and TRANSFORM statements of Access SQL that (unfortunately) weren't included in SQL-92, however, retain uppercase status.
<BR>
<BR>
<A NAME="E69E13"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Entries in Initialization and Registration Database Files</B></FONT></CENTER></H4>
<BR>
<P>Entries in Windows, Visual C++, and Microsoft Access 2 initialization (.INI) files appear in monospace type. Sections of .INI files are identified by square brackets surrounding the section identifier, as in
<BR>
<PRE>
<FONT COLOR="#000080">[Options]
SystemDB=c:\vbapps\system.mda</FONT></PRE>
<P>Entries that you make in Windows 3.1+'s registration database using the registration database editor application, REGEDIT.EXE, in verbose mode also appear in monospace to preserve indentation that indicates the level of the entry in the tree (file-directory-like) structure of registration database entries. The full path to HKEY_CLASSES_ROOT and other entries in the Registry of Windows 95 and Windows NT is provided unless otherwise indicated in the accompanying text.
<BR>
<BR>
<A NAME="E69E14"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Visual C++ Code Examples and Code Fragments</B></FONT></CENTER></H4>
<BR>
<P>As mentioned earlier, all examples of Visual C++ code, as well as code examples, appear in monospace. Monospace type also is used for code fragments. Styles and weights are applied to code examples and fragments according to the following rules:
<BR>
<UL>
<LI>Names of symbolic constants, including the three constants TRUE, FALSE, and NULL, appear in uppercase.
<BR>
<BR>
<LI>Additions to Visual C++ AppWizard-produced programs typically appear in <B>bold</B> <B>monospace</B>. This lets you see what has been added to create the application's functionality.
<BR>
<BR>
<LI>Replaceable variable names, arguments, and parameters, also known as <I>placeholders,</I> appear in <I>italic</I><I> </I><I>monospace</I>. Data type identification tag prefixes that identify the data type of variables of Visual C++'s fundamental data types and the type of object for variables of object data types don't appear in italic, as in int<B> </B><I>nObjectVar</I>.
<BR>
<BR>
<LI>French braces ({}) indicate that you must select one of the optional elements separated by the pipe character (|) and enclosed in the braces. This doesn't apply to the unusual employment of French braces by Microsoft Query in SQL statements.
<BR>
<BR>
<LI>An ellipsis (...) indicates that the remaining or intervening code required to complete a statement or code structure is assumed and doesn't appear in the example.
<BR>
<BR>
</UL>
<BR>
<A NAME="E69E15"></A>
<H4 ALIGN=CENTER>
<CENTER>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -