?? fm.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function popUp(pPage) {
popUpWin = window.open('','popWin','resizable=yes,scrollbars=no,width=525,height=394');
figDoc= popUpWin.document;
zhtm= '<HTML><HEAD><TITLE>' + pPage + '</TITLE>';
zhtm += '<link rel="stylesheet" href="/includes/stylesheets/ebooks.css"></head>';
zhtm += '<BODY bgcolor="#FFFFFF">';
zhtm += '<IMG SRC="' + pPage + '">';
zhtm += '<P><B>' + pPage + '</B>';
zhtm += '</BODY></HTML>';
figDoc.write(zhtm);
figDoc.close();
popUpWin.focus();
}
//-->
</SCRIPT>
<link rel="stylesheet" href="/includes/stylesheets/ebooks.css">
<TITLE>Special Edition Using Visual C++ 6 -- Introduction</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF">
<CENTER>
<H1><IMG SRC="../button/que.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM" BORDER="0"></H1>
</CENTER>
<CENTER>
<P><A HREF="../ch01/ch01.htm"><IMG SRC="../button/next.gif" WIDTH="128" HEIGHT="28"
ALIGN="BOTTOM" ALT="Next chapter" BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../button/contents.gif"
WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A>
<HR>
</CENTER>
<CENTER>
<H1></H1>
</CENTER>
<H1></H1>
<CENTER>
<H1>Introduction<A HREF="#HeadingA"></A></H1>
</CENTER>
<UL>
<LI><A HREF="#HeadingA">About the Author</A>
<LI><A HREF="#HeadingB">Dedication</A>
<LI><A HREF="#HeadingC">Acknowledgments</A>
<LI><A HREF="#Heading1">Who Should Read This Book?</A>
<LI><A HREF="#Heading2">Before You Start Reading</A>
<LI><A HREF="#Heading3">What This Book Covers</A>
<UL>
<LI><A HREF="#Heading4">Dialogs and Controls</A>
<LI><A HREF="#Heading5">Messages and Commands</A>
<LI><A HREF="#Heading6">The View/Document Paradigm</A>
<LI><A HREF="#Heading7">Drawing Onscreen</A>
<LI><A HREF="#Heading8">Printing on Paper</A>
<LI><A HREF="#Heading9">Persistence and File I/O</A>
<LI><A HREF="#Heading10">ActiveX Programming</A>
<LI><A HREF="#Heading11">The Internet</A>
<LI><A HREF="#Heading12">Database Access</A>
<LI><A HREF="#Heading13">Advanced Material</A>
</UL>
<LI><A HREF="#Heading14">Conventions Used in This Book</A>
<LI><A HREF="#Heading15">Time to Get Started</A>
</UL>
<P>
<HR SIZE="4">
<H2><A NAME="HeadingA"></A>About the Author</H2>
<P><B>Kate Gregory</B> is a founding partner of Gregory Consulting Limited (<B>www.gregcons.com</B>),
which has been providing consulting and development services throughout North America
since 1986. Her experience with C++ stretches back to before Visual C++ existed--she
enthusiastically converted upon seeing the first release. Gregory Consulting develops
software and Web sites and specializes in combining software development with Web
site development to create active sites. They build quality custom and off-the-shelf
software components for Web pages and other applications.</P>
<P>
<H2><A NAME="HeadingB"></A>Dedication</H2>
<P><I>To my children, Beth and Kevin, who keep me connected to the world away from
the keyboard, and remind me every day how good it feels to learn new things.</I></P>
<P>
<H2><A NAME="HeadingC"></A>Acknowledgments</H2>
<P>Writng a book is hard, hard work. What makes it possible is the support I get
from those around me. First, as always, my family, Brian, Beth, and Kevin, who know
it's only temporary. Brian does double duty as both supportive husband and world's
best technical editor. This time around I was lucky enough to have Bryan Oliver helping,
shooting figures, testing code, finding bugs, and generally pitching in. Thanks,
Bryan.</P>
<P>There's an army of editors, proofers, indexers, illustrators, and general saints
who turn my Word documents into the book you hold in your hand. Many of the team
members this time have been involved in other Que projects with me, and I know that
I landed the "good ones" for this book. Special mention has to go to Olaf
Meding, who provided a terrific tech edit based on a fast-changing product. Joe Massoni
and Mike Blaszczak at Microsoft have also earned my gratitude during this release
cycle.</P>
<P>While I cheerfully share the credit for the accurate and educational aspects of
this book, the mistakes and omissions I have to claim as mine alone. Please bring
them to my attention so that they can be corrected in subsequent printings and editions.
I am as grateful as ever to readers who have done so in the past, and improved this
book in the process.</P>
<P><B>Introduction</B></P>
<P>Visual C++ is a powerful and complex tool for building 32-bit applications for
Window 95 and Windows NT. These applications are much larger and more complex than
their predecessors for 16-bit Windows or older programs that didn't use a graphical
user interface. Yet, as program size and complexity has increased, programmer effort
has decreased, at least for programmers who are using the right tools.</P>
<P>Visual C++ is one of the right tools. With its code-generating wizards, it can
produce the shell of a working Windows application in seconds. The class library
included with Visual C++, the Microsoft Foundation Classes (MFC), has become the
industry standard for Windows software development in a variety of C++ compilers.
The visual editing tools make layout of menus and dialogs a snap. The time you invest
in learning to use this product will pay for itself on your first Windows programming
project.</P>
<P>
<H2><A NAME="Heading1"></A>Who Should Read This Book?</H2>
<P>This book teaches you how to use Visual C++ to build 32-bit Windows applications,
including database applications, Internet applications, and applications that tap
the power of the ActiveX technology. That's a tall order, and to fit all that in
less than a thousand pages, some things have to go. This book does not teach you
the following:</P>
<UL>
<LI><I>The C++ programming language</I>: You should already be familiar with C++.
Appendix A, "C++ Review and Object-Oriented Concepts," is a review for
those whose C++ skills need a boost.
<P>
<LI><I>How to use Windows applications</I>: You should be a proficient Windows user,
able to resize and move windows, double-click, and recognize familiar toolbar buttons,
for example.
<P>
<LI><I>How to use Visual C++ as a C compiler</I>: If you already work in C, you can
use Visual C++ as your compiler, but new developers should take the plunge into C++.
<P>
<LI><I>Windows programming without MFC</I>: This, too, is okay for those who know
it, but not something to learn now that MFC exists.
<P>
<LI><I>The internals of ActiveX programming</I>: This is referred to in the ActiveX
chapters, which tell you only what you need to know to make it work.
</UL>
<P>You should read this book if you fit one of these categories:</P>
<UL>
<LI>You know some C++ and some Windows programming techniques<B> </B>and are new
to Visual C++. You will learn the product much more quickly than you would if you
just tried writing programs.
<P>
<LI>You've been working with previous versions of Visual C++. Many times users learn
one way to do things and end up overlooking some of the newer productivity features.
<P>
<LI>You've been working with Visual C++ 6 for a while and are beginning to suspect
you're doing things the hard way. Maybe you are.
<P>
<LI>You work in Visual C++ 6 regularly, and you need to add<B> </B>a feature to your
product. For tasks like Help, printing, and threading, you'll find a "hand up"
to get started.
</UL>
<H2><A NAME="Heading2"></A>Before You Start Reading</H2>
<P>You need a copy of Visual C++ 6 and must have it installed. The installation process
is simple and easy to follow, so it's not covered in this book.</P>
<P>Before you buy Visual C++ 6, you need a 32-bit Windows operating system: Windows
95, Windows 98, or Windows NT Server or Workstation. That means your machine must
be reasonably powerful and modern--say, a 486 or better for your processor, at least
16MB of RAM and 500MB of disk space, and a screen that can do 800 * 600 pixel displays
or even finer resolutions. The illustrations in this book were all prepared at a
resolution of 800 * 600 and, as you will see, at times things become a little crowded.
The sample code is all available on the Web, so following along will be simpler if
you also have a modem and access to the Web.</P>
<P>Finally, you need to make a promise to yourself--that you will follow along in
Visual C++ as you read this book, clicking and typing and trying things out. You
don't need to type all the code if you don't want to: It's all on the Web site for
you to look at. However, you should be ready to open the files and look at the code
as you go.</P>
<P>
<H2><A NAME="Heading3"></A>What This Book Covers</H2>
<P>A topic such as Windows programming in Visual C++ covers a lot of ground. This
book contains 28 chapters and 6 reference appendixes (A to F). Be sure to look over
the titles of the appendixes now and turn to them whenever you are unsure how to
do something. They provide valuable references for the following:</P>
<UL>
<LI>Appendix A, "C++ Review and Object-Oriented Concepts," reminds you
of the basics of the C++ language and the principles and benefits of object-oriented
programming.
<P>
<LI>Appendix B, "Windows Programming Review and a Look Inside CWnd," covers
the specifics of Windows programming that are now hidden from you by MFC classes
such as CWnd.
<P>
<LI>Appendix C, "The Visual Studio User Interface, Menus, and Toolbars,"
explains all the menus, toolbars, editing areas on the screens, shortcuts, and so
on, that make up the highly complicated and richly powerful interface between you
and Visual Studio.
<P>
<LI>Appendix D, "Debugging," explains the extra menus, windows, toolbars,
and commands involved in debugging a running application.
<P>
<LI>Appendix E, "MFC Macros and Globals," summarizes the many preprocessor
macros and global variables and functions sprinkled throughout code generated by
the Developer Studio wizards.
<P>
<LI>Appendix F, "Useful Classes," describes the classes used throughout
the book to manipulate dates, strings, and collections of objects.
</UL>
<P>Depending on your background and willingness to poke around in menus and the online
help, you might just skim these appendixes once and never return, or you might fill
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -