Summary

December 29, 2009

In this hour you created two applications that perform the same task. One application was created with MFC and the other with the .NET Framework. Both application display a hello message when a push button is clicked. You also learned about the differences between the two application implementations.

Being familiar with how things are implemented in .NET as compared to MFC will help you in making better decisions when the time comes to convert legacy applications to the .NET platform.

Q&A
Q1: Is using Windows Forms the only way to produce a user interface within .NET?

A1: Windows Forms represent windows of all types, not just dialogs. They can be MDI frame windows, pop-up windows, tool windows, and so on. They are the only means within the .NET Framework to represent a Windows-based user interface.

Q2: Is it possible to create a dialog in MFC and use it from a .NET application?

A2: Yes, it is possible to do so. In fact, in Hour 5, “Understanding Managed Versus Unmanaged Code,” there is a lesson on mixing managed (.NET Framework) code with unmanaged (MFC/Win32) code that will help you understand how this is done.

Workshop
The Workshop provides quiz questions to help solidify your understanding of what was covered in this chapter. Answers are provided in Appendix A, “Quiz Answers.”

Quiz
1: What is the base class for a Windows Form?

2: How is a delegate related to an event?

3: How are events different in MFC versus the .NET Framework?

Taken From: SAMS-Tech Yourself MS Visual C++.NET in 24 Hours

Leave a Reply