O'Reilly logo

Software Engineering and Computer Games by Rudy Rucker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

23.6. Navigating app, doc, and view

We’ve already discussed how MFC uses the Document-View architecture in Chapter 5: Software Design Patterns. This section fills in a little more information about how we can navigate among the app, the doc and the view.

In MFC you can always get there from here. But the pathways are a little oddly marked. Table 23.2 lists the code to use to get a pointer to the classes listed in the top row from inside a method belonging to class in the left column.

The ::AfxGetApp() is a global MFC function, by the way; we write the ‘:: ’ in front of it to remind ourselves that it’s a global function rather than being a method of any particular class.

The access methods in the fine print look kind of unpleasant. In reality, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required