diff --git a/include/wx/msw/menuitem.h b/include/wx/msw/menuitem.h index 1fe684971b..fb6ef62e5e 100644 --- a/include/wx/msw/menuitem.h +++ b/include/wx/msw/menuitem.h @@ -119,7 +119,16 @@ private: // helper function for draw std menu check mark void DrawStdCheckMark(WXHDC hdc, const tagRECT* rc, wxODStatus stat); -#endif // wxUSE_OWNER_DRAWN +#else // !wxUSE_OWNER_DRAWN + // Provide stubs for the public functions above to ensure that the code + // still compiles without wxUSE_OWNER_DRAWN -- it makes sense to just drop + // the bitmaps then instead of failing compilation. + void SetBitmaps(const wxBitmap& WXUNUSED(bmpChecked), + const wxBitmap& WXUNUSED(bmpUnchecked) = wxNullBitmap) { } + void SetBitmap(const wxBitmap& WXUNUSED(bmp), + bool WXUNUSED(bChecked) = true) { } + const wxBitmap& GetBitmap() const { return wxNullBitmap; } +#endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN private: // common part of all ctors diff --git a/samples/menu/menu.cpp b/samples/menu/menu.cpp index 3d65f8c4e4..3c8f97df67 100644 --- a/samples/menu/menu.cpp +++ b/samples/menu/menu.cpp @@ -466,9 +466,7 @@ MyFrame::MyFrame() #if USE_LOG_WINDOW wxMenuItem *item = new wxMenuItem(fileMenu, Menu_File_ClearLog, wxT("Clear &log\tCtrl-L")); -#if wxUSE_OWNER_DRAWN || defined(__WXGTK__) item->SetBitmap(copy_xpm); -#endif fileMenu->Append(item); fileMenu->AppendSeparator(); #endif // USE_LOG_WINDOW