I've been tinkering with owner drawn menus, searching for an easy mechanism for changing colours and mixing text and icons etc. and have hashed up a little include file which others might find useful.
Features:
easily mix text and icons
colour individual menu items (text and background)
justify the text in individual menu items
use multiple fonts
set different heights for individual menu items
choose to have a border surround the highlighted menu item etc.
I've tested it with regular menus and a little bit with popup menus and all seems to work okay. No documentation I'm afraid, but the example program should make it clear how to use the little library.
The code is based on a routine I found on purearea.net
Structure iMenuItem ;Used to store information on individual menu items.
id.l
hMenu.l
enabled.l ; <- fixed ///////////
height.l
lefttextmargin.l
textcolour.l ;Unselected colour.
backcolour.l ;Unselected colour.
hFont.l ;Handle to the font to be used.
textjustification.l ;One of '#ES_CENTER', '#ES_LEFT', '#ES_RIGHT'.
hIcon.l ;Handle to the icon to be used.
EndStructure
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Thanks Gnozal, but that member is not, or should not be used. If any of the code references this member then the code needs removing. I'll have a check and upload a new version if necessary.
Edit: new version uploaded.
I may look like a mule, but I'm not a complete ass.