+ AddBackNextPair(buttonRow);
+
+ buttonRow->Add(
+ btnCancel,
+ 0, // Horizontally unstretchable
+ wxALL, // Border all around, top aligned
+ 5 // Border width
+ );
+}
+
+void wxWizard::DoCreateControls()
+{
+ // do nothing if the controls were already created
+ if ( WasCreated() )
+ return;
+
+ // wxWindow::SetSizer will be called at end
+ wxBoxSizer *windowSizer = new wxBoxSizer(wxVERTICAL);
+
+ wxBoxSizer *mainColumn = new wxBoxSizer(wxVERTICAL);
+ windowSizer->Add(
+ mainColumn,
+ 1, // Vertical stretching
+ wxALL | wxEXPAND, // Border all around, horizontal stretching
+ 5 // Border width
+ );
+
+ AddBitmapRow(mainColumn);
+ AddStaticLine(mainColumn);
+ AddButtonRow(mainColumn);
+
+ // wxWindow::SetSizer should be followed by wxWindow::Fit, but
+ // this is done in FinishLayout anyway so why duplicate it
+ SetSizer(windowSizer);
+}
+
+void wxWizard::SetPageSize(const wxSize& size)
+{
+ wxCHECK_RET(!m_started,wxT("wxWizard::SetPageSize after RunWizard"));
+ m_sizePage = size;
+}
+
+void wxWizard::FinishLayout()
+{
+ m_sizerBmpAndPage->Add(
+ m_sizerPage,
+ 1, // Horizontal stretching
+ wxEXPAND | wxALL, // Vertically stretchable
+ m_sizerPage->Border()
+ );
+
+ GetSizer()->SetSizeHints(this);
+ if ( m_posWizard == wxDefaultPosition )
+ CentreOnScreen();
+}
+
+void wxWizard::FitToPage(const wxWizardPage *page)
+{
+ wxCHECK_RET(!m_started,wxT("wxWizard::FitToPage after RunWizard"));
+
+ while ( page )