]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_stbmp.cpp
fixed loading of bitmaps from mem_fs
[wxWidgets.git] / contrib / src / xml / xh_stbmp.cpp
index 903b84b92d37a73339daac122a3ba83b7ac9c6f4..8ec8d5553cd4b9726d2b57593965c17306e2e239 100644 (file)
@@ -21,8 +21,6 @@
 
 #include "wx/xml/xh_stbmp.h"
 #include "wx/statbmp.h"
-#include "wx/image.h"
-#include "wx/bitmap.h"
 
 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() 
 : wxXmlResourceHandler() 
@@ -31,14 +29,9 @@ wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler()
 
 wxObject *wxStaticBitmapXmlHandler::DoCreateResource()
 { 
-    wxImage img(GetParamValue(_T("bitmap")));
-    wxSize sz = GetSize();
-    
-    if (!(sz == wxDefaultSize)) img.Rescale(sz.x, sz.y);
-    
     wxStaticBitmap *bmp = new wxStaticBitmap(m_ParentAsWindow,
                                     GetID(),
-                                    img.ConvertToBitmap(),
+                                    GetBitmap(_T("bitmap"), GetSize()),
                                     GetPosition(), GetSize(),
                                     GetStyle(),
                                     GetName()