diff --git a/samples/menu/menu.cpp b/samples/menu/menu.cpp index 7fd3a3292a..48bd9e9de4 100644 --- a/samples/menu/menu.cpp +++ b/samples/menu/menu.cpp @@ -465,6 +465,8 @@ MyFrame::MyFrame() #if USE_LOG_WINDOW wxMenuItem *item = new wxMenuItem(fileMenu, Menu_File_ClearLog, wxT("Clear &log\tCtrl-L")); + item->SetBackgroundColour(*wxBLACK); + item->SetTextColour(*wxRED); #if wxUSE_OWNER_DRAWN || defined(__WXGTK__) item->SetBitmap(copy_xpm); #endif diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 4d8ae82a8a..0c69e199bd 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -959,7 +959,11 @@ bool wxMenuItem::OnDrawItem(wxDC& dc, const wxRect& rc, rcText.top--; #if wxUSE_UXTHEME - wxUxThemeEngine* theme = MenuDrawData::GetUxThemeEngine(); + // If a custom background colour is explicitly specified, we should use + // it instead of the default theme background. + wxUxThemeEngine* const theme = GetBackgroundColour().IsOk() + ? NULL + : MenuDrawData::GetUxThemeEngine(); if ( theme ) { POPUPITEMSTATES state;