Some New Tools and Utilities

Chapter 22 - The Microsoft Foundation Class Library: Fundamentals

Visual C++ 6: The Complete Reference
Chris H. Pappas and William H. Murray, III
  Copyright 1998 The McGraw-Hill Companies

Key Features of the MFC Library
Class libraries for Windows are available from other compiler manufacturers, but Microsoft claims several real advantages for its MFC library, including the following:
  An extensive exception-handling design that makes application code less subject to failure. Support for “out of memory” and so on is provided.
  Better diagnostics support through the ability to send information about objects to a file. Also included is the ability to validate member variables.
  Complete support for all Windows functions, controls, messages, GDI (Graphics Device Interface) graphics primitives, menus, and dialog boxes.
  Determination of the type of a data object at run time. This allows for the dynamic manipulation of a field when classes are instantiated.
  Elimination of many switch/case statements that are a source of error. All messages are mapped to member functions within a class. This direct message-to-method mapping is available for all messages.
  Small code with a fast implementation. As mentioned earlier, the MFC library adds only a small amount of object code overhead and executes almost as quickly as conventional C Windows applications.
  Support for the Component Object Model (COM).
  Use of the same naming convention as the conventional Windows API. Thus, the action of a class is immediately recognized by its name.
The experienced Windows programmer will immediately appreciate two of these features: the familiar naming convention and the message-to-method mapping. If you reexamine the source code for the applications developed in Chapter 21, you will see extensive use of the error-prone switch/case statements. Also notice that these applications make extensive use of API function calls. Both groups of problems are eliminated or reduced when you use the MFC.
Professional developers will certainly appreciate Microsoft’s dedication to better diagnostics and the small code overhead imposed by the MFC library. Now, programmers can take advantage of the MFC library without gaining a size penalty on their application’s code.
The bottom line is that the MFC library is the only real ballgame in town! The MFC has become the de facto standard used by the majority of C++ compiler manufacturers.

Books24x7.com, Inc 2000 –  


Visual C++ 6(c) The Complete Reference
Visual Studio 6: The Complete Reference
ISBN: B00007FYGA
EAN: N/A
Year: 1998
Pages: 207

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net