X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c4e8f384d7c9a2e1f31e9602917f2d1318de01f..f363cee882672e147340240cf0bb194a68e37833:/src/xrc/xh_bmpcbox.cpp diff --git a/src/xrc/xh_bmpcbox.cpp b/src/xrc/xh_bmpcbox.cpp index 6fc2840bd6..533f52fd84 100644 --- a/src/xrc/xh_bmpcbox.cpp +++ b/src/xrc/xh_bmpcbox.cpp @@ -3,7 +3,6 @@ // Purpose: XRC resource for wxBitmapComboBox // Author: Jaakko Salli // Created: Sep-10-2006 -// RCS-ID: $Id$ // Copyright: (c) 2006 Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,10 +20,13 @@ #ifndef WX_PRECOMP #include "wx/intl.h" + #include "wx/log.h" #endif #include "wx/bmpcbox.h" +#include "wx/xml/xml.h" + IMPLEMENT_DYNAMIC_CLASS(wxBitmapComboBoxXmlHandler, wxXmlResourceHandler) wxBitmapComboBoxXmlHandler::wxBitmapComboBoxXmlHandler() @@ -41,9 +43,14 @@ wxObject *wxBitmapComboBoxXmlHandler::DoCreateResource() { if (m_class == wxT("ownerdrawnitem")) { - wxCHECK_MSG(m_combobox, NULL, wxT("Incorrect syntax of XRC resource: ownerdrawnitem not within a bitmapcombobox!")); + if ( !m_combobox ) + { + ReportError("ownerdrawnitem only allowed within a wxBitmapComboBox"); + return NULL; + } - m_combobox->Append(GetText(wxT("text")), GetBitmap(wxT("bitmap"), wxART_MISSING_IMAGE)); + m_combobox->Append(GetText(wxT("text")), + GetBitmap(wxT("bitmap"))); return m_combobox; }