X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c88040761c79ddfa36bcbb0242165eca06201ffb..8e40d27b8d762c63e0fbb112540f601c44349eb3:/src/generic/wizard.cpp?ds=inline diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index 8e88e0aa98..3d1654bef7 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -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;