]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_stbmp.cpp
renamed resource.xml to resource.xrc
[wxWidgets.git] / contrib / src / xml / xh_stbmp.cpp
index 903b84b92d37a73339daac122a3ba83b7ac9c6f4..c3620d06c5bc5e0b5554923331dc1d97aa49ae95 100644 (file)
 
 #include "wx/xml/xh_stbmp.h"
 #include "wx/statbmp.h"
-#include "wx/image.h"
-#include "wx/bitmap.h"
 
 wxStaticBitmapXmlHandler::wxStaticBitmapXmlHandler() 
 : wxXmlResourceHandler() 
 {
+    AddWindowStyles();
 }
 
 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()