locked
MFC project with WinXP style menus and toolbars? RRS feed

  • Question

  • Hi. I asked this in a previous reply already, but the subject changed, and I wanted more people to see it.

    In VS2005, is it possible to create an MFC application that uses the WinXP sytle menus and toolbars? 

    What I would like is the steps to create a new MFC project that when I build and run it, it displays with the same "look" as a VS2005 forms application.

    I've been directed to use the manifest through which I can make other MFC controls render in their new style (by using version 6 of ComCtl32.dll), but I can't get the menus or the toolbars to display in the WinXP style.

    Can someone point me to the the procedure for doing this?

    Thanks!

    Thursday, December 15, 2005 8:00 PM

Answers

  • For toolbars you need to use TBSTYLE_FLAT, e.g. after creating the toolbar you would do:

    m_wndToolBar.ModifyStyle(0, TBSTYLE_FLAT);

    Menus I'm not sure what you mean by themed menus. It will already give you white menus.   MFC doesn't have any provision for icons on menus or Office XP style menus.  Instead, you could use a class like BCMenu, for example. 

    http://www.codeproject.com/menu/bcmenu.asp

     

    Thursday, December 15, 2005 9:01 PM

All replies

  • For toolbars you need to use TBSTYLE_FLAT, e.g. after creating the toolbar you would do:

    m_wndToolBar.ModifyStyle(0, TBSTYLE_FLAT);

    Menus I'm not sure what you mean by themed menus. It will already give you white menus.   MFC doesn't have any provision for icons on menus or Office XP style menus.  Instead, you could use a class like BCMenu, for example. 

    http://www.codeproject.com/menu/bcmenu.asp

     

    Thursday, December 15, 2005 9:01 PM
  • Hmmm. I did have TBSTYLE_FLAT set. It puts up that same gray toolbar as used in VS1997.

    However, I think you answered my questions. Would it be a true statement then to say that its impossible to make an MFC application look like a VS2005 Windows "form" application (i.e. the "XP" style menus and toolbars)?

    This was my initial question, and as it turned out, some of the MFC controls could be rendered in the newer style, but apparently not the menus or the toolbars.

    Thursday, December 15, 2005 9:14 PM