COfficeXpMenu

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.


Usage:

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);
where:
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:
m_OfficeXpMenu.UnInitialize();

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

void CWnd::OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct)
{
  m_OfficeXpMenu.MeasureItem(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] [Support]

© 2008 - Pablo Software Solutions
All rights reserved.