发信人: mendy.bbs@bbs.nju.edu.cn (孟迪), 信区: cnprogram
标 题: Brief History of MFC
发信站: nju_bbs (Sun Apr 19 13:52:03 1998)
转信站: Lilac!ustcnews!nju_bbs
2m发信人:m TMN (派生类)
2m信 区:m RAD
2m标 题:m A Brief History of MFC
2m发信站:m '3m紫金飞鸿m' (Wed Apr 8 08:18:25 1998) , 5m站内信件m
[返回首页] [分类讨论区] [全部讨论区]
_____________________________________________________________________
A Brief History of MFC
---------------------------------------------------------------------
I constantly see postings from folks confused about what version to use
where,.
etc.. So this history kind of explains where MFC has been and where it's
going. [This is the history as I remember it. If you have any details
that
you can fill in, release dates, inside info, etc.. Let me know!]
To understand the MFC releases, you need to realize that there are 16 and
32-bit releases of MFC. 16-bit releases call Win16 and run on Windows 3.1
and 3.11 (Windows for Workgroups)
The 32-bit releases call Win32 and run on Windows NT and Windows 95 (and
can
run on Windows 3.1 with Win32s, but it still calls Win32)
Skip to section 3.10 for a quick table of releases if you want to skip the
long descriptions of each release.
In each section, the new classes added to MFC are highlighted. It's nearly
impossible to do cool class diagrams in ASCII, so their hierarchy is just
shown by indentation. I've also left CObject out of most of the
hierarchies
for brevity. You can pretty much assume that CObject is a parent of most
of
the classes except things like CString, etc.
3.1. How do I know what version of MFC I'm using?
Check the top of the MFC header file afxver_.h (lives in
mfc\include\afxver_.h). Older versions use afxver.h. In there you will see
a
#define for _MFC_VER.
This is the hex version of the MFC release with this key:
0x0250
|_____________ Point release ( very minor)
|______________ Minor number
|______________ Major number
So in this example, the MFC release is 2.5.0.
3.2. Pre-MFC 1.0
In the beginning, Microsoft created a group called the AFX group (stands
for
(A)pplication (F)ramework(X)). This group probably was created to come out
with an OWL competitor, since Borland C++ was doing pretty well. They came
up with a class library that presented a very high abstraction from the
Windows API, kind of like OWL does.
[Note: The group was actually formed before OWL 1.0 according to
elsbree@msn.com ]
Legend has it that they then went and tried writing applications with it
for
a couple of months and found that it was just too far removed from the
Windows API. They couldn't leverage any knowledge of Windows and most of
these guys were die hard Windows API hackers.
Legend also has it that at this point they scrapped the ENTIRE AFX class
library, and then worked on what would become MFC 1.0... You can still see
remnants of the AFX days, many of the source files have afx prefixes and
lots
of macros in MFC today still have AFX in them.
The AFX group was actually responsible for two things: the MFC library and
the IDE's support for MFC (namely, the resource editor and the wizards).
The
AFX name was dropped in April 1994, and the group's members simply became
part of smaller teams within the Visual C++ group. One of those smaller
teams
is today's MFC team.
I've also heard rumors that MFC was once called the MS Fulcrum Classes.
3.3. MFC 1.0
This release was simultaneously released with Microsoft C/C++ 7.0 in early
1992. It provided a very thin abstraction over the Windows API. This
initial release did not have any of the document view architecture we know
and love today, however it did lay the foundation by introducing CObject,
MFC
persistence via CArchive and many other features still heavily used in MFC
today. This was a 16-bit release released in 03/92.
A 32-bit version of MFC 1.0 was released in July 1993, together with
Windows
NT 3.1 and the final Win32 SDK. The files there are dated 93-07-24. The
Win32 SDK did not include Visual C++ or the MFC 2.x.
MFC 1.0 Introduced These Classes:
* General:
* Cobject
* CWinApp
* Cmenu
* Carchive
* CDumpContext
* CRuntimeClass
* CMemoryState
* CFileStatus
* Cstring
* Ctime
* CTimeSpan
* Cpoint
* Crect
* CSize
* Exceptions:
* Cexception
* CMemoryException
* CNotSupportedException
* CArchiveException
* CFileException
* CResourceException
* File Services:
* CFile
* CStdioFile
* CMemFile
* Collections:
* CByteArray
* CWordArray
* CDWordArray
* CPtrArray
* CObArray
* CStringArray
* CPtrList
* CObList
* CStringList
* CMapWordToPtr
* CMapWordToOb
* CMapPtrToWord
* CMapPtrToPtr
* CMapStringToPtr
* CMapStringToOb
* CMapStringToString
* Graphics:
* CDC
* CClientDC
* CWindowDC
* CPaintDC
* CMetaFileDC
* CGdiObject
* CPen
* CBrush
* CFont
* CBitmap
* CPalette
* CRgn
* Windows Support:
* CWnd
* CFrameWnd
* CMDIChildWnd
* CMDIFrameWnd
* CDialog
* CModalDialog
* CStatic
* CButton
* CEdit
* CListBox
* CComboBox
* CScrollBar
3.4. MFC 2.0
MFC 2.0 was a 16-bit release that shipped with Visual C++ 1.0. It added
the
Document/View framework on top of MFC 1.0 and also added OLE 1.0 classes,
message maps and common dialog classes. This was a 16-bit release released
on 02/93.
MFC 2.0 Introduced These Classes:
* General:
* CCreateContext
* CPrintInfo
* CDataExchange
* CCmdUI
* Exceptions:
* CFileException
* COleException
* Dialogs:
[Note CModalDialog was nuked and functionality moved to CDialog, you can
still see a #define CModalDialog CDialog in the header files]
* CDialog [not introduced here, but revamped to be a base for common dlgs]
* CFileDialog
* CColorDialog
* CFontDialog
* CPrintDialog
* CFindReplaceDialog
* Windows Support:
[Just new derivatives of CButton/CEdit and VBX class.]
* CButton
* CBitmapButton
* CEdit
* CHEdit
* CBEdit
* CVBControl
* Document Architecture:
* CCmdTarget
* CWinApp [Moved in hierarchy, use to be derived from CObject]
* CDocTemplate
* CSingleDocTemplate
* CMultiDocTemplate
* CDocument
* COleDocument
* COleClientDoc
* COleServerDoc
* Views:
* CView
* CScrollView
* CFormView
* CEditView
* Control Bars:
* CControlBar
* CToolBar
* CStatusBar
* CDialogBar
* CSplitterWnd
* OLE 1.0 Classes:
* COleServer
* COleTemplateServer
* CDocItem
* COleClientItem
* COleServerItem
3.5. MFC 2.1
MFC 2.1 shipped with Visual C++ 1.1 for NT, it was basically a Win32 port
of
MFC 2.0. It was a 32-bit release that was released on 08/93.
MFC 2.1 Did NOT Introduce Any New Classes.
3.6. MFC 2.5
MFC 2.5 shipped with Visual C++ 1.5. It introduced the OLE 2 and ODBC
classes. It was the last 'official' 16-bit release. Released in 12/93
MFC 2.5 introduced these classes:
* General: [OLE and DB related]
* CFieldExchange
* COleDataObject
* COleDispatchDriver
* CRectTracker
* Exceptions: [OLE and DB exceptions]
* COleException
* COleDispatchException
* CDBException
* Files: [New OLE File support]
* CFile
* COleStreamfile
* Dialogs: [New OLE Dialogs]
* CDialog
* COleDialog
* COleInsertdialog
* COleChangeIconDialog
* COlePasteSpecialDialog
* COleConvertDialog
* COleBusyDialog
* COleLinksDialog
* COleUpdateDialog
* Windows Support: [Some OLE additions]
* CFrameWnd
* COleIPFrameWnd
* CControlBar
* COleResizeBar
* Document Architecture: [Significant classes added for OLE here.]
* CCmdTarget
* COleObjectFactory
* COleTemplateServer
* COleDataSource
* COleDropSource
* COleDropTarget
* COleMessageFilter
* CDocument
* COleDocument
* COleLinkingDoc
* COleServerDoc
* CDocItem
* COleClientItem
* COleServerItem
* Views: [New view for DB support]
* CView
* CScrollView
* CFormView
* CRecordView
* ODBC/Database Classes:
* CDatabase
* CRecordSet
* CLongBinary
3.6.1. MFC 2.51
A point release to 2.5 (16-bit) that was a bug fix release. Shipped with
MSVC 2.0 in 9/94 with MFC 3.0 (32-bit).
3.6.2. MFC 2.52
A point release to 2.5 (16-bit) that added some of the MFC 3.0 features
such
as property sheets, Winsock and MAPI support. Shipped with MSVC 2.1 in 1/95
with MFC 3.1 (32-bit).
NOTE: This is only available via the MSVC Subscription.
Classes added in 2.52:
* CSocket
* CAsyncSocket
* CSocketFile
* CPropertyPage
* CPropertySheet
* MAPI:
[Note that MAPI support was added to CDocument, no new classes]
* CDocument::OnFileSendMail
* CDocument::OnUpdateFileSendMail
* COleDocument::OnFileSendMail
3.6.3. MFC 2.52b
[Excerpt from the 2.52b rel notes]
Visual C++ 1.52b includes the industry-standard Microsoft Foundation Class
Library (MFC) version 2.52b. Besides classes for OLE and database, this
version includes classes for OLE control development.
Bugs Fixed in Visual C++ 1.52b
Visual C++ 1.52b fixes a number of bugs from Visual C++ 1.5. Of particular
interest to most developers are the following bug fixes:
MFC 2.52b
Error L2025 occurred on CWnd::DoDataExchange. This bug has been corrected.
See Microsoft Knowledge Base article Q120152 for more information.
CArchive::ReadObject sometimes caused an assertion in a CPtrArray object
because CPtrArray can hold a maximum object size of 16K in a large memory
model application. CArchive did not take the memory model into account;
since
CArchive enforced a 32K limit, objects of 32K could be written but an
assertion was generated if CArchive read in more than 16K. This bug has
been
corrected.
There was a memory leak in 16-bit AUX_DATA.
The three pens used in the class CPropertySheet were leaking. See Microsoft
Knowledge Base article Q128604 for more information.
The CArchive buffer pointer could wrap around the end of a segment
unintentionally. This bug has been corrected.
If AfxSockInit failed, applications sometimes produced a General Protection
Fault. This bug has been corrected. See Microsoft Knowledge Base article
Q130653 for more information.
The MAPISendMail dialog did not stay modal. This bug has been corrected.
Source file DLGPROP.CPP had non-near data. This could prevent
applications from being able to run multi-instance. This bug has been
corrected.
3.6.4. MFC 2.52c
This bug-fix release shipped with Visual C++ 4.0 on a separate CDROM.
%%TODO check relnotes for details - is anyone still using this stuff?
3.7. MFC 3.0
MFC 3.0 shipped with Visual C++ 2.0 in 9/94. It introduced docking
toolbars, property sheets and template based collection classes. This was
the first release in the MSVC subscription, it was a 32-bit release.
Classes added in MFC 3.0:
* Tabbed Dialog Support:
* CWnd
* CPropertySheet
* CDialog
* CPropertyPage
3.8. MFC 3.1
MFC 3.1 shipped with Visual C++ 2.1 in 1/95. It introduced MAPI, WinSock
and
Windows Common Controls. The MFC toolbar, status bar, etc.. still live in
MFC. This is the latest release out. It is a 32-bit release.
NOTE: Only available via MSVC subscription.
Classes Added in MFC 3.1:
* MAPI:
[Note that MAPI support was added to CDocument, no new classes]
* CDocument::OnFileSendMail
* CDocument::OnUpdateFileSendMail
* COleDocument::OnFileSendMail
* Windows Common Controls Classes: [All of these are CWnd derived]
* CAnimateCtrl
* CHeaderCtrl
* CHotkeyCtrl
* CImageList
* CListCtrl
* CProgressCtrl
* CSliderCtrl
* CSpinButtonCtrl
* CStatusBarCtrl
* CTabCtrl
* CToolBarCtrl
* CToolTipCtrl
* CTreeCtrl
* WinSock Support:
* CAsyncSocket
* CSocket
3.9. MFC 3.2
MFC 3.2 shipped with Visual C++ 2.2 via the subscription in mid/late July.
It
is a 32-bit release. Includes a 2.52b 16-bit release update.
[here's an excerpt from the release notes]
Support for Windows Common Controls in USRDLLs. In order to use the MFC
Windows Common Control classes you must link in the appropriate static
libraries, as shown in the following table:
Library Target
DAFXCC.LIB Release Version
DAFXCCD.LIB Debug Version
DAFXCCU.LIB Release Unicode Version
DAFXCCUD.LIB Debug Unicode Version
Updated MFC Common Control classes that work with those controls that have
been recently released in Windows NT 3.51 and those that will be available
in
Windows 95 and a future version of Win32s.
Improved common control documentation that is more complete and reflects
changes since the first implementation.
New MFC sample applications
* NOTEPAD + Notepad+ is an enhanced version of Notepad. The
enhancements are mainly from questions our customers
have been asking.
* SAVER Saver is a screen saver written using MFC. It "morphs" the
text "MFC" to the text "C++".
* OLEVIEW The OLEVIEW sample is very similar to the OLE2VIEW.EXE applet
provided in \MSVC20\BIN. The sample illustrates how to implement OLE Object
viewers through custom OLE interfaces. These custom interfaces are
implemented in IVIEWERS.DLL
* BATCH BATCH is an MDI application that lets you compress different
AVI (Audio Video Interleaved) files in different ways.
* WORDPAD WORDPAD illustrates use of the CRichEditCtrl and
CRichEditView
classes, which encapsulate the new Rich Edit common control.
These samples are located in the SAMPLES\MFC directory of your Visual C++
installation.
Updated Win32 SDK Components
With the release of Windows NT 3.51 and the upcoming release of Windows 95,
the Win32 SDK has been updated to support both of these operating systems.
Changes include new header files, new import libraries, and additional
documentation. Visual C++ 2.2 includes the latest header files, import
libraries and Win32 API documentation to support writing Windows NT- and
Windows 95-compatible applications.
3.10. MFC 4.0
MFC 4.0 was released with Visual C++ 4.0 in November of 1995. This is the
latest version of MFC. Microsoft skipped from Visual C++ 2.2 to 4.0 to
synchronize numbers. This caused tons of confusion amongst users, but it
all
seems to be okay now.
Classes added in MFC 4.0:
* CSynchronize
* CMutex
* CEvent
* CMultiLock
* CShellNew - Windows 95
Visual C++ 4.0 also includes the component gallery, STL support and tons
of
new features. Check out the Microsoft WWW for the details.
See FAQ section 11.24 and 13.7 for MFC/VC++ 4.0-specific questions.
NOTE: This is the latest release. 4.1 will probably be out in Feb/March
timeframe.
3.11. Table of MFC releases
Hint, MFC releases are always MSVC release - 1. This is because MFC 1.0
came
out with MS C 7. This was all changed with 4.0 of course, now the formula
is
much easier: MSVC release = MFC release.
MFC Release MSVC Release 16 or 32 Bit Notes
1.0 16 Just thin Windows coverage
2.0 1.0 16 Document/Views added
2.1 1.1 for NT 32 First 32-bit release for NT
2.5 1.5 16 OLE/ODBC, last 16-bit release
2.51 2.0 16 Bug fixes
2.52 2.1 16 Adds prop sheets to 2.5
2.52b 2.2 16 Shipped in July '95, bug fixes
2.5c 4.0 16 Shipped in Nov *95, bug fixes
3.0 2.0 32 Property sheets, dock toolbars
3.1 2.1 32 Winsock/MAPI, Win comctrls
3.2 2.2 32 Shipped in July '95,more comctrls
4.0 4.0 32 Win 95, thread classes, OCX containers
4.1 4.1 32 Not out yet - unknown, hopefully bug fixes!
_________________________
[返回首页] [分类讨论区] [全部讨论区]
--
m;31m※ 来源:·紫金飞鸿 bbs.njupt.edu.cn·[FROM: pc05.info.njupt]m
--
※ 来源:.南大小百合信息交换站 bbs.nju.edu.cn.[FROM: a507yjh.nju.edu]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:203.376毫秒