X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9667cda38388d1f82f805d6d8cdcdca4a1ae877..5a410e4453e28ee77ee3ad7a407ca71692f9f30f:/src/os2/menuitem.cpp?ds=sidebyside diff --git a/src/os2/menuitem.cpp b/src/os2/menuitem.cpp index 6c912fc3e6..91c6e9d975 100644 --- a/src/os2/menuitem.cpp +++ b/src/os2/menuitem.cpp @@ -135,6 +135,8 @@ wxMenuItem::wxMenuItem( #endif // owner drawn { wxASSERT_MSG(pParentMenu != NULL, wxT("a menu item should have a parent")); + memset(&m_vMenuData, '\0', sizeof(m_vMenuData)); + m_vMenuData.id = (USHORT)nId; Init(); } // end of wxMenuItem::wxMenuItem @@ -421,6 +423,9 @@ void wxMenuItem::SetText( wxMenuItemBase::SetText(sText); OWNER_DRAWN_ONLY(wxOwnerDrawn::SetName(sText)); +#if wxUSE_OWNER_DRAWN + SetAccelString(rText.AfterFirst(_T('\t'))); +#endif // wxUSE_OWNER_DRAWN HWND hMenu = GetHmenuOf(m_parentMenu);