// Created: 11.11.97
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ===========================================================================
wxMenu *pSubMenu)
: wxMenuItemBase(pParentMenu, id, text, strHelp, kind, pSubMenu)
#if wxUSE_OWNER_DRAWN
- , wxOwnerDrawn(GetLabelFromText(text), kind == wxITEM_CHECK)
+ , wxOwnerDrawn(text, kind == wxITEM_CHECK)
#endif // owner drawn
{
Init();
: wxMenuItemBase(parentMenu, id, text, help,
isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu)
#if wxUSE_OWNER_DRAWN
- , wxOwnerDrawn(GetLabelFromText(text), isCheckable)
+ , wxOwnerDrawn(text, isCheckable, true)
#endif // owner drawn
{
Init();
start, // the first radio group item
end, // the last one
pos, // the one to check
- MF_BYPOSITION | flags) )
+ MF_BYPOSITION) )
{
wxLogLastError(_T("CheckMenuRadioItem"));
}
{
if ( ::CheckMenuItem(hmenu,
GetRealId(),
- MF_BYCOMMAND | flags) == -1 )
+ MF_BYCOMMAND | flags) == (DWORD)-1 )
{
wxLogLastError(wxT("CheckMenuItem"));
}
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") );