X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b33b72819002e038a2a0cb2b3aa9b2cde880c7a..71e483d39adbc1c80ef2fa998bd7f18e1704440c:/src/os2/menuitem.cpp diff --git a/src/os2/menuitem.cpp b/src/os2/menuitem.cpp index af97aab35a..1d960c605b 100644 --- a/src/os2/menuitem.cpp +++ b/src/os2/menuitem.cpp @@ -155,6 +155,8 @@ wxMenuItem::wxMenuItem( m_text = TextToLabel(rText); m_isCheckable = bCheckable; m_help = rStrHelp; + memset(&m_vMenuData, '\0', sizeof(m_vMenuData)); + m_vMenuData.id= nId; } // end of wxMenuItem::wxMenuItem wxMenuItem::~wxMenuItem() @@ -233,13 +235,13 @@ void wxMenuItem::Enable( bOk = (bool)::WinSendMsg( GetHMenuOf(m_parentMenu) ,MM_SETITEMATTR ,MPFROM2SHORT(GetRealId(), TRUE) - ,MPFROM2SHORT(MIA_DISABLED, MIA_DISABLED) + ,MPFROM2SHORT(MIA_DISABLED, FALSE) ); else bOk = (bool)::WinSendMsg( GetHMenuOf(m_parentMenu) ,MM_SETITEMATTR ,MPFROM2SHORT(GetRealId(), TRUE) - ,MPFROM2SHORT(MIA_DISABLED, FALSE) + ,MPFROM2SHORT(MIA_DISABLED, MIA_DISABLED) ); if (!bOk) { @@ -271,7 +273,7 @@ void wxMenuItem::Check( ); if (!bOk) { - wxLogLastError("EnableMenuItem"); + wxLogLastError("CheckMenuItem"); } wxMenuItemBase::Check(bCheck); } // end of wxMenuItem::Check