Now let's create an MDI application that doesn't use the document-view architecture.
void CChildView::OnPaint() { CPaintDC dc(this); // device context for painting dc.TextOut(0, 0, "Hello, world!"); // Do not call CWnd::OnPaint() for painting messages }
As in EX23B, this example automatically creates a CChildView class. The main difference between EX23B and EX23C is the fact that in EX23C the CChildView class is created in the CChildFrame::OnCreate function instead of in the CMainFrame class.
In this chapter you've learned how to create three kinds of applications that do not depend on the document-view architecture. Examining how these applications are generated is also a great way to learn how MFC works. We recommend that you compare the generated results to similar applications with document-view architecture support to get a complete picture of how the document-view classes work with the rest of MFC.