-#ifdef __WXWINCE__
- // FIXME: complete this, applying the old
- // flags.
- // However, the WinCE doc for SetMenuItemInfo
- // says that you can't use it to set the menu
- // item state; only data, id and type.
- MENUITEMINFO info;
- wxZeroMemory(info);
- info.cbSize = sizeof(info);
- info.fMask = MIIM_TYPE;
- info.fType = MFT_STRING;
- info.cch = text.Length();
- info.dwTypeData = (LPTSTR) data ;
- if ( !::SetMenuItemInfo(hMenu, id, FALSE, & info) )
- {
- wxLogLastError(wxT("SetMenuItemInfo"));
- }
-#else
- if ( ::ModifyMenu(hMenu, id,
- MF_BYCOMMAND | flagsOld,
- id, data) == (int)0xFFFFFFFF )
- {
- wxLogLastError(wxT("ModifyMenu"));
- }
-#endif
+ if ( isLaterThanWin95 )
+ info.fMask |= MIIM_STRING;
+ //else: MIIM_TYPE already specified
+ info.dwTypeData = (LPTSTR)m_text.wx_str();
+ info.cch = m_text.length();
+ if ( !::SetMenuItemInfo(hMenu, id, FALSE, &info) )
+ {
+ wxLogLastError(wxT("SetMenuItemInfo"));