2 pdavit
I guess you didn't understand... its a history thing
2 Leftious
I just set MFS_CHECKED
Why do you set this ? I frist thought it is to provide space for the icon but as you said that windows will resize the menu on its own, I am not sure now...
Did you compare this to a standard menu? There is always an indent of about 20 pixels. The difference between my curent implementation and a standard menu shouldn't be more than 2 pixels - if any.
2Lefteous
I found out about the ownerdraw icon mode too yesterday - very nice, almost perfect!
The only problem is with right to left languages like Arabic or hebrew: The checkmarks are correctly moved to the right side and the text is all right-aligned, but the icons remain on the left side.
Any ideas? To test it you can mirror the main menu like this:
fillchar(mii,sizeof(mii),#0);
mii.cbsize:=sizeof(mii);
mii.fmask:=MIIM_TYPE;
mii.dwtypedata:=menuname2;
mii.cch:=sizeof(menuname2);
if GetMenuItemInfo(menuhandle,0,true,mii) then begin
if mirrored then
ftype2:=mii.ftype or MFT_RIGHTJUSTIFY or MFT_RIGHTORDER
else
ftype2:=mii.ftype and not (MFT_RIGHTJUSTIFY or MFT_RIGHTORDER);
if ftype2<>mii.ftype then begin
mii.ftype:=ftype2;
SetMenuItemInfo(menuhandle,0,true,mii);
DrawMenuBar(mainhandle);
end;
end;
2ghisler(Author)
Sorry I currently don't see a way to control the placement of the icon using this approach. I really wonder why the icon are placed on the left side using these flags.