X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78d14f80e9a72041ede52c30d912ec5cef21b1b3..51ce89f1bf960d38cb34f6f0c0b9845e6c7efaaf:/src/xrc/xh_stbmp.cpp

diff --git a/src/xrc/xh_stbmp.cpp b/src/xrc/xh_stbmp.cpp
index 49371752a4..04eb5096df 100644
--- a/src/xrc/xh_stbmp.cpp
+++ b/src/xrc/xh_stbmp.cpp
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        xh_stbmp.cpp
-// Purpose:     XML resource for wxStaticBitmap
+// Purpose:     XRC resource for wxStaticBitmap
 // Author:      Vaclav Slavik
 // Created:     2000/04/22
 // RCS-ID:      $Id$
@@ -22,6 +22,8 @@
 #include "wx/xrc/xh_stbmp.h"
 #include "wx/statbmp.h"
 
+IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmapXmlHandler, wxXmlResourceHandler)
+
 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() 
 : wxXmlResourceHandler() 
 {
@@ -30,23 +32,21 @@ wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
 
 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 { 
-    wxStaticBitmap *bmp = new wxStaticBitmap(m_parentAsWindow,
-                                    GetID(),
-                                    GetBitmap(wxT("bitmap"), GetSize()),
-                                    GetPosition(), GetSize(),
-                                    GetStyle(),
-                                    GetName()
-                                    );
+    XRC_MAKE_INSTANCE(bmp, wxStaticBitmap)
+
+    bmp->Create(m_parentAsWindow,
+                GetID(),
+                GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()),
+                GetPosition(), GetSize(),
+                GetStyle(),
+                GetName());
+
     SetupWindow(bmp);
     
     return bmp;
 }
 
-
-
 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxStaticBitmap"));
 }
-
-