Learn The MFC C Classes - Table Of Contents - 國立臺灣大學

Transcription

To access the contents, click the chapter and section titles.Learn the MFC C ClassesGo!KeywordBriefFullAdvancedSearchSearch Tips(Publisher: Wordware Publishing, Inc.)Author(s): Shirley WodtkeISBN: 1556225121Publication Date: 01/01/97Search this book:Go!Introduction-----------Learn the MFC C ClassesAcknowledgmentChapter 1—Windows and MFCWindows Operating Systems and MFCC Compilers and MFCWindowsUser Inputs to a WindowMessagesMFC and Windows OS InteractionThe Structure of an MFC ApplicationCreating a Main Window Using MFCThe CFrameWnd::Create() FunctionRegistering a New Window ClassResource FilesCustomized Icon and Cursor ResourcesSummaryExerciseChapter 2—Menus and Message MapsAn Example With a Simple MenuMessage Maps

MenusAcceleratorsHandler FunctionsSetting the TimerDisplaying a Message BoxAdding Message Map Entries With Compiler ToolsAn Example That Changes Menus and SubmenusUsing CMenu ObjectsCWnd Functions for MessagesSummaryExerciseChapter 3—Graphics and Text DrawingThe Graphics Device Interface (GDI)The Device ContextGDI ObjectsDevice Context SettingsStock Drawing ObjectsThe CDC ClassThe Device Context ClassesAn Example That Draws Text and ShapesAn Example That Sets the Viewport OriginHow a Screen Repaints ItselfCreating a PenCreating a BrushThe RGB MacroThe Raster Drawing Mode and SetROP2()A Graphics Editor ExampleC Objects for the Rectangle and EllipseThe Graphics Output ProcessDeleting Drawing ObjectsDrawing the Rectangles and EllipsesThe OnPaint() FunctionMaintaining the Update RegionThe Background ColorThe Handy Utility Classes: CRect, CPoint, and CSize

Using a Private Device ContextAn Example With a Private Device ContextSummaryExerciseChapter 4—Fast Drawing and Bitmap GraphicsUsing Exclusive-or and Exclusive-nor for Fast RedrawsDetails of the Exclusive-or (Exclusive-nor) ProcessLimitations of the Exclusive-or (Exclusive-nor) ProcessUsing Backing Store for Fast RedrawsBitmapsUsing a Memory Device ContextThe CDC::BitBlt() FunctionUsing Bitmap Graphics for AnimationThe Message Handler OnCreate()The Message Handler OnTimer()Device Independent Bitmaps (DIBs)PalettesThe System PaletteLoading and Using the System PaletteDisplaying a DIB Using the System PaletteSummaryExerciseChapter 5—Child WindowsA Child WindowThe CWnd::Create()FunctionMessage Maps for Child WindowsUser MessagesA Popup WindowA Fixed Child WindowSummaryChapter 6—Dialogs, Common Dialogs, and ButtonControls

DialogsModal vs. Modeless Dialog BoxesCommon DialogsClass CFileDialogClass CPrintDialogClass CPageSetupDialogClass CFindReplaceDialogClass CFontDialogClass CColorDialogUsing the ChooseColor Common DialogDesigning Dialog BoxesOverview of Common ControlsWindow Styles for Win3.1 Common ControlsButton ControlsStatic ControlsPlacing Controls on the Mainframe WindowMessages To and From Button ControlsMessages From the Button ControlMessages To the Button ControlExample ProgramProgramming the Buttons ExampleGenerating the Main Window’s CodeGenerating the Dialog Box CodeThe Buttons Program ListingDiscussion of the Buttons ProgramSummaryChapter 7—List Box, Combo Box, and Edit Controlsand Data Transfer FunctionsOverview of List Box, Combo Box, and Edit ControlsEdit Control StylesList Box StylesCombo Box StylesOperations and Messages for Win3.1 Common ControlsAn Example ProgramProgramming the UsrInput Example

Generating the Main Window’s CodeGenerating the Dialog Box CodeThe UsrInput Program ListingDiscussion of the UsrInput ProgramData TransferDo Data Exchange FunctionsDialog Data Validation (DDV) FunctionsCString FeaturesString Tables and InternationalizationSummaryChapter 8—Communication Between Parent andChild for Modal and Modeless DialogsThe Modal Dialog ExampleThe MFC Class CCmdUIThe ModalCom Program ListingData TransferModeless Dialog ExampleModeless Dialog CreationUser MessagesModeless Program ListingData UpdatingSpecial Virtual FunctionsSummaryExerciseChapter 9—The Document-View ArchitectureThe Structure of the Four ClassesMessage RoutingAn Example Document-View ProgramThe PreCreateWindow() FunctionCustomizing the Mainframe WindowOverriding the CFrameWnd::PreCreateWindow()FunctionMainframe ResourcesCustomizing the View Window

