]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_wizrd.cpp
Fix history in wxWebViewIE when using a custom file scheme.
[wxWidgets.git] / src / xrc / xh_wizrd.cpp
index 9016e921d87976d80cc2529467022e9dd87f1edd..97dc42b94dd1b58728677b63c2f6009f5b69babb 100644 (file)
@@ -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
 // Purpose:     XRC resource for wxWizard
 // Author:      Vaclav Slavik
 // Created:     2003/03/01
 #if wxUSE_XRC && wxUSE_WIZARDDLG
 
 #include "wx/xrc/xh_wizrd.h"
 #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)
 #include "wx/wizard.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxWizardXmlHandler, wxXmlResourceHandler)
@@ -45,6 +49,7 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
                     GetText(wxT("title")),
                     GetBitmap(),
                     GetPosition());
                     GetText(wxT("title")),
                     GetBitmap(),
                     GetPosition());
+        SetupWindow(wiz);
 
         wxWizard *old = m_wizard;
         m_wizard = wiz;
 
         wxWizard *old = m_wizard;
         m_wizard = wiz;
@@ -55,8 +60,7 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
     }
     else
     {
     }
     else
     {
-        wxWizardPage *page = NULL;
-        wxUnusedVar(page);
+        wxWizardPage *page;
 
         if (m_class == wxT("wxWizardPageSimple"))
         {
 
         if (m_class == wxT("wxWizardPageSimple"))
         {
@@ -69,13 +73,14 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
         }
         else /*if (m_class == wxT("wxWizardPage"))*/
         {
         }
         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());
         }
 
         page->SetName(GetName());