I'm sure that the entry for %di has been refined between when I puzzled over it several versions ago and now. I still can't fathom it out. Probably, it's because I don't have the demonstration codes installed, and don't know how to. And also haven't integrated with Visual Studio either. So, for example, this instruction:
Ensure the FTN95 utilities and examples components are installed
is not particularly helpful!
%di doesn't feature in the alphabetical list of format codes, and several of the useful things found somewhere in the 'using dialog resources' section (e.g. that %`ts is possible and useful) doesn't feature in the description of %ts. Other useful things listed here that probably work even without %di are options for %ps and %th, and functions such as the subroutine SET_TOOLTIP_TEXT@ (not listed in the functions reference).
What does however intrigue me is the paragraph:
A menu that is defined as a resource can also include small bitmaps. When used, the bitmap replaces the check mark in a menu item and normally has the same size (12x12 pixels for 'Small Fonts' display). If the id is the same as the id for a bitmap in the resource then the bitmap is automatically loaded into the item.
The last sentence here has me completely baffled - maybe all would be clear if I could see an example. However, the preceding sentence suggests that it ought not to be overly difficult to have a straightforward Clearwin function to put a 12x12 pixel icon in a menu - if only I could find out what the menu ID was, and the bitmap ID in my resources section, and then presumably some marriage could be arranged even without the complexities of %di ... and as FTN95 or some bit of it knows both, maybe the function could be:
SET_MENU_BITMAP@ ('%mn[File[Open]]', 'OPEN_BMP')
(just a suggestion!). Alternatively since # triggers recognition that the menu item needs a check mark and a check mark control variable is then required in WINIO@, couldn't another code trigger recognition that an icon is to be used instead, for example using caret (not used in menus) instead:
WR=WINIO@('%mn[File[^Open]&', OPEN_BMP, CALLBACK)
I wonder if there is anyone out there who could let me have the example codes, and if there is anyone out there who has succeeded in putting those bitmaps into menus, especially if this can be done in any way without a resource editor (or perhaps using a freebie from the web) then I'd be interested to hear from them. Indeed, if anyone has actually used %di and can explain it further, then I'd be interested.
Presumably the 12x12 is 75% of the font height in small fonts, so for large fonts it would be 15x15.
Eddie