From: David Webster Date: Wed, 15 Mar 2000 23:27:47 +0000 (+0000) Subject: no message X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c0dbf1fb9068440d186c566deea2593f98ca9727?ds=sidebyside no message git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/os2/menu.cpp b/src/os2/menu.cpp index a08ced90aa..d9cfa8d761 100644 --- a/src/os2/menu.cpp +++ b/src/os2/menu.cpp @@ -249,7 +249,7 @@ bool wxMenu::DoInsertOrAppend( m_vMenuData.iPosition = 0; // submenus have a 0 position m_vMenuData.id = (USHORT)pSubmenu->GetHMenu(); - m_vMenuData.afStyle |= MIS_SUBMENU; + m_vMenuData.afStyle |= MIS_SUBMENU | MIS_TEXT; } else { @@ -657,7 +657,18 @@ WXHMENU wxMenuBar::Create() hMenuBar = GetHwnd(); for (size_t i = 0; i < nCount; i++) { - ::WinSendMsg(hMenuBar, MM_INSERTITEM, (MPARAM)&m_menus[i]->m_vMenuData, (MPARAM)m_titles[i].c_str()); + APIRET rc; + ERRORID vError; + wxString sError; + + rc = (APIRET)::WinSendMsg(hMenuBar, MM_INSERTITEM, (MPARAM)&m_menus[i]->m_vMenuData, (MPARAM)m_titles[i].c_str()); + if (rc == MIT_MEMERROR || rc == MIT_ERROR) + { + vError = ::WinGetLastError(vHabmain); + sError = wxPMErrorToStr(vError); + wxLogError("Error inserting or appending a menuitem. Error: %s\n", sError); + return NULLHANDLE; + } } } return hMenuBar;