X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78d14f80e9a72041ede52c30d912ec5cef21b1b3..25088f1eea365f0da7aeb565932dd4fe0fd5d20e:/contrib/src/xrc/xh_stbmp.cpp diff --git a/contrib/src/xrc/xh_stbmp.cpp b/contrib/src/xrc/xh_stbmp.cpp index 49371752a4..04eb5096df 100644 --- a/contrib/src/xrc/xh_stbmp.cpp +++ b/contrib/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")); } - -