COfficeXpMenu - A menu class with the Office XP look.
This class converts your menu into a Office XP look-a-like.
It supports bitmaps and requires only a small modification of your existing application.


Add an instance of the class to the window that contains the menu:
COfficeXpMenu m_OfficeXpMenu;

On creation of the window attach the COfficeXpMenu to the window, this replaces the standard menu.

m_OfficeXpMenu.Initialize(this, IDR_MAINFRAME, IDB_TOOLBAR);
IDR_MAINFRAME is the ID of the menu
IDB_TOOLBAR is the ID of the bitmaps to use.

Make sure to remove the menu at destruction of the window:

you also need to route the following messages:
void CWnd::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
  CWnd::OnDrawItem(nIDCtl, lpDrawItemStruct);

void CWnd::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
  CWnd::OnMeasureItem(nIDCtl, lpMeasureItemStruct);

Download demo executable

Download source code
This class is part of the Pablo Software Solutions MFC Extension Package - Controls Edition

[Home] [Products] [Source Code] [Downloads]

© 2015 - Pablo Software Solutions
All rights reserved.