Share via


Changes from MFC Version 2.0 32-Bit Edition

This article discusses changes in version 3.0 of the Microsoft Foundation Class Library for users of the 32-bit version of MFC version 2.0 (sometimes called MFC version 2.1), which is part of Visual C++ 1.0 32-Bit Edition. Changes include:

  • Full support for writing multithreaded applications.

    You can use MFC functionality in both the primary thread of execution and in secondary threads.

  • Support for OLE.

    MFC OLE classes make it easier to write OLE servers and containers and to implement Automation (formerly OLE Automation) in your applications. See OLE Topics.

  • Support for data access with Open Database Connectivity (ODBC).

    MFC database classes help you manipulate data in databases for which you have the appropriate 32-bit ODBC driver. See Database Topics (ODBC).

  • Support for MFC packaged in a shared DLL, called AFXDLL.

    To use AFXDLL, a set of DLLs that contains the entire 32-bit Microsoft Foundation Class Library, use “/D_AFXDLL” in your compiler options and one of the “MFC30” DLLs in your linker options.

    Using AFXDLL results in smaller executable files than statically linking the class library with your application. This is particularly useful if you have several applications that run at the same time; they can share the DLL.

    AFXDLL is the default when you create an MFC application with AppWizard.

  • WIN32_LEAN_AND_MEAN.

    To improve build times and reduce the size of your application’s precompiled header, MFC defines the symbol WIN32_LEAN_AND_MEAN. This definition lists a group of less commonly used header files that MFC does not automatically include through including AFXWIN.H.

    To see the list of header files specifically excluded from MFC builds, look at the definition of WIN32_LEAN_AND_MEAN in WINDOWS.H. If you need the definitions provided by any of those files, you must explicitly include the appropriate file yourself.

    WIN32_LEAN_AND_MEAN was not defined in MFC version 2.1, and all of the extra headers were included.

See Also   Changes from MFC Versions 2.0 and 2.5, Multithreading with C++ and MFC, DLL Topics, MFC Library Versions