.NET
  Home arrow .NET arrow The Transformed XML Explorer in MFC
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
.NET

The Transformed XML Explorer in MFC
By: Gabor Bernat
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2009-10-27

    Table of Contents:
  • The Transformed XML Explorer in MFC
  • The Ribbon
  • Creation and Menu
  • The Ribbon Itself

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    The Transformed XML Explorer in MFC


    (Page 1 of 4 )

    A visual upgrade is often welcome. Aside from the aesthetics, it also helps to introduce new features and new ways to complete tasks. Microsoft made such a move with the launch of its Office Suite 12. In this, they launched the ribbon. If you're interested in making your application compatible with the ribbon, keep reading.

    The ribbon is the result of a massive amount of customer research that Microsoft conducted. Over the past few years, the ribbon has managed to redefine how we interpret Office applications -- and to be honest, most of us have become addicted to its context-sensitive toolbar system.

    This article is the second part of a two-part series in which I am looking into how to upgrade/extend your old-school application. The title of the first part is New Features for the Statusbar in MFC and you can find it here on the ASP Free section of the Developer Shed network. In the first part, I showed how to apply the Office style to your application. In this second part, I will show how to add the new tab-based multi-window system and how to add a ribbon to your application.

    I will stick with the XML Explorer source code and continue its improvement and extension. Adding the tab support is one of the simplest tasks. First, you need to make sure that in the Application class on the initialization of the instance, the InitContextMenuManager () method is called. This will create the object that will handle future tasks; I have already done this in the first task.

    Now we just need to tell the application to use the style. The CMDTabInfo is a class through which you can customize how to perform these tasks. Pass it after you build it as an argument as shown below:

    CMDITabInfo tabInfo; // Declare the object

     

    //customize it

    tabInfo.m_bAutoColor = true;

    tabInfo.m_bDocumentMenu = true;

     

    //pass it for the Manager

    EnableMDITabbedGroups (true, tabInfo);

    Now, once you run the application, you can observe it in action:

     

    The table below will explain the other configuration options of the tab system:

    CMDITabInfo Member

    Value options and effects

    m_style

    STYLE_3D -3D style.

    STYLE_3D_ONENOTE - Microsoft OneNote style.

    STYLE_3D_VS2005 - Microsoft Visual Studio 2005 style.

    STYLE_3D_SCROLLED - 3D style with rectangle tab labels.

    STYLE_FLAT_SHARED_HORZ_SCROLL - Flat style with shared horizontal scroll bar.

    STYLE_3D_ROUNDED_SCROLL - 3D style with round tab labels.

    m_bActiveTabCloseButton

    FALSE => Place close button at right of the tab area.

    m_bTabIcons

    TRUE => enable document icons on MDI tabs.

    m_bAutoColor

    Enable or disable the auto color.

    m_bDocumentMenu

    TRUE => Enable document menu at the right edge of the tab area.

    m_bEnableTabSwap

    User can change (or not change) the positions of the tabs by dragging them.

    m_bFlatFrame

    TRUE => give each tab window a flat frame.

    m_bTabCloseButton

    TRUE => each tab displays a close button on the right edge of the tab.

    m_bTabCustomTooltips

    TRUE => tabs display tooltips.

    m_tabLocation

    LOCATION_BOTTOM: the tabs; labels are located at the bottom of the page.

    LOCATION_TOP: the tabs' labels are located at the top of the page.

    m_nTabBorderSize

    Specifies the border size, in pixels, of each tab window.

    More .NET Articles
    More By Gabor Bernat


     

    .NET ARTICLES

    - Introducing .NET
    - Building Business Objects for an Application
    - Methods for an Application`s Business Logic ...
    - Properties of an Application`s Business Logi...
    - Classes and Properties in an Application`s B...
    - Organizing Code for the Business Logic Layer...
    - Building the Business Logic Layer
    - Completing a Business Layer with Windows Wor...
    - Building Applications with Windows Workflow ...
    - Building the Data and Business Layers Using ...
    - The Transformed XML Explorer in MFC
    - List Control and Property Grid with the MFC ...
    - Font, Shell and Masked Edit Controls for MFC
    - Color, Link and Image Editor Controls for M...
    - New Controls for MFC





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 12 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek