WRITING C++ APPLICATIONS
You have tremendous flexibility in the types of applications and program components that you
can develop with Visual C++ 2010. As noted earlier in this chapter, you have two basic options
for Windows applications: You can write code that executes with the CLR, and you can also
write code that compiles directly to machine code and thus executes natively. For window - based
applications targeting the CLR, you use Windows Forms as the base for the GUI provided by the
.NET Framework libraries. Using Windows Forms enables rapid GUI development because you
assemble the GUI graphically from standard components and have the code generated completely
automatically. You then just need to customize the code that has been generated to provide the
functionality that you require.
For natively executing code, you have several ways to go. One possibility is to use the Microsoft
Foundation Classes (MFC) for programming the graphical user interface for your Windows
application. The MFC encapsulates the Windows operating system Application Programming
Interface (API) for GUI creation and control and greatly eases the process of program development.
The Windows API originated long before the C++ language arrived on the scene, so it has none of
the object - oriented characteristics that would be expected if it were written today; however, you are
not obliged to use the MFC. If you want the ultimate in performance, you can write your C++ code
to access the Windows API directly.