23.3. The MFC application framework

The really important MFC classes have to do with providing a Document-View architecture. Some of the most important of these classes are the CWinApp, the CDocument, the CView, and the CDC.

When you’re running a program, there will be one CWinApp object, and this is the program itself. The CWinApp is responsible for things like routing the program messages, organizing the windows, and deciding what order to do things in. Later, when we want to make our programs do things like move images around even when there’s no user input, it will be the CWinApp that does this for us.

In a particular program like Pop, your application is a CPopApp object. CPopApp is a class derived from CWinApp. It’s defined in the Pop.* ...

Get Software Engineering and Computer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.