Relationship to the C-Language API

The single characteristic that sets the Microsoft Foundation Class Library apart from other class libraries for Windows is the very close mapping to the Windows API written in the C language. Further, you can generally mix calls to the class library freely with direct calls to the Windows API. This direct access does not, however, imply that the classes are a complete replacement for that API. Developers must still occasionally make direct calls to some Windows functions — SetCursor and GetSystemMetrics, for example. A Windows function is wrapped by a class member function only when there is a clear advantage to doing so.

Because you sometimes need to make native Windows function calls, you should have access to the C-language Windows API documentation. This documentation is included with Microsoft Visual C++. Two useful books are Advanced Windows, by Jeffrey Richter, and Programming Windows 95, by Charles Petzold. Both are published by Microsoft Press®. Many of those books’ examples can be easily converted to the Microsoft Foundation classes. For examples and additional information about programming with the Microsoft Foundation Class Library, see Inside Visual C++ by David J. Kruglinski, also published by Microsoft Press.

Note   For an overview of how the Microsoft Foundation Class Library framework operates, see Using the Classes to Write Applications for Windows in Visual C++ Programmer's Guide. The overview material is no longer located in the Class Library Reference.