|
|
1.1 root 1: =======================================================================
2: MICROSOFT (R) FOUNDATION CLASSES
3: =======================================================================
4:
5: ***********************************************************************
6: *** for Microsoft Windows (R) NT (tm) ***
7: ***********************************************************************
8:
9: -----------------------------------------------------------------------
10:
11: This subdirectory contains the source code and example code for
12: the Microsoft Foundation Class (MFC) C++ library. The MFC library is
13: a C++ Application Framework designed primarily for use in developing
14: applications for Microsoft Windows. The MFC library is used in
15: conjunction with the tools provided with the NT beta release.
16:
17: The MFC library consists of two groups of classes. One set is
18: designed for use with Microsoft Windows and includes classes
19: tailored for GUI application programming, such as classes for
20: windows, dialogs, controls, and menus. The other classes
21: are a set of lower level, non-graphical, general purpose classes
22: designed to make it easier to write the part of your application
23: that is independent of the user interface, and includes classes
24: supporting collections, files, memory management, and
25: runtime support. The Windows classes take advantage of the
26: features provided by these general purpose classes.
27:
28: The MFC library is designed to be efficient in both space
29: and time. There is a minimal execution time overhead, and
30: the entire library, all 60 classes, is under 39K of executable code.
31:
32: A complete introduction to the MFC library can be found in the
33: Overview section of the "Class Reference" book.
34:
35:
36: Windows Classes
37: ---------------
38: Microsoft Windows and C++ are "object-oriented" and the MFC
39: library exploits the Windows operating environment. The Windows
40: C++ classes offer the following features:
41:
42: o Robust Application Framework for Windows
43: o Tight coupling to the Windows API
44: o Significant reduction in API "surface area"
45: o Complete classes for nearly all Windows objects
46: o Efficient processing of Windows messages with message maps
47: o Customizable window classes using C++ inheritance
48: o Utility classes to make Windows programming easier
49:
50: The Windows classes can be used in conjunction with all the standard
51: Windows APIs and can easily incorporate existing Windows code. In
52: addition, the MFC Windows classes provide a seamless migration to
1.1.1.3 ! root 53: the 32-bit Windows API.
1.1 root 54:
55:
56: General Purpose Classes
57: -----------------------
58: The general purpose classes are useful both with and without Windows.
59: If you are writing a program that does not use Windows, you can
60: still take advantage of the MFC library for your application's
61: user interface independent code. All of the features are optional
62: and will incur no runtime overhead if you choose not to use them. The
63: general purpose C++ classes include the following features:
64:
65: o Common base class for many classes
66: o Runtime type and metaclass support
67: o Persistent objects
68: o Collection classes based on ANSI C++ template syntax
69: o String class
70: o Time and Date classes
71: o File classes
72: o Exception handling based on ANSI C++ syntax
73: o Diagnostic and debugging support
74:
75:
76: Support for Windows 3.1 features
77: --------------------------------
78: The Microsoft Foundation classes provide support for the
79: enhancements provided in Windows version 3.1. The following
80: features are described in technical notes in the
1.1.1.2 root 81: \MSTOOLS\MFC\DOC directory and demonstrated in sample programs in
82: \MSTOOLS\MFC\SAMPLES. These API functions are documented only in
1.1 root 83: the Help system. The following list describes the enhancements
84: that can be used to develop applications for both Windows 3.0
85: and Windows 3.1.
86:
87: o The development and use of custom controls is supported. In
88: addition, owner draw controls and bitmap buttons are provided.
89: See TN014.TXT and the sample application CTRLTEST.
90:
91: o Common dialog operations are now supported with easily
92: customized classes including CFileDialog (for both File Open
93: and File Save As), CFindReplaceDialog (to implement modeless
94: find and replace), CColorDialog (for color selection),
95: CPrintDialog (for both print setup and print), and
96: CFontDialog (for font selection). These new dialogs are
97: described in TN013.TXT.
98:
99: o Dialog boxes now feature a gray background which is easily
100: customized.
101:
102: o OLE servers now register themselves at startup so that
103: users do not need to use REGEDIT.EXE.
104:
105: o Using multiple inheritance with Microsoft Foundation
106: classes is demonstrated in the sample application MINSVRMI,
107: a small OLE server that uses multiple inheritance.
108:
109: o For applications that target Windows 3.1 only, the Microsoft
110: Foundation Class Library supports the most useful new Windows
111: 3.1 API functions and messages.
112:
113:
114: Why use the Microsoft Foundation library instead of C and the SDK?
115: ------------------------------------------------------------------
116: The MFC library has many advantages over using the traditional
117: C techniques in the Microsoft Software Development Kit for Windows.
118: Some of these advantages include:
119:
120: o MFC decreases the API surface area; the SDK is a catalog of
121: hundreds of functions, whereas the MFC library takes advantage
122: of the inheritance and polymorphism supported by C++ to organize
123: the Windows APIs in a logical and manageable manner.
124:
125: o MFC provides a standard Windows application startup; the
126: MFC class CWinApp implements the functionality normally provided
127: in WinMain.
128:
129: o MFC encapsulates Windows behavior; the class structure
130: and data encapsulation supported by C++ safely hides many
131: of the details that programmers need not concern themselves
132: with.
133:
134: o MFC handles many details of Windows programming; gone are
135: the days of registering Window classes or MakeProcInstance.
136:
137: o MFC provides a object-oriented mechanism for routing
138: Windows messages; the message map supported by each window
139: C++ class provides a cleaner and less error prone mechanism for
140: handling the mapping of Windows messages to member functions.
141: Messages, commands, and notifications can be handled in this
142: object-oriented manner.
143:
144: o MFC taps the power of C++. C++ supports many features that
145: make writing programs easier, such as type safety, encapsulation,
146: inheritance, and polymorphism, that when used in conjunction with
147: MFC provides the best technique for writing Windows programs
148: in C++.
149:
150:
151: Usage
152: -----
153: Source code is provided so that you can build the library target
154: that you require. The file SRC\README.TXT contains instructions for
155: building the library.
156:
157: Before using the MFC library in your own code be sure that the
158: MFC\INCLUDE subdirectory is in your INCLUDE environment variable.
159:
160:
161: Subdirectories
162: --------------
163: The MFC subdirectory contains several subdirectories. Nearly every
164: subdirectory contains a README.TXT file that describes the
165: directory's contents. The following subdirectories are present:
166:
167: DOC\ - MFC technical notes describing implementation details.
168: INCLUDE\ - MFC header files.
169: SRC\ - MFC source files and instructions for building a library.
170: LIB\ - MFC libraries in binary form.
171: SAMPLES\ - MFC sample applications.
172:
173:
174: Documentation
175: -------------
1.1.1.3 ! root 176: The NT release of the MFC library ships with both on-line WinHelp and
! 177: QuickHelp documentation only. No MFC printed documentation is available
! 178: with this release, but the printed MFC documentation provided with the
! 179: Microsoft C/C++ 7.0 compiler can be used 'as-is'.
1.1 root 180:
181: If you have any comments or suggestions regarding the Microsoft
182: Foundation Classes, please let Microsoft know through the beta program
183: liaison.
184:
185:
186: NOTE
187: ----
188:
189: The Microsoft Foundation Classes (MFC) library source code is
190: shipped "as is" and is designed for your own use and modification.
191: Microsoft Product Support can only offer limited support regarding
192: the MFC source code because of this benefit.
193:
194: Microsoft grants you a non-exclusive royalty-free right to use and
195: modify the source code contained in any Microsoft Foundation Classes
196: source code file for purposes of creating a software product.
197: However, you may not include this code in source form (or
198: any modified version of it) within any software product.
199:
200: Notwithstanding the Microsoft End User License Agreement, THIS SOURCE
201: CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. YOU AGREE THAT
202: NEITHER MICROSOFT NOR ANYONE ELSE INVOLVED IN CREATING, PRODUCING OR
203: DELIVERING THE SOURCE CODE SHALL BE LIABLE FOR ANY DIRECT, INDIRECT,
204: CONSEQUENTIAL, OR INCIDENTAL DAMAGES RELATING TO THE SOURCE CODE.
205:
206:
207: Windows NT Release Notes:
208: -------------------------
209:
1.1.1.3 ! root 210: -- This release is a strict superset of the Microsoft C/C++ 7.0 release
1.1 root 211: of MFC. Any applications written for the MFC C++ Windows API will
212: need only be recompiled using the 32 bit tools in this release in order
213: to run in full 32 bit mode. For those familiar with MFC, you will
214: note that the sample applications included in this release are
1.1.1.3 ! root 215: largely unchanged from the 16 bit release. This release of MFC can be
! 216: used interchangeably with the Microsoft C/C++ 7.0 release.
1.1 root 217:
1.1.1.2 root 218: SAMPLES ARE NT VERSION BY DEFAULT: The makefiles for the sample
219: applications have been changed to build the NT VERSION BY DEFAULT.
220: If you wish to build a Windows version using these sources, you must
221: define WIN16MFC=1 when building.
222:
1.1 root 223: -- In order to build the MFC sample applications you should have your
224: environment set as follows:
1.1.1.3 ! root 225: set LIB=c:\mstools\lib;c:\mstools\mfc\lib
! 226: set INCLUDE=c:\mstools\h;c:\mstools\mfc\include
1.1 root 227: These may also be set on the NMAKE command lines if you wish. If your
228: installation is on another drive or in another directory, then you
1.1.1.2 root 229: should change c:\mstools accordingly.
1.1 root 230:
231: -- Your PATH must include the Windows SDK Tools and Microsoft C/C++.
232:
1.1.1.2 root 233: -- Online documentation is available via WinHelp (MFC10WH.HLP) and is
234: installed by the SDK setup in MSTOOLS\BIN.
235:
1.1 root 236: -- Do not use the /Zp switch for MFC applications. If you do some system
237: calls may not work (such as COMMDLG).
238:
1.1.1.3 ! root 239: -- The LINK32 linker emits a warning when it does not extract any modules
1.1 root 240: from a .LIB. The MFC sample applications will emit this warning which can
1.1.1.3 ! root 241: be safely ignored.
1.1 root 242:
1.1.1.3 ! root 243: -- The Find Next feature on the MULTIPAD sample does not scroll the window
! 244: vertically.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.