Phase 3 includes a number of extra steps you can take to integrate your code more tightly with the MFC framework and take advantage of the framework's facilities:
Now that you're working with C++ objects, there's a new syntax to follow.
The MFC framework incorporates several diagnostic mechanisms, including dumps of your objects' contents and easy validation of an object's internal state.
When you move from C to C++, you'll want to start taking advantage of the object-oriented features of the language to build encapsulated data structures with classes.
MFC introduces a document/view architecture: a document object stores your data, and a view object displays the data and interacts with the user. You don't have to use much of this architecture for Phase 1, but later there are advantages to working with it.
If you use the document/view architecture, MFC supplies a protocol for storing and loading files. Serialization makes basic I/O very easy.
MFC view classes let you use the same code (in most cases) to draw either to the display or to a printer (or to a print preview display).
Tip Use the MFC Migration tool to help work through the porting issues in your code. See Using the MFC Migration Tool.
Figure 1 shows the conversion process schematically. In the upper path, which includes steps 1 and 4, you compile your C code with a high warning level and then recompile it as C++, fixing errors until it compiles successfully. In the final step at the lower right, you migrate portions of your new C++ code into a new MFC skeleton application.
Beyond that, there are other things you can do, but just doing this much accomplishes several goals. It:
Tip Before you continue, it might be wise to learn the fundamentals of MFC by trying out the Scribble tutorial. In Visual C++ version 2.0, the tutorial is in Introducing Visual C++. In earlier versions, the tutorial is in the Class Library User's Guide.