From Delphi 4 you can add the bitmaps to your menu items.
But in Delphi 2/3 you haven't such useful possibility.
I use the next method:
1. you must declare a TBitmap variable:
var bmp: TBitmap
2. load the bitmap (from file, resource etc):
In default MS Windows settings the glyphs in menu have a 12x12pixels.
If your bitmap have other size, then this bitmap will stretched.
3. set bitmap to menu item:
SetMenuItemBitmaps(yourMenu.Handle, intIndex, MF_BYPOSITION, bmp.Handle,
- yourMenu is a menu component (TMainMenu or TPopupMenu)
- intIndex is a menu item position (from 0)
- first bmp.Handle is a handle of bitmap for unchecked state
- second bmp.Handle is a handle of bitmap for checked state
Of course, you can set the same bmp.Handle or set the
different bitmaps for unchecked/checked states
PS: some days ago the one registered user ask me: "why in
Designer you not use a glyphs in menu?". I forgot it! Of
course, yesterday I included such feature in few minutes and
"SMReport use the bitmaps in menu and is MS Office
Published: October 21, 1999