TBmpMenu - A Bitmap Menu Class

Written by: Dieter Windau
Last updated: 15 August 1998

Download Project

TBmpMenu is a freeware OWL class that shows bitmaps on the left side of menus like MS Office 97.

Portions of code are based on MFC class CMenuSpawn written by Iuri Apollonio and BCMenu written by Brent Corkum. Very special thanks.

Basically, menus with bitmaps was created to let the user see visually the correspondence of a menu item and a toolbar button, so that he can learn easily the meanings of sometime strange button drawing.

So I wrote the TBmpMenu class, which takes care with some help from TDecoratedFrame (for SDI applications) or TDecoratedMDIFrame (for MDI applications) of menu remapping and drawing.

Some of the features of TBmpMenu are:

NOTE: TBmpMenu use the Win32 API and can't work with Windows 3.11

The default size of the loaded bitmaps are 19 x 18 pixel (Microsoft style). If you use 20 x 20 pixel (default Borland size), change the constants in the source. The bitmaps will be shown smaller in the menu. One pixel on the right and bottom side is cut, because this is only gray.

By default all bitmaps in module that correspondent to a menuid will be shown.

Hint: Tooltips are delimited to 50 characters by original OWL. TBmpMenu cut the tooltip, if a tooltip with accelerator key reach this limit.

This package contains the TBmpMenu source and two examples:

Tested with Borland C++ 5.02, OWL 5.02 with Windows NT 4.0 SP3 but I think the class would work with Windows 95 too.

Please send me bug reports, bug fixes, enhancements, requests, etc., and I'll try to keep this in next versions:

EMail: dieter dot windau at usa dot net
Web: http://www.members.aol.com/SoftEngage

Happy coding.

History

1.2 07.08.97

1.1 10.07.98

1.0 17.06.98