if ( item == GetCurrentItem() )
flags |= wxCONTROL_SELECTED;
+ wxBitmap bmp;
+
+ if ( !item->IsEnabled() )
+ {
+ bmp = item->GetDisabledBitmap();
+ }
+
+ if ( !bmp.Ok() )
+ {
+ // strangely enough, for unchecked item we use the
+ // "checked" bitmap because this is the default one - this
+ // explains this strange boolean expression
+ bmp = item->GetBitmap(!item->IsCheckable() || item->IsChecked());
+ }
+
rend->DrawMenuItem
(
dc,
gi,
item->GetLabel(),
item->GetAccelString(),
- // strangely enough, for unchecked item we use the
- // "checked" bitmap because this is the default one - this
- // explains this strange boolean expression
- item->GetBitmap(!item->IsCheckable() || item->IsChecked()),
+ bmp,
flags,
item->GetAccelIndex()
);
wxWindow *wxMenu::GetRootWindow() const
{
- if ( m_menuBar )
+ if ( GetMenuBar() )
{
// simple case - a normal menu attached to the menubar
- return m_menuBar;
+ return GetMenuBar();
}
// we're a popup menu but the trouble is that only the top level popup menu
m_radioGroup.start = -1;
m_isRadioGroupStart = FALSE;
+ m_bmpDisabled = wxNullBitmap;
+
UpdateAccelInfo();
}