+ if ( !wxDialog::Create(parent, -1, caption, pos, wxDefaultSize,
+ wxCHOICEDLG_DIALOG_STYLE) )
+ return FALSE;
+
+ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
+
+ // 1) text message
+ topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );
+
+ // 2) list box
+ m_listbox = new wxListBox( this, wxID_LISTBOX,
+ wxDefaultPosition, wxDefaultSize,
+ n, choices,
+ styleLbox );
+ if ( n > 0 )
+ m_listbox->SetSelection(0);
+
+ topsizer->Add( m_listbox, 1, wxEXPAND | wxLEFT|wxRIGHT, 15 );
+
+#if wxUSE_STATLINE
+ // 3) static line
+ topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
+#endif
+
+ // 4) buttons
+ topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wxCENTRE | wxALL, 10 );
+
+ SetAutoLayout( TRUE );
+ SetSizer( topsizer );
+
+ topsizer->SetSizeHints( this );
+ topsizer->Fit( this );
+
+ Centre( wxBOTH );
+
+ m_listbox->SetFocus();
+
+ return TRUE;