]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_wizrd.cpp
fixed unused param warning
[wxWidgets.git] / src / xrc / xh_wizrd.cpp
index 2b9508ae05cb1a0391c70f6a6ac43b01b10c66b9..fd49ef89f75b0ad4f9e723c97d74ea905c5dc2ff 100644 (file)
@@ -8,10 +8,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "xh_wizrd.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -32,6 +28,7 @@ wxWizardXmlHandler::wxWizardXmlHandler() : wxXmlResourceHandler()
     m_wizard = NULL;
     m_lastSimplePage = NULL;
     XRC_ADD_STYLE(wxWIZARD_EX_HELPBUTTON);
+    AddWindowStyles();
 }
 
 wxObject *wxWizardXmlHandler::DoCreateResource()
@@ -58,8 +55,7 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
     }
     else
     {
-        wxWizardPage *page = NULL;
-        wxUnusedVar(page);
+        wxWizardPage *page;
 
         if (m_class == wxT("wxWizardPageSimple"))
         {
@@ -72,13 +68,14 @@ wxObject *wxWizardXmlHandler::DoCreateResource()
         }
         else /*if (m_class == wxT("wxWizardPage"))*/
         {
-            wxWizardPage *p = NULL;
-            if (m_instance)
-                p = wxStaticCast(m_instance, wxWizardPage);
-            else
+            if ( !m_instance )
+            {
                 wxLogError(wxT("wxWizardPage is abstract class, must be subclassed"));
-            p->Create(m_wizard, GetBitmap());
-            page = p;
+                return NULL;
+            }
+
+            page = wxStaticCast(m_instance, wxWizardPage);
+            page->Create(m_wizard, GetBitmap());
         }
 
         page->SetName(GetName());