The OnDraw() FunctionMessage MapsThe Custom Program ListingThe Document TemplateThe RUNTIME CLASS MacroThe CView ClassViews Based on a Dialog TemplateViews Based on a ControlSummaryChapter 10—Document-View Applications WithFiling and PrintingCreating an AppWizard ProjectDesigning the Application’s DataDesigning the User InterfaceThe Application’s MenuPrinting the ViewThe Function OnPrepareDC()Mapping ModesFunctions for PrintingPrint Preview and Print SetupData Persistence—Filing the Document’s DataSerialization and CArchiveThe OnNewDocument() FunctionMultiple Views of the DocumentElipsMin Program with Minimum CodeElipsMin Program ListingDiscussion of the “ElipsMin” ProgramMaking the Dialog Box ModelessDiagnostic CodeSummaryChapter 11—More About Splitter Windows andFilingThe Starter Application

Multiple View ClassesStatic Splitter WindowsCollection ClassesArray CollectionsList CollectionsMap CollectionsDesigning the Document’s DataCoding the Document ClassCByteArray Member FunctionsDesigning the View of the RulesUsing Logical FontsText MetricsCoding the View Class Containing the RulesDesigning the View of the GameDrawing The Tic Tac Toe BoardDrawing the MovesSummaryChapter 12—An MDI ApplicationAn MDI ApplicationClass StructureCharacteristicsCreating New ViewsCreating New DocumentsMultiple MenusKeyboard AcceleratorsThe CFormView ClassCreating the “Form” ProgramThe “Form” Starter ApplicationThe Multiple Document TemplateThe Trace MacroThe Document ClassCode Additions to the Document ClassThe View ClassCode Additions to the View ClassRunning the “Form” Program in Debug Mode

The “FormMin” Program With Minimum Code“FormMin” Program ListingDiscussion of the “FormMin” ProgramSummaryChapter 13—Toolbars and Status BarsThe Bars ExampleCreating the Bars Starter ApplicationDesigning the Document ClassDesigning the View ClassDrawingAdding ScrollingCustomizing the Status BarAdding the Handler FunctionsCustomizing the ToolbarVisual C 4 Toolbar EditingVisual C 1.5 Toolbar EditingUsing Two Document TemplatesAdding a Dynamic Splitter To An MDIAdding a Document TemplateResources for Document TemplatesSummaryExerciseChapter 14—Custom Controls, New CommonControls, and Property SheetsCustom ControlsThe CustCtrl ExampleBuilding the “CustCtrl” ProgramThe New Common ControlsCreating New Common ControlsThe NewCmnCtrls ExampleNew Common Control StylesBuilding the NewCmnCtrls ProgramGetting the AppWizard Starter Application

Add the Menu ItemCreate the Dialog TemplateCreating the Dialog ClassNotification MessagesProperty SheetsThe PropertySheet ExampleCreating a Modal Property SheetBuilding the “PropertySheet” ProgramUsing the Apply ButtonSummaryAppendix AAppendix BAppendix CAppendix DAppendix EAppendix FAppendix GIndexProducts Contact Us About Us Privacy Ad Info HomeUse of this site is subject to certain Terms & Conditions, Copyright 1996-2000 EarthWeb Inc.All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb isprohibited. Read EarthWeb's privacy statement.

