no message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -249,7 +249,7 @@ bool wxMenu::DoInsertOrAppend(
|
|||||||
|
|
||||||
m_vMenuData.iPosition = 0; // submenus have a 0 position
|
m_vMenuData.iPosition = 0; // submenus have a 0 position
|
||||||
m_vMenuData.id = (USHORT)pSubmenu->GetHMenu();
|
m_vMenuData.id = (USHORT)pSubmenu->GetHMenu();
|
||||||
m_vMenuData.afStyle |= MIS_SUBMENU;
|
m_vMenuData.afStyle |= MIS_SUBMENU | MIS_TEXT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -657,7 +657,18 @@ WXHMENU wxMenuBar::Create()
|
|||||||
hMenuBar = GetHwnd();
|
hMenuBar = GetHwnd();
|
||||||
for (size_t i = 0; i < nCount; i++)
|
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;
|
return hMenuBar;
|
||||||
|
Reference in New Issue
Block a user