X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..c4e2838090992384911a6a6aa44cac985d79a555:/samples/nativdlg/nativdlg.cpp?ds=inline diff --git a/samples/nativdlg/nativdlg.cpp b/samples/nativdlg/nativdlg.cpp index b8690da633..ede591f229 100644 --- a/samples/nativdlg/nativdlg.cpp +++ b/samples/nativdlg/nativdlg.cpp @@ -34,18 +34,15 @@ IMPLEMENT_APP(MyApp) -// Testing of ressources -MyApp::MyApp() -{ -} - bool MyApp::OnInit(void) { // Create the main frame window MyFrame *frame = new MyFrame(NULL, wxID_ANY, _T("wxWidgets Native Dialog Sample"), wxPoint(0, 0), wxSize(300, 250)); +#if wxUSE_STATUSBAR // Give it a status line frame->CreateStatusBar(2); +#endif // wxUSE_STATUSBAR // Make a menubar wxMenu *file_menu = new wxMenu; @@ -90,15 +87,13 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnTest1(wxCommandEvent& WXUNUSED(event)) { #if ( defined(__WXOS2__) || defined(__WXMSW__) ) && !defined(__WXUNIVERSAL__) - MyDialog *dialog = new MyDialog; - if (dialog->LoadNativeDialog(this, _T("dialog1"))) - { - dialog->SetModal(true); - dialog->ShowModal(); - } - dialog->Close(true); + MyDialog dialog; + if (dialog.LoadNativeDialog(this, _T("dialog1"))) + { + dialog.ShowModal(); + } #else - wxMessageBox(_T("No native dialog support"),_T("Platform limitation")); + wxMessageBox(_T("No native dialog support"),_T("Platform limitation")); #endif }