This documentation is archived and is not being maintained.

Key MFC Programming Areas

What MFC Cannot Do for You

As a general programming framework, MFC cannot anticipate every programmer's every need. For example, MFC makes it easy to build the interface for a spreadsheet application, but you must provide all the important display and computation logic.

Note   MFC is not a general function library, like the C run-time library. You cannot call MFC class member functions in an otherwise non-MFC context. From within MFC, you can still call Win32 API functions directly, particularly those that MFC does not choose to encapsulate. But most MFC functions are members of a class, and you must have an object of the class before you can call any of its member functions. For related information, see Win32 Programming.

MFC was designed to be a class library for building applications for the Windows operating system. The goal and design of MFC targets the traditional desktop productivity applications used every day. Because people are so productive with MFC, it is tempting to try and use it for application types not intended to be built with MFC. One such application type is a Windows service. Although it is possible to build a Windows service using pieces of MFC, you will need to be very careful about which pieces you use. The Microsoft Knowledge Base has some information on problems you may run into; however, there are many more that are not documented. Microsoft does not support using MFC to build Windows services.

What MFC Can Do for You

Despite its generality, MFC does support you in many specialized ways:

Support For See
OLE visual editing OLE
Automation Automation
ActiveX Controls MFC ActiveX Controls
Internet programming Overview: Internet
Windows Common Controls Controls
DAO Database Programming Data Access Objects (DAO)
ODBC Database Programming Open Database Connectivity (ODBC)
Multithreaded Programming Multithreading
Network Programming Windows Sockets
Portability Porting Your Program

See Also

MFC Overview

Show: