SPECIAL OFFERS
Keep up with new releases and promotions. Sign up to hear from us.
Register your product to gain access to bonus material or receive a coupon.
Most MFC introductory guides show you how to generate code with Microsoft's AppWizard and then modify it -- but give you little understanding of how to program in MFC. This book is different: it starts with the MFC fundamentals you need to really know what you're doing -- and also takes you much further than most competitive books. By the time you're introduced to the AppWizard, you'll have the knowledge to take full advantage of it! Start by understanding the fundamentals of object-oriented programming, the essential concepts underlying MFC, the structure of MFC programs, and the Document/View architecture. Master not only MFC's common interface controls, but also more advanced concepts, including building ActiveX controls and database access. Introduction to MFC Programming contains dozens of diagrams and programs -- from snippets to sizable programs designed to demonstrate key software engineering and database access techniques.
Click here for a sample chapter for this book: 0130166294.pdf
I. OBJECT CONCEPTS IN CONSOLE APPLICATIONS.
1. Using MFC Utility Classes in Console Applications.II. HANDCRAFTED MFC WINDOWS PROGRAMS.
4. Event Handling: Keyboard and Mouse Input.III. APPWIZARD APPLICATIONS WITH NO DOCUMENT.
9. The AppWizard and ClassWizard.IV. THE DOCUMENT / VIEW ARCHITECTURE.
14. Using The Document / View Architecture.Appendices.
Appendix A: A Win32 Program.What's On the CD?
The 15 chapters in this book present you with a sequence of MFC topics, sample MFC pro-grams and activities. It is my conviction that if you carefully read the topics, study the programs, and do a reasonable number of the suggested exer-cises (yes, practice is necessary), then in about two months time you will feel comfortable writing win-dows programs in C++.
PrerequisitesSince this book does not cover C++, programming logic, and common algorithms, I assume that you already have a certain minimum level of program-ming experience, and a fairly sound knowledge of C++. Specifically, if you have had a 15-week pro-gramming course using C++ where you have used arrays, structures, and have created a few classes, I think that will constitute an appropriate amount of experience.
One of the wildcard factors in learning C++ windows programming is the extent to which you simply enjoy the activity of programming. If you can sit and concentrate for three, four, or five hours working on a problem, then I think your success can be guaranteed. You definitely cannot dabble in MFC and expect any results.
The Genesis of this BookOver the last four years I have taught windows pro-gramming (both Win32 programming and MFC programming) in a variety of contexts using at least five different textbooks. These books have ranged from 1300-page encyclopedias to 570 pages of App-Wizard- generated code. In each class I would invari-ably have handouts consisting of sample programs and diagrams.
Not content with the available instructional material, I pulled together my "class handouts" dur-ing the winter break of '98-'99, and wrote a 70-page, spiral-bound manual that contained 28 short and simple MFC programsI still like the title: "Getting a Grip on MFC."
The program listings were positioned on the right-hand side pages with accompanying discussion of programs on the preceding left-hand page. Since the page size was 8.5"x11", a good amount of pro-gram code and remarks could be put onto facing pages. This particular layout allowed the reader to gain a perspective on the entire program, and it also let the reader to focus on specific parts of the program.
For my students, this booklet proved to have the right balance of program examples and discussion. I believe that a program illustrating a concept is much better than a page of text that describes a concept.
That booklet was the genesis of this book.
Topic Sequence Is ImportantBeside the many short, easy-to-understand program examples, another major organizational feature of the book is the sequence in which topics are introduced. When a new topic is introduced, you will have been adequately prepared for that topic by the presentation of previous topics. We elaborate on this shortly.
You might think that all books would subscribe to such a presentation sequence. But MFC is such a big subject, deciding where to start and what to cover next is not evident.
Notable Features of this BookWhat are the distinctive features of this book? How does it differ from other MFC books?
Before you see the first MFC windows program in Chapter 4, you will learn about various MFC classes in the familiar "console application" setting.
This way, when you get to Chapter 4, much of the code in the first program there will be familiar to you. Now all you will be expected to do is focus on the one new conceptmessage maps.
By doing you will learn. For that reason, there are more than 90 short, easy-to-understand programs on the accompanying CD. Most of these are described in the text, and were created specifically so you could practice modifying them.
There are many relationships involved in windows programs. This book has many diagrams that will help you picture various relationships and activity.
How to Use This Book in a C++ Course SequenceBefore this past year, I had felt that presenting "MFC programming"in say, a software engineering courseconstituted an interruption to the main flow of the course. In effect, "Let's put a hold on the important stuff we are doing now, because I now want to show you a few things that will make your programs look better."
But I finally realized that MFCas an object-oriented systemcould be incorporated into the course and be used as a tool for teaching object-oriented programming concepts. So here are my suggestions where this book might be used as an important supplement in the common, introductory, two-semester course sequence.
Suppose parts of Chapters 1, 2, and 3 are covered in the first course.
Richard M. Jones
JonesR@WCSUB.CtStateU.edu
JonesJ@csu.cted.net