To access the contents, click the chapter and section titles.Learn the MFC C ClassesGo!KeywordBriefFullAdvancedSearchSearch Tips(Publisher: Wordware Publishing, Inc.)Author(s): Shirley WodtkeISBN: 1556225121Publication Date: 01/01/97Search this book:Go!Table of Contents-----------IntroductionIt is not necessary to learn the Windows API in order to begin using theMicrosoft Foundation Class (MFC) Library of C classes; you do not evenhave to know more than a few basic C concepts in order to begin. I havebeen teaching extension classes through the University of California, Berkeley,since 1993. My students have ranged from expert to beginning Windowsprogrammers. As an MFC teacher, I had to design a system that addressed the“common denominator” in the class, since so many of my students were putonto MFC projects and expected to “ramp up” in a matter of weeks, despitewhatever their previous experience may have been. With the help of inputfrom my students, I developed my simple one-idea-at-a-time approach to theMFC Library. I start with the most fundamental concept that a student needs toknow and show the student how to master that one concept only. Then, I addthe next concept. When exposed to a steady progression of clear ideas andexercises, my students have been able to truly master the fundamental conceptsof MFC. This approach has worked for them, and I am sure that it will workfor you.I adapted this book from my lengthy course notes, updating it for the newMFC compilers. But I use the same approach and the same examples. All ofthe examples have been student-tested for clarity and effectiveness in gettingeach concept across. All potential misunderstandings and errors have alreadybeen caught by my students and corrected. You can type in what you see andfollow it line by line, because it will run on either Windows NT, Win3.1x, orWin95. Additionally, I have done my best to ensure that no code was“corrupted” during the production of this book and have included, as a backup(and so that you do not need to retype it), two diskettes with the original,typo-free code. My experience as a teacher has taught me that if you show aprogrammer effective, error-free code, the code explains itself; therefore, I

have made sure that the original, tested code that was exposed to the scrutinyof my many students is included with this book.In addition to the examples given in this book, a comprehensive exercise isgiven—a checkers game—which you code and progressively add morefeatures to as you complete subsequent chapters in this book. This checkersgame is discussed in Appendix B as well as in the exercises that are assignedat the end of specific chapters. An example solution for each of theassignments is given on one of the included diskettes.Who Could Benefit from this BookThis book works well for the beginning or expert programmer who wishes tostart programming a Windows application using MFC. A working knowledgeof C is required. Because it is helpful to know some C , Appendix Cillustrates all the C concepts that you need to know for the examples in thisbook. I recommend that you review this appendix before delving into thisbook.If you are a beginner, you will start at the beginning with a simple programthat creates a window. With each additional chapter, you learn how to add newfeatures. Small example programs are used for the first half of the book. Forthese small example programs, you generate all of the code yourself; you donot need to use compiler tools, such as AppWizard, to generate starter code. Inlater chapters, you migrate to using a compiler tool that generates starter codeand learn how to add your application’s code to the starter code.If you already have some familiarity with MFC, this book will help you to fillin “gaps,” such as learning how to code without using a compiler tool togenerate starter code. If you have been coding with the tools, this book willhelp you to understand the “bones” of the code, without the extraneous lines oftool-generated code that can often obscure the logic of a program. Once youknow the bones, you can enjoy a greater understanding and confidence in whatyou can add and delete in order to make the application your own.Compiler and Operating System RequirementsThe emphasis of this book is on how to use the MFC classes. It does notemphasize the compiler tools, although it covers how to use the tools and thendiscusses the code that they generate. MFC is hosted by all major C compilers, any of which can be used with this book. An appendix is devoted toeach C compiler that uses MFC and covers the basics of how to use thatcompiler for this book.Compiler information is relegated to the appendixes so that it does notinterfere with the unfolding of the MFC concepts. I have tunneled down“technical rat-holes” with a single student, trying to troubleshoot specificcompiler problems, to the consternation and annoyance of my other studentswho do not have these problems; there are a number of configurations that hostMFC, and they are all idiosyncratic. Because of this, I focus on thefundamentals that apply to the “common denominator” and cover mostcompiler information in the appendixes.

Your Windows operating system can be Win3.1x, Win95, or NT. Theexamples given in this book are coded such that they work on any of theseoperating systems. An exception to this rule is the code for the toolbar inChapter 13, which differs for MFC 2.5 and for the newer MFC 4.0. Also, thefinal examples of Chapter 14 illustrate new capabilities added with MFC 4.0and can be run only on Win95 and NT operating systems. Again, the code foreach of the examples in this book is on the included diskettes so you can run iton your system.Note: The files on the companion diskettes located at the back of this bookmust be installed on your hard disk. The README file on Disk 1 describesthe companion files and their use. For complete installation instructions, seethe last page of this book.How this Book Is OrganizedThe progression of topics covered in this book starts from the first chapter inwhich you learn how to write an application that creates a simple window andproceeds to the final chapters in which you write a program that is an MDIapplication with multiple documents. This MDI application has the followingfeatures: a customized toolbar with specialized bitmap buttons, a customizedstatus bar, multiple document templates, windows with or without splitter bars,and the ability to store a document to file and print out a document.Each new chapter is a lesson that adds new concepts. The first chapter is alesson on the basics of a window and how to create one. The second chapter isa lesson on menus and message maps, and you learn how to add these newfeatures to the basic window. The third chapter is a lesson on how to drawgraphical images; the fourth covers how to move the graphical images usingbitmaps and fast drawing techniques. The next chapter covers the basics ofchild windows so that you have the fundamental understanding to proceedonto dialog boxes and controls which are child windows. Then, you learn howto include dialog boxes and controls in your applications. At this juncture youhave learned the fundamentals needed for most applications, and you are readyto proceed on to more complex applications.Beginning with Chapter 9, you learn how to use the document-viewarchitecture; you can use a compiler tool to generate starter code or you cancontinue to generate all of your own code. All of the fundamentals that youhave mastered in the first eight chapters will be used as you continue to createapplications using the document-view architecture. You learn to storedocuments to files on your hard drive and to retrieve them from the files, howto print a document, and how to create splitter windows either statically ordynamically. You add toolbars and status bars to your application andcustomize them, and you learn how to customize controls. In the final sectionsof the last chapter, you learn the new common controls and property sheetsintroduced with MFC 4.0When you have completed all of the chapters and the accompanying exercises,you will not only have a greater understanding of MFC, but you will also havecreated a fully functioning checkers game. I strongly urge you to do theexercises that create this game; my students have told me that the actual

