Integration of the Standard Template Library and the Microsoft Foundation Class
Скачать
Начало книги
Both the Microsoft Foundation Class (MFC) [1] and the Standard Template Library (STL) [2] provide generalized containers and a facility to iterate over all of the objects within a container. However, the approach taken is different. Within the MFC the iteration mechanism is dependent upon the container, while in the STL there is a common iteration mechanism so that an algorithm can operate on each element of a container without knowledge of the container's type. The MFC containers support persistent storage, which is not a feature of the STL.
This paper presents a small example of a Windows® application using the STL containers in place of the corresponding MFC containers.
The MFC Tutorial [3] includes a simple graphics application known as Scribble. The purpose of Scribble is to let the user draw a set of strokes with the mouse. The result is saved in a file (called a document) which can be opened and updated by adding additional strokes. (There is no method for deleting a stroke.) The user also has the option of specifying the thickness and color of the pen.
- Жанр
- Программирование, программы, базы данных
- Язык
- en
- Размер FB2
- 41,2 КБ
- Добавлена