Restore wxMenu::Break() functionality in wxMSW

This was broken in da319a87cd (Make wxMSW owner drawn menu item code
more clear and correct., 2014-03-27) for non-owner-drawn menus.

Closes #18692.
This commit is contained in:
Rick S 2020-04-18 00:41:09 +02:00 committed by Vadim Zeitlin
parent cfe8c0dea7
commit 14717af39c

View File

@ -452,6 +452,12 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
mii.fState = MFS_CHECKED;
}
if ( flags & MF_MENUBREAK )
{
mii.fMask |= MIIM_FTYPE;
mii.fType = MFT_MENUBREAK;
}
mii.dwItemData = reinterpret_cast<ULONG_PTR>(pItem);
ok = ::InsertMenuItem(GetHmenu(), pos, TRUE /* by pos */, &mii);