|
|
![]() |
![]() |
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 NOTE: Actually TBmpMenu class V1.5 is also included in the OWLExt3 package, that you can find in the download section of OWL NExt Home Page. 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 always gray. If you don't like the default Borland bitmaps, you can download a package (08/02/98, 67 KB) with 184 MS-Office style bitmaps. By default all bitmaps in module that correspondent to a menuid will be shown. But you can exclude bitmaps or map a command to another bitmap. This class works with OWL 6.0 patch #5 (and higher I hope). OWL 6.0 include default Borland bitmaps for some commands (e.g. File->New, Edit->Cut). If you don't like this, then you can insert some project defines to exclude the default Borland bitmaps:
Hint: If you have popup menus that reside popup menus, they aren't
remapped correct. The reason for that is the following TBmpMenu function: void
RemapMenu(HMENU hMenu, bool isPopup=false) Hint: Tooltips are delimited to 50 characters by original OWL. TBmpMenu cut the tooltip, if a tooltip with accelerator key reach this limit. Many thanks to Riho Ellermaa, Michael Morgensen, Jürgen Welzenbach, Rob Beckers, Jo Parrello, Mark Hatsell and Yura Bidus for their help in testing and fixing the TBmpMenu classes. The code was tested using Microsoft Visual C++ 6.0 SR2 with OWL6 patch 5 and Borland C++ 5.02 with OWL 5.02. Both under Windows NT 4.0 SP4. Please send me bug reports, bug fixes, enhancements, requests, etc., and I'll try to
keep this in next versions: Happy coding |
Ver | File | Description |
1.7 | ![]() |
Only the source of TBmpMenu classes and this HTML-Document |
- | ![]() |
This package contains the TBmpMenu
soure and two examples. Add an Visual C++ 6 project file. - The MDI sample shows: - how to use the TBmpMenu class in an MDI application - how to get a bitmap popup menu in editor windows - how you can insert a popup menu that reside popup menus. - support for the recent file list - support for accelerators in tooltips and background bitmaps - The SDI sample shows: - how to use the TBmpMenu class in an SDI application |
Ver | Date | Description |
1.7 | 04/24/99 | - Bugfix: Now user defined checkmark and radio dot bitmaps
are mapped to the correct system colors and they use the also the mask color. - More UNICODE support - Make the member MapEntries protected - Some other changes for better C++ design, but I don't change the functionality - Add a actual version of helpfkt files to the project |
1.6 | 04/05/99 | - Now I use TColor for Old3dFaceColor member (same as in
OWLExt3 library). It's is a better design, but with V1.5 code it works not correct. I've fixed the bug - Test with OWL6 #5 and delete the source for older patches than #3 - Some changes with string handling (now it work with VC++ 6 compiler) - Add new functions to get and set the color of pixels that will be mask to the correct system menu color. As example some MFC toolbar bitmaps have a green background color. |
1.5 | 11/23/98 | - Bugfix: Bitmaps aren't always shown in their default color,
which is usually gray. Now I use again the TImageList (same as up to V1.3) and I will newer develop a 16-bit support in the future - New functions: You can set a special bitmap for all simple checked menu items or for all radio dot checked menu items |
1.4 | 10/23/98 | - Bugfix: Show disabled menu items that reside on the menubar
correct - Make TBmpMenu compatible with OWL 6.0 patch #3 |
1.32 | 09/24/98 | - Bugfix: Show menus with menu break (more than one column) correct |
1.31 | 09/13/98 | - Use shared helper functions (Also needed in my DockingEx classes) - Use TCelArray instead of TImageList for more 16-bit support in future - Add _OWLCLASS macros, to insert TBmpMenu classes in a DLL |
1.3 | 08/22/98 | - Add functions to map menu items to other bitmaps than the
default - New public array member MapEntries where you can add TBmpMapEntry - Bugfix: Show disabled checked menu items (checkbox and radio dot) correct |
1.2 | 08/07/98 | - Add support for background bitmaps. New Functions: - IsBackBitmap() - SetBackBitmap() - Add functions to exclude and include bitmaps - Change the default loaded bitmap size to 19x18 pixel - Use TCHAR, LPTSTR,... to support UNICODE version later - Add some TRACE macros for better diagnostic - Make TBmpMenu compatible with OWL 6.0 |
1.1 | 07/10/98 | - Add support for Tooltips with accelerator keys. New
Functions: - PreGetHintText() - IsWithAccel() - SetWithAccel() - Add module in constructor to load bitmaps - Bugfix: Delete search for '\a' character, because this is not necassary |
1.0 | 06/17/98 | Basic version |
E-Mail: SoftEngage@aol.com
|