X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c575e45a24711793f98959a1f394a9e528c3129a..25db2c25bc488fcdd10cc5d2fd4938fd78b1cf0e:/src/xrc/xh_wizrd.cpp?ds=sidebyside diff --git a/src/xrc/xh_wizrd.cpp b/src/xrc/xh_wizrd.cpp index fad0e1c557..97dc42b94d 100644 --- a/src/xrc/xh_wizrd.cpp +++ b/src/xrc/xh_wizrd.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_wizrd.cpp +// Name: src/xrc/xh_wizrd.cpp // Purpose: XRC resource for wxWizard // Author: Vaclav Slavik // Created: 2003/03/01 @@ -8,10 +8,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "xh_wizrd.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -22,7 +18,11 @@ #if wxUSE_XRC && wxUSE_WIZARDDLG #include "wx/xrc/xh_wizrd.h" -#include "wx/log.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" +#endif + #include "wx/wizard.h" IMPLEMENT_DYNAMIC_CLASS(wxWizardXmlHandler, wxXmlResourceHandler) @@ -32,6 +32,7 @@ wxWizardXmlHandler::wxWizardXmlHandler() : wxXmlResourceHandler() m_wizard = NULL; m_lastSimplePage = NULL; XRC_ADD_STYLE(wxWIZARD_EX_HELPBUTTON); + AddWindowStyles(); } wxObject *wxWizardXmlHandler::DoCreateResource() @@ -48,6 +49,7 @@ wxObject *wxWizardXmlHandler::DoCreateResource() GetText(wxT("title")), GetBitmap(), GetPosition()); + SetupWindow(wiz); wxWizard *old = m_wizard; m_wizard = wiz; @@ -58,8 +60,7 @@ wxObject *wxWizardXmlHandler::DoCreateResource() } else { - wxWizardPage *page = NULL; - wxUnusedVar(page); + wxWizardPage *page; if (m_class == wxT("wxWizardPageSimple")) { @@ -72,13 +73,14 @@ wxObject *wxWizardXmlHandler::DoCreateResource() } else /*if (m_class == wxT("wxWizardPage"))*/ { - wxWizardPage *p = NULL; - if (m_instance) - p = wxStaticCast(m_instance, wxWizardPage); - else - wxLogError(wxT("wxWizardPage is abstract class, must be subclassed")); - p->Create(m_wizard, GetBitmap()); - page = p; + if ( !m_instance ) + { + ReportError("wxWizardPage is abstract class and must be subclassed"); + return NULL; + } + + page = wxStaticCast(m_instance, wxWizardPage); + page->Create(m_wizard, GetBitmap()); } page->SetName(GetName());