Hi,
Okay~ I am finishing up rewriting menu mask setting in win32 and use32. The reason
for so much junk in the menus was due to doing a full mask set for setting nothing
other than "Rect" so if the structure was packed with S$@%! it would keep it
and
think it was valid data. MenuGetRosMenuItemInfo was naughty too. It set a full
mask and it was passed to MenuSetRosMenuItemInfo and saved! Until I figured this
out it was two weeks later! So I'm fixing this, Set will be selective and create
errors if the wrong combination is used.
Strings may have;
MIIM_TYPE & MFT_STRING == good
MIIM_STRING & MFT_STRING == good
MIIM_STRING == good
so you might have this -> if ((miiW.fMask & MIIM_STRING) ||
(IS_STRING_ITEM(miiW.fType)))
and this is good due to there might be one of them.
You can not have.
MIIM_TYPE & MIIM_STRING == bad
MIIM_TYPE & MIIM_FTYPE == bad
MIIM_TYPE & MIIM_BITMAP == bad
MIIM_FTYPE & MFT_BITMAP == bad
just read msdn doc on MENUITEMINFO structure, once you decode their logic it starts to
make
sense. Remember one supersedes another.
What a mess,
James