]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/wizard.cpp
Captured mouse in grid column label so the drag isn't prematurely and messily
[wxWidgets.git] / src / generic / wizard.cpp
index 8e88e0aa9831c14bc7e026990b8a0cca6d76d184..3d1654bef721f6813d723d2a48fbcff23cdfd134 100644 (file)
@@ -79,14 +79,28 @@ IMPLEMENT_DYNAMIC_CLASS(wxWizardEvent, wxNotifyEvent)
 // wxWizardPage
 // ----------------------------------------------------------------------------
 
+void wxWizardPage::Init()
+{
+    m_bitmap = wxNullBitmap;
+}
+
 wxWizardPage::wxWizardPage(wxWizard *parent,
                            const wxBitmap& bitmap,
                            const wxChar *resource)
-            : wxPanel(parent)
 {
+    Create(parent, bitmap, resource);
+}
+    
+bool wxWizardPage::Create(wxWizard *parent,
+                          const wxBitmap& bitmap,
+                          const wxChar *resource)
+{
+    if ( !wxPanel::Create(parent, -1) )
+        return FALSE;
+
     if ( resource != NULL )
     {
-#if wxUSE_RESOURCES
+#if wxUSE_WX_RESOURCES
         if ( !LoadFromResource(this, resource) )
         {
             wxFAIL_MSG(wxT("wxWizardPage LoadFromResource failed!!!!"));
@@ -94,10 +108,12 @@ wxWizardPage::wxWizardPage(wxWizard *parent,
 #endif // wxUSE_RESOURCES
     }
 
-    m_PageBitmap = bitmap;
+    m_bitmap = bitmap;
 
     // initially the page is hidden, it's shown only when it becomes current
     Hide();
+    
+    return TRUE;
 }
 
 // ----------------------------------------------------------------------------
@@ -133,6 +149,7 @@ bool wxWizard::Create(wxWindow *parent,
 {
     m_posWizard = pos;
     m_bitmap = bitmap ;
+
     // just create the dialog itself here, the controls will be created in
     // DoCreateControls() called later when we know our final size
     m_page = (wxWizardPage *)NULL;