July 25, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Visual C++ 2008 Feature Pack: MFC Enhancements

  • April 7, 2008
  • By Nick Wienholt
  • Send Email »
  • More Articles »

For applications generated with one of the Office 2007 visual styles, the application will contain a drop-down menu on the top of the ribbon control to change among the various Office 2007 color schemes, as shown in Figure 3.

Figure 3: Changing the color for a Office 2007-styled application

Using a ribbon rather than a standard menu is accomplished with the app wizard setting shown in Figure 4. Even if an existing application is being upgraded to support a ribbon-based UI, it is worth generating a new skeleton application just to get a template for the menu bitmaps required to support the ribbon; these are quite detailed. The ribbon control generated by the application wizard can be seen in Figure 3.



Click here for a larger image.

Figure 4: Using a Ribbon Bar in a New MFC Application

In addition to the ribbon control, the MFC Feature Pack supports docking of windows in the same style as Visual Studio. Setting up the docking is relatively easy—to support smart docking, a call to the docking manager is all that is required:

CDockingManager::SetDockingMode(DT_SMART);

With smart docking applied, windows being dragged around the screen will have the same visual clues as to their destination that Visual Studio shows, as shown in Figure 5.



Click here for a larger image.

Figure 5: Smart Docking in Action

The Visual C++ 2008 Feature Pack updates MFC to a level that it has never previously attained, making it possible to quickly and simply develop an application that is visually similar to the lastest version of Microsoft Office. For developers who have struggled for years with owner-drawn controls and poorly-supported third-party toolkits, having such powerful UI functionality being co-developed and supported by the Visual C++ team is great news, and, as evidence of the continuing renaissance of native development in Visual C++, the Feature Pack is a wonderful piece of software.

About the Author

Nick Wienholt is an independent Windows and .NET consultant based in Sydney. He is the author of Maximizing .NET Performance and co-author of A Programmers Introduction to C# 2.0 from Apress, and specialises in system-level software architecture and development, with a particular focus of performance, security, interoperability, and debugging.

Nick is a keen and active participant in the .NET community. He is the co-founder of the Sydney Deep .NET User group and writes technical articles for Australian Developer Journal, ZDNet, Pinnacle Publishing, CodeGuru, MSDN Magazine (Australia and New Zealand Edition) and the Microsoft Developer Network. An archive of Nick's SDNUG presentations, articles, and .NET blog is available at www.dotnetperformance.com.

In recognition of his work in the .NET area, he was awarded the Microsoft Most Valued Professional Award from 2002 through 2007.





Page 2 of 2



Comment and Contribute

 


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

 

 


Sitemap | Contact Us

Rocket Fuel