X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6278a74c24329ed10985865b678293cb6a19f31..e1720942b02fdf109d23a519bf21033483b4bdab:/src/msw/menuitem.cpp diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index aae20373f7..b9f3ca853f 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -6,7 +6,7 @@ // Created: 11.11.97 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // =========================================================================== @@ -104,7 +104,7 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu, : wxMenuItemBase(parentMenu, id, text, help, isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu) #if wxUSE_OWNER_DRAWN - , wxOwnerDrawn(text, isCheckable) + , wxOwnerDrawn(text, isCheckable, true) #endif // owner drawn { Init(); @@ -300,6 +300,10 @@ void wxMenuItem::SetText(const wxString& text) wxMenuItemBase::SetText(text); OWNER_DRAWN_ONLY( wxOwnerDrawn::SetName(text) ); +#if wxUSE_OWNER_DRAWN + // tell the owner drawing code to to show the accel string as well + SetAccelString(text.AfterFirst(_T('\t'))); +#endif HMENU hMenu = GetHMenuOf(m_parentMenu); wxCHECK_RET( hMenu, wxT("menuitem without menu") );