Microsoft Foundation Class Library

MFC is a Windows class library and a complete, object-oriented application framework. MFC for Windows CE includes additional classes unique to Windows CE, such as the command bar control. Though you can write your own Windows CE class libraries, you will find that using the ones provided in MFC saves you time and effort. By organizing related and reusable Windows CE functions into logical classes, MFC encapsulates much of the Windows CE API.

As mentioned, MFC is an object-oriented application framework. An application framework provides both a structural foundation and a set of fundamental components that you can use to expand on the structure and adapt to different purposes. An example of this is the MFC message mapping architecture. In non-MFC applications, the window procedure is a large switch statement that determines what kind of message the window has received. The switch then processes the message appropriately. The MFC framework manages messages more efficiently than this by providing a message pump for every derived class. The class uses message maps, rather than switch statements, to route messages to the appropriate message handler function. A message map is a simple set of macros defined in the MFC library. If you are using the Windows CE MFC Class Wizard, the Wizard inserts the macros into your code for you when you select the messages you want your class to handle.