]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/menuitem.cpp
load wsock32.dll dynamically, so that wxCore has no dependency on it
[wxWidgets.git] / src / os2 / menuitem.cpp
index 6c912fc3e6e39f049634b635cda23dab3d21da3d..91c6e9d975be069bbc0a1a3b04e653796c569ca9 100644 (file)
@@ -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);