X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50c679c81a5144d6b07348e27b2dbf2b58805dd2..92850d6b2ff6072f4801152fd6bfdb7263715ec0:/contrib/samples/gizmos/editlbox/test.cpp diff --git a/contrib/samples/gizmos/editlbox/test.cpp b/contrib/samples/gizmos/editlbox/test.cpp index d1976f6c6b..3620a451de 100644 --- a/contrib/samples/gizmos/editlbox/test.cpp +++ b/contrib/samples/gizmos/editlbox/test.cpp @@ -6,7 +6,7 @@ #endif // for all others, include the necessary headers (this file is usually all you -// need because it includes almost all "standard" wxWindows headers) +// need because it includes almost all "standard" wxWidgets headers) #ifndef WX_PRECOMP #include "wx/wx.h" #endif @@ -25,17 +25,17 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { - wxDialog dlg(NULL, -1, _("Test dialog"), wxDefaultPosition, wxDefaultSize, + wxDialog dlg(NULL, wxID_ANY, _("Test dialog"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); wxSizer *sizer = new wxBoxSizer(wxVERTICAL); - sizer->Add(new wxEditableListBox(&dlg, -1, _("Match these wildcards:"), + sizer->Add(new wxEditableListBox(&dlg, wxID_ANY, _("Match these wildcards:"), wxDefaultPosition,wxSize(300,200)), 1, wxEXPAND|wxALL, 10); - + sizer->Add(5,5); - wxEditableListBox *lb = new wxEditableListBox(&dlg, -1, _("Except:"), + wxEditableListBox *lb = new wxEditableListBox(&dlg, wxID_ANY, _("Except:"), wxDefaultPosition,wxSize(300,200)); wxArrayString ar; ar.Add(_T("*.cpp")); @@ -46,13 +46,12 @@ bool MyApp::OnInit() sizer->Add(lb, 1, wxEXPAND|wxALL, 10); sizer->Add(5,5); - + sizer->Add(new wxButton(&dlg, wxID_OK, _("OK")), 0, wxALIGN_RIGHT | wxALL, 10); - dlg.SetAutoLayout(TRUE); dlg.SetSizer(sizer); sizer->Fit(&dlg); - dlg.Centre(); - + dlg.Centre(); + dlg.ShowModal(); wxString res = _("'Except' contains these strings:\n\n"); @@ -60,6 +59,6 @@ bool MyApp::OnInit() for (size_t i = 0; i < ar.GetCount(); i++) res << ar[i] << _T("\n"); wxMessageBox(res); - - return FALSE; + + return false; }