Use MIIM_FTYPE rather than MIIM_TYPE in wxMSW

There is no need to use the old symbol any more now that we don't support
Windows 9x any longer.
This commit is contained in:
Cătălin Răceanu 2017-02-24 16:36:46 +02:00 committed by VZ
parent af70755124
commit 3a02672de8

View File

@ -5685,19 +5685,13 @@ int wxWindowMSW::HandleMenuChar(int chAccel,
WinStruct<MENUITEMINFO> mii; WinStruct<MENUITEMINFO> mii;
// we could use MIIM_FTYPE here as we only need to know if the item is // use MIIM_FTYPE to know if the item is ownerdrawn or not
// ownerdrawn or not and not dwTypeData which MIIM_TYPE also returns, but mii.fMask = MIIM_FTYPE | MIIM_DATA;
// MIIM_FTYPE is not supported under Win95
mii.fMask = MIIM_TYPE | MIIM_DATA;
// find if we have this letter in any owner drawn item // find if we have this letter in any owner drawn item
const int count = ::GetMenuItemCount(hmenu); const int count = ::GetMenuItemCount(hmenu);
for ( int i = 0; i < count; i++ ) for ( int i = 0; i < count; i++ )
{ {
// previous loop iteration could modify it, reset it back before
// calling GetMenuItemInfo() to prevent it from overflowing dwTypeData
mii.cch = 0;
if ( ::GetMenuItemInfo(hmenu, i, TRUE, &mii) ) if ( ::GetMenuItemInfo(hmenu, i, TRUE, &mii) )
{ {
if ( mii.fType == MFT_OWNERDRAW ) if ( mii.fType == MFT_OWNERDRAW )