X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65812490f7886a61b6929058bdf99e3b4c46b2ca..31478355f8348d7dfb1c647919b62b224acfa8a0:/contrib/src/xrc/xh_menu.cpp diff --git a/contrib/src/xrc/xh_menu.cpp b/contrib/src/xrc/xh_menu.cpp index 4ff9112e1d..5df0d5f8d5 100644 --- a/contrib/src/xrc/xh_menu.cpp +++ b/contrib/src/xrc/xh_menu.cpp @@ -23,6 +23,7 @@ #include "wx/menu.h" #include "wx/frame.h" +IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler) wxMenuXmlHandler::wxMenuXmlHandler() : wxXmlResourceHandler(), m_insideMenu(FALSE) @@ -85,9 +86,9 @@ wxObject *wxMenuXmlHandler::DoCreateResource() wxMenuItem *mitem = new wxMenuItem(p_menu, id, fullLabel, GetText(wxT("help")), kind); -#if wxCHECK_VERSION(2,3,0) || defined(__WXMSW__) - if (HasParam(wxT("bitmap"))) - mitem->SetBitmap(GetBitmap(wxT("bitmap"))); +#if wxCHECK_VERSION(2,3,0) || (defined(__WXMSW__) && wxUSE_OWNER_DRAWN) + if (HasParam(wxT("bitmap"))) + mitem->SetBitmap(GetBitmap(wxT("bitmap"), wxART_MENU)); #endif p_menu->Append(mitem); mitem->Enable(GetBool(wxT("enabled"), TRUE)); @@ -110,6 +111,8 @@ bool wxMenuXmlHandler::CanHandle(wxXmlNode *node) ); } +IMPLEMENT_DYNAMIC_CLASS(wxMenuBarXmlHandler, wxXmlResourceHandler) + wxMenuBarXmlHandler::wxMenuBarXmlHandler() : wxXmlResourceHandler() { XRC_ADD_STYLE(wxMB_DOCKABLE);