+void MyFrame::ExtDialog(wxCommandEvent& WXUNUSED(event) )
+{
+ // The standard flags causes this dialog to display a
+ // wxStaticLine under wxMotif and wxGTK, but none under
+ // other platforms. Also, it will not be resizable
+ // anywhere.
+
+ wxExtDialog dialog( this, -1, "Test 1 for wxExtDialog", wxOK|wxFORWARD|wxBACKWARD );
+ dialog.AddButton( new wxButton( &dialog, -1, "Custom") );
+
+ dialog.SetClientWindow( new wxTextCtrl( &dialog, -1, "Test", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ) );
+
+ // query minimal recommended size from the buttons
+ dialog.SetSize( dialog.GetButtonAreaSize().x, 170 );
+
+ dialog.Centre( wxBOTH );
+ dialog.ShowModal();
+
+ // This dialog uses the standard dialog styles but is also
+ // resizable on all platforms and shows a wxStaticLine on
+ // all platforms.
+
+ wxExtDialog dialog2( this, -1, "Test 2 for wxExtDialog",
+ wxOK|wxFORWARD|wxBACKWARD|wxCANCEL,
+ wxDefaultPosition, wxSize(400,170),
+ wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxED_BUTTONS_RIGHT | wxED_STATIC_LINE | wxED_CLIENT_MARGIN );
+
+ dialog2.SetClientWindow( new wxTextCtrl( &dialog2, -1, "Test", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE ) );
+
+ // query minimal recommended size from the buttons
+ wxSize min_size( dialog2.GetButtonAreaSize() );
+ dialog2.SetSizeHints( min_size.x + 200, min_size.y );
+
+ dialog2.Centre( wxBOTH );
+ dialog2.ShowModal();
+}
+