]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_bmpcbox.cpp
Add missing WXK constants for the control keys
[wxWidgets.git] / src / xrc / xh_bmpcbox.cpp
index 138d2ee58b8e32b73c27e0ca13ecbb5abb0a04cb..f88dc7bc3fb3c0e58eac0288f2675797ebb593cf 100644 (file)
 
 #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,7 +44,11 @@ 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")));