]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_stbmp.cpp
finding papersizes allows for 1 mm tolerance
[wxWidgets.git] / src / xrc / xh_stbmp.cpp
index 544b43de9f6dda2a2a5c4d0fea2251a4d7681bf2..b1ccad90f5e54c46a4b201d95df4c26fb921ac92 100644 (file)
@@ -30,14 +30,11 @@ wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
 
 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 { 
 
 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 { 
-    wxStaticBitmap *bmp = wxStaticCast(m_instance, wxStaticBitmap);
-
-    if (!bmp)
-       bmp = new wxStaticBitmap;
+    XRC_MAKE_INSTANCE(bmp, wxStaticBitmap)
 
     bmp->Create(m_parentAsWindow,
                 GetID(),
 
     bmp->Create(m_parentAsWindow,
                 GetID(),
-                GetBitmap(wxT("bitmap"), GetSize()),
+                GetBitmap(wxT("bitmap"), wxART_OTHER, GetSize()),
                 GetPosition(), GetSize(),
                 GetStyle(),
                 GetName());
                 GetPosition(), GetSize(),
                 GetStyle(),
                 GetName());
@@ -47,11 +44,7 @@ wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
     return bmp;
 }
 
     return bmp;
 }
 
-
-
 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxStaticBitmap"));
 }
 bool wxStaticBitmapXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxStaticBitmap"));
 }
-
-