completion of this game, more than anything, helped them to feel that theytruly had mastered the MFC Library by understanding the logical “bones.”Table of ContentsProducts Contact Us About Us Privacy Ad Info HomeUse of this site is subject to certain Terms & Conditions, Copyright 1996-2000 EarthWeb Inc.All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb isprohibited. Read EarthWeb's privacy statement.

To access the contents, click the chapter and section titles.Learn the MFC C ClassesGo!KeywordBriefFullAdvancedSearchSearch Tips(Publisher: Wordware Publishing, Inc.)Author(s): Shirley WodtkeISBN: 1556225121Publication Date: 01/01/97Search this book:Go!Table of Contents-----------Learn the MFC C ClassesCompanion Diskette InformationThe code for each of the examples given in the book is on the included disks.In addition to the examples given in the book, a checkers game exercise isgiven; you code the exercise, progressively adding features as you completechapters in the book. An example solution for each of the checker gameassignments is also included. The examples for each chapter are in eachchapter’s directory, named CHAP1 through CHAPTR14. The examplesolutions for the checker game exercises are in the directory namedEXERCISE. Five megabytes of hard disk space is required for thedecompressed files to be stored on your system.For each example, the executable file as well as the source code files requiredfor you to reconstruct your own project are on the included disks. Theexecutable files have been compiled on a 16-bit system, and thus can be run onany of the operating systems—Win3.1, Win95, or NT. The exceptions are thelast two examples of Chapter 14, which have been compiled on a 32-bitsystem; these two examples can only be compiled and run on Win95 or NT.Companion Diskette InstallationThe installation process creates an /MFC directory structure on your hard driveand then copies all necessary companion files. A README file is available onDisk 1 and is also copied to your hard drive. This file describes the companionfiles and their use. Install the files as follows:1. Insert Disk 1 of 2 in your floppy drive and log that drive.2. Type INSTALL A C and press Enter.3. When prompted, remove Disk 1 and insert Disk 2.

4. Type INSTALL A C and press Enter again to install the remainingfiles from Disk 2.When the completion message is displayed, removed Disk 2. All companionfiles are ready for use.Table of ContentsProducts Contact Us About Us Privacy Ad Info HomeUse of this site is subject to certain Terms & Conditions, Copyright 1996-2000 EarthWeb Inc.All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb isprohibited. Read EarthWeb's privacy statement.

To access the contents, click the chapter and section titles.Learn the MFC C ClassesGo!KeywordBriefFullAdvancedSearchSearch Tips(Publisher: Wordware Publishing, Inc.)Author(s): Shirley WodtkeISBN: 1556225121Publication Date: 01/01/97Search this book:Go!Table of Contents-----------AcknowledgementsTo my father, who taught me how to have a sense of humor.To my children, who taught me patience and endurance.And to my students, who taught me how to write this book.Table of ContentsProducts Contact Us About Us Privacy Ad Info HomeUse of this site is subject to certain Terms & Conditions, Copyright 1996-2000 EarthWeb Inc.All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb isprohibited. Read EarthWeb's privacy statement.

To access the contents, click the chapter and section titles.Learn the MFC C ClassesGo!KeywordBriefFullAdvancedSearchSearch Tips(Publisher: Wordware Publishing, Inc.)Author(s): Shirley WodtkeISBN: 1556225121Publication Date: 01/01/97Search this book:Go!Previous Table of Contents Next-----------Chapter 1Windows and MFCThe Microsoft Foundation Class (MFC) Library is a collection of C classes.MFC is used with the Microsoft Windows operating system (Windows OS,also Windows). In this chapter, the Windows OS, its fundamental concepts,such as windows, user inputs, and messages, and its interaction with an MFCapplication are described. The last portion of this chapter presents five MFCprograms that demonstrate the creation of windows with varying styles.The MFC base classes are contained in a C class library developed byMicrosoft, which is now supplied with many C compilers; it is typicallystored in the directory C:\MSVC\MFC. It is provided as a Dynamic LinkLibrary (DLL) so your application has access to the classes in MFC. A DLLconsists of executable functions that are loaded into memory and areindependent from any application. Libraries such as MFC are calledapplication frameworks, because they give the user a framework for anapplication. The MFC classes have been built using the operating system’sApplication Programming Interface (API) functions. The API is the originalWindows OS library of functions, coded in C, that subsequent libraries werebuilt from, such as MFC. MFC provides easier-to-use functionality thatincorporates the API functions. Using the MFC classes means that much of theprogramming has already been done for you, and you need only add specialfeatures to the MFC code to create your application.This book describes the most frequently used portions of the MFC library.Along the way, it describes API functions that are needed for the exampleapplications. To use the MFC framework, your application must be written inC . Applications written in MFC can call (evoke) API functions, if needed.Traditional Windows OS applications, which do not use MFC or any other

framework, use API functions; these applications are usually written in C orPascal. However, MFC provides so much ease of programming that most newapplications are being written in C so that they can directly access the MFClibrary and derive functionality from it. Additionally, MFC has gained suchnotable market acceptance that most C compilers now support it.Windows Operating Systems and MFCMFC is designed to work with all the available Windows OSs. There are threeWindows OSs available in the marketplace today: the relatively new Windows95 (Win95) and Windows NT (NT), and their predecessor of long standing,Windows 3.1x (Win3.1x). MFC applications can be built and run on any ofthese operating systems.An MFC application built on Win3.1x can be run on Win3.1x, Win95, and NT.An MFC application built on Win95 or NT can be run on either Win95 or NT,but not on Win3.1x unless it can be recompiled on Win3.1x. Most exampleapplications in this book can be built on any of the three Windows OSs. Theexamples in Chapters One through Thirteen and the first section coveringcustom controls of Chapter Fourteen can be built on Win3.1x, Win95, or NT.The final sections of Chapter Fourteen contain examples that can be built andrun on Win95 or NT only; these final examples cannot be built or run onWin3.1x.Win3.1x has been in the marketplace for a long time and, as of this writing, isthe most prevalent operating system. MFC versions 1.0 through version 2.5were developed and used with Win3.1x. Win3.1x was designed for thethen-existing hardware at the time of its initial release, and was built to becompatible with computers that have a 16-bit word; the Win3.1x operatingsystem’s design is limited to a 16-bit word. Hence, Win3.1xonly runsapplications compiled on Win3.1x.Win95 and NT are the newer versions of the Windows operating system. MFCversions 3.5x and above are used with NT and Win95. They are designed forlater processors that have features that fully protect applications and theoperating system. Win95 and NT run on computers that have a 32-bit word.They are “forward compatible” and will run 16-bit applications compiled onWin3.1x.Microsoft uses two terms to describe these 32-bit operating systems. Often yousee the programming environment referred to as Win32 rather than NT orWin95, because Win32 is the 32-bit API for the NT and Win95 operatingsystems; it is the part of NT and Win95 that only programmers see.Win95, introduced in 1995, is the most recently developed operating systemand has a new “look and feel” to its interface elements. The controls have a“3-D look” and the windows have slightly different features, which arediscussed later in this chapter. However, the internal aspects of the operatingsystem remain the same as those used in Win3.1x. Programming in Win95 isnot affected by the cosmetic differences of the interface elements, because theAPI functions work identically to their equivalents in Win3.1x.

NT is the superior operating system; it is a high-end operating system,providing networking and multithreading, which means that more than one“thread” of processing is occurring at one time. Older versions of NT will havethe older Win3.1x “look and feel” for their interface elements. Microsoft hasissued a shell, an interface that links to the older NT operating system andprovides cosmetically different displays. This shell can be used with the olderversions of NT to provide the Win95-style interface elements; however, thenewer versions of NT incorporate the Win95-style interface elements.Although NT looks and acts just like Win95, the underlying structure of theenvironment is somewhat different. Despite these underlying differences,Win95 and NT are very similar to use for both users and programmers.Microsoft went to great pains to make NT look and behave as much likeWin95 as possible. The operating systems are so similar that the term“Windows OS” refers to both systems.Previous Table of Contents NextProducts Contact Us About Us Privacy Ad Info HomeUse of this site is subject to certain Terms & Conditions, Copyright 1996-2000 EarthWeb Inc.All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb isprohibited. Read EarthWeb's privacy statement.

To access the contents, click the chapter and section titles.Learn the MFC C ClassesGo!KeywordBriefFullAdvancedSearchSearch Tips(Publisher: Wordware Publishing, Inc.)Author(s): Shirley WodtkeISBN: 1556225121Publication Date: 01/01/97Search this book:Go!Previous Table of Contents Next-----------Win95 and Win3.1x use DOS for disk file services. The NT environmentdiffers from Win95 and Win3.1x in that it does not use the MS-DOS filesystem for file access. NT has its own built-in file functions. This does notaffect MFC programming because the API functions work identically to theirequivalents in Win95 and Win3.1x. NT is basically a rewritten version ofWin95, but NT is not a DOS application like Win95 and Win3.1x. If acomputer is running NT, it can boot directly into NT without loading DOS. NTreplaces both DOS and Win95 with one streamlined package, while itcontinues to support the underlying disk file structure used by these systems,so that disk files can be easily exchanged between the systems.Windows OS allows several programs to run simultaneously. Code fordifferent applications does not execute simultaneously. Instead, the operatingsystem switches execution from one application to another, as needed, so thatthe user feels that all the running applications are responsive. To run multipleapplications simultaneously Windows OS uses permissive task switching,which means that the running application (task) must give its permissionbefore the processor is turned over to another waiting application. When anapplication gains execution in order to perform some action, it must returnexecution to the operating system as soon as it is done. If an application mustdo a lot of processing to perform some action, then the system seems to be“sluggish” to the user, since he cannot switch to another application while theprocessing is being done. Applications that have long computations to performshould therefore be designed to do them in short segments.Win 95 and NT have several advanced features for controlling programexecution that do not exist in Win3.1x. NT will interrupt a running applicationif it attempts to “hog” the entire system, allowing the user to gracefullyterminate the errant program. Win95 and NT have the ability to split theexecution of a program into pieces called threads of execution. A computerwith more than one CPU chip can route different threads of execution todifferent CPUs, so that the computer can do more than one thing at one time.

The MFC classes were designed for compatibility between Win95, Win3.1x,and NT; therefore, the classes do not support the unique programming featuresof NT. However, many advantages, such as the ability to interrupt an errantprogram, are built into NT. Because they are built in, using them requires nospecial effort on the part of the programmer, and most MFC applications canbe created without modifying the MFC classes or needing multithreadedexecution.C Compilers and MFCC compilers that can build MFC applications are: Microsoft, Symantec, andBorland. The MFC examples in this book can be built with any of thesecompilers. Appendices are included that cover the important compiler aspectsto get the reader started. Appendix D covers Microsoft’s Visual C 4.Appendix E covers Microsoft’s Visual C 1.5. Appendix F coversSymantec’s C 7. Appendix G covers Borland’s C 5.The Microsoft compiler, known as Visual C , is the most prevalent of thecompilers that host MFC. Visual C 1.5 is for the Win3.1x operating system.Visual C 4 is for Win32 systems. Each of these compilers provides tools tohelp the programmer through difficult chores. The tools are known asAppStudio, ClassWizard, and AppWizard. These tools are covered, asnecessary, in this book. Where it is necessary to mention the tools in this book,the Visual C 4 version is covered. There are relatively minor visualdifferences between the Visual C 1.5 and 4 versions of the tools. In onecase, in Chapter Thirteen, the differences are sufficiently different that bothversions of the tool are covered. Otherwise, the reader is expected to make thetranslation to his version. The main focus of the examples of this book is theMFC features, not the features of the tools.

Learn the MFC C Classes (Publisher: Wordware Publishing, Inc.) Author(s): Shirley Wodtke ISBN: 1556225121 Publication Date: 01/01/97 Search this book: Introduction Learn the MFC C Classes Acknowledgment Chapter 1—Windows and MFC Windows Operating Systems and MFC C Compilers and MFC Windows User Inputs to a Window Messages MFC and Windows OS Interaction