+void wxGenericMessageDialog::DoCreateMsgdialog()
+{
+ wxDialog::Create(m_parent, wxID_ANY, m_caption, m_pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE);
+
+ bool is_pda = (wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA);
+
+ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer *icon_text = new wxBoxSizer( wxHORIZONTAL );
+
+#if wxUSE_STATBMP
+ // 1) icon
+ if (m_dialogStyle & wxICON_MASK)
+ {
+ wxStaticBitmap *icon = new wxStaticBitmap
+ (
+ this,
+ wxID_ANY,
+ wxArtProvider::GetMessageBoxIcon(m_dialogStyle)
+ );
+ if (is_pda)
+ topsizer->Add( icon, 0, wxTOP|wxLEFT|wxRIGHT | wxALIGN_LEFT, 10 );
+ else
+ icon_text->Add(icon, wxSizerFlags().Top().Border(wxRIGHT, 20));
+ }
+#endif // wxUSE_STATBMP
+
+#if wxUSE_STATTEXT
+ // 2) text
+
+ wxBoxSizer * const textsizer = new wxBoxSizer(wxVERTICAL);
+
+ // We want to show the main message in a different font to make it stand
+ // out if the extended message is used as well. This looks better and is
+ // more consistent with the native dialogs under MSW and GTK.
+ wxString lowerMessage;
+ if ( !m_extendedMessage.empty() )
+ {
+ wxTitleTextWrapper titleWrapper(this);
+ textsizer->Add(CreateTextSizer(GetMessage(), titleWrapper),
+ wxSizerFlags().Border(wxBOTTOM, 20));
+
+ lowerMessage = GetExtendedMessage();
+ }
+ else // no extended message
+ {
+ lowerMessage = GetMessage();
+ }
+
+ textsizer->Add(CreateTextSizer(lowerMessage));
+
+ icon_text->Add(textsizer, 0, wxALIGN_CENTER, 10);
+ topsizer->Add( icon_text, 1, wxLEFT|wxRIGHT|wxTOP, 10 );
+#endif // wxUSE_STATTEXT
+
+ // 3) optional checkbox and detailed text
+ AddMessageDialogCheckBox( topsizer );
+ AddMessageDialogDetails( topsizer );
+
+ // 4) buttons
+ wxSizer *sizerBtn = CreateMsgDlgButtonSizer();
+ if ( sizerBtn )
+ topsizer->Add(sizerBtn, 0, wxEXPAND | wxALL, 10 );
+
+ SetAutoLayout( true );
+ SetSizer( topsizer );
+
+ topsizer->SetSizeHints( this );
+ topsizer->Fit( this );
+ wxSize size( GetSize() );
+ if (size.x < size.y*3/2)
+ {
+ size.x = size.y*3/2;
+ SetSize( size );
+ }
+
+ Centre( wxBOTH | wxCENTER_FRAME);