Using MFC for Windows CE as a Class Library

A class library in C++ is analogous to a function library in C. A C library provides a collection of precompiled functions packaged in a static library (.lib file). You can link the library with your program and call the library functions directly from within your application. You can use a class library the same way you use a C library, but you also get the added benefits that come with using classes, like encapsulation, inheritance, and polymorphism. Not only can you use the library classes directly in your program, you can also subclass them to derive classes that are specifically suited to your application domain.

The Microsoft Foundation Class library encapsulates much of the Windows CE application programming interface (API). By organizing related API functions into logical, well-defined classes, MFC for Windows CE makes it easier for C++ developers to take an object-oriented approach to Windows CE programming.

There are many programming elements that are common to nearly every Windows CE application, so it makes sense to encapsulate the behavior and properties of those elements into reusable classes. Each independent software vendor could write their own Windows CE class library from scratch, but it would take a lot of time, and many iterations of the development cycle, to develop solid, reliable, reusable classes that integrate properly with one another. By providing a standard Windows CE class library, Microsoft not only saves you a significant investment in time and resources, it also ensures that your applications conform to certain behavioral standards that users have come to expect from all Windows applications.