December 21, 2014
Hot Topics:

MFC Controls for Vista

  • September 4, 2007
  • By Nick Wienholt
  • Send Email »
  • More Articles »

Since the introduction of the .NET Framework in 2002, MFC has not been an area that has seen many new features added or a lot of focus from Microsoft. Much of the slow-down in MFC can be attributed to the lack of a major new release of the Windows operating system during this period, but there was also an undercurrent that native development was dead, and this made any MFC improvements redundant. With the release of Visual Studio 2008 and the thousands of new native APIs in Windows Vista, native development is alive and well, and thankfully MFC has benefited from this native renaissance with a range of new controls and improvements to existing controls that support the new look-and-feel of Vista.

For new MFC applications created with Visual C++ 2008, all MFC controls that are added to a dialog will automatically take advantage of the new Vista controls when the MFC application is executed on Vista or above. In much the same way, taking an application that was developed with an earlier version of Visual C++ and recompiling it with Visual C++ 2008 will result in an executable that will take advantage of Vista common controls when run on Vista. When executed on Windows Server 2003 or earlier, MFC-based applications will gracefully downgrade to the older common controls. The File Save dialog that is produced by taking the Scribble sample application that shipped with Visual C++ 6, re-compiling it with Visual C++ 2008, and running the application on Windows Vista is shown in Figure 1.



Click here for a larger image.

Figure 1: Scribble Compiled with Visual C++ 2008 running on Vista

The same executable will look like Figure 2 when executed on Windows Server 2003.



Click here for a larger image.

Figure 2: Scribble Compiled with Visual C++ 2008 running on Windows Server 2003

For the sake of completeness, Figure 3 shows the same Scribble application compiled using Visual C++ 2005 running on Windows Vista.



Click here for a larger image.

Figure 3: Scribble Compiled with Visual C++ 2005 running on Vista





Page 1 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Rocket Fuel