// Purpose: XRC resource for wxBitmapComboBox
// Author: Jaakko Salli
// Created: Sep-10-2006
-// RCS-ID: $Id:
// Copyright: (c) 2006 Jaakko Salli
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#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()
{
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;
}