How to Help Your Business Become an AI Early Adopter
MFC Feature Pack, currently in a beta version, is an extension to the MFC version shipped with Visual Studio 2008. It allows you to build an MFC application with the look and feel specific to Office 2007, Visual Studio, or Internet Explorer. In this article I'll show you how to transform a classic MDI application, enabling the Office 2007 look and feel. The reader is assumed to have basic MFC knowledge.
After completing this tutorial, you should:
- Have a basic understanding of some extended classes (CWinAppEx, CMDIFrameWndEx, and CMDIChildEndEx)
- Have a basic understanding of new concepts, such as ribbon bar, application button, ribbon status bar, and Quick Access Toolbar
- Be able to customize an application bar with command and a ribbon bar with categories, panels, and elements.
During this tutorial, I will use some bitmaps that are added to the probject by Visual Studio when you create an MDI project with the Office 2007 look and feel. The main reason is that you can see that at the end of this tutorial you created an application very similar to the default one generated by Visual Studio.
The MFC Feature Pack beta is available at the Microsoft Download Center.
When you install it, make sure you read and follow the instructions; otherwise, the installation can fail.
- If you installed Visual Studio from a network share, the network share must be accessible.
- If you installed Visual Studio from a DVD, the DVD media must be present in the drive it was installed from.
Visual Studio Changes
Once the feature pack is installed, when you create a new MFC application, the Application Type property page of the wizard is changed.
The changes can be seen on the right side of the page and include:
- Project style: You can select one of MFC standard (the classic style), Windows Explorer, Visual Studio, and Office.
- Visual Style and colors: Allows you to select different themes, such as Office 2007 Blue, Black, Silver, or Aqua.
- Enable visual style switching: If this checkbox is checked, the wizard will create support in the generated application for switching between different styles.
Transforming a Classic MFC Application
I believe the best approach to present classes from the feature pack is to take a classic MFC application and make changes manually.
Create a new MFC application, called Multipad. Set the application type Multiple documents, and make sure the Project style is "MFC Standard". Build and run the application; it should look like this:
After the changes that you will do, it should look like this: