]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dialogs/dialogs.cpp
Applied [ 587500 ] Update CW project file for wxMSW
[wxWidgets.git] / samples / dialogs / dialogs.cpp
index 9dc3dcfa7ac535f88e5f0d5ed6738ce667c750a1..a18f46079f8e80d4e898acda60a2b89f1a464599 100644 (file)
@@ -502,7 +502,7 @@ void MyFrame::FileOpen2(wxCommandEvent& WXUNUSED(event) )
 void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) )
 {
     wxFileDialog dialog(this, _T("Testing open multiple file dialog"),
-                        "_T(", ")", wxFileSelectorDefaultWildcardStr,
+                        _T(""), _T(""), wxFileSelectorDefaultWildcardStr,
                         wxMULTIPLE);
 
     if (dialog.ShowModal() == wxID_OK)
@@ -655,6 +655,7 @@ void MyFrame::ShowProgress( wxCommandEvent& WXUNUSED(event) )
                             this,   // parent
                             wxPD_CAN_ABORT |
                             wxPD_APP_MODAL |
+                            // wxPD_AUTO_HIDE | -- try this as well
                             wxPD_ELAPSED_TIME |
                             wxPD_ESTIMATED_TIME |
                             wxPD_REMAINING_TIME);
@@ -796,25 +797,34 @@ void MyFrame::OnFindDialog(wxFindDialogEvent& event)
     {
         wxFindReplaceDialog *dlg = event.GetDialog();
 
+        int idMenu;
         const wxChar *txt;
         if ( dlg == m_dlgFind )
         {
             txt = _T("Find");
+            idMenu = DIALOGS_FIND;
             m_dlgFind = NULL;
         }
         else if ( dlg == m_dlgReplace )
         {
             txt = _T("Replace");
+            idMenu = DIALOGS_REPLACE;
             m_dlgReplace = NULL;
         }
         else
         {
             txt = _T("Unknown");
+            idMenu = -1;
 
             wxFAIL_MSG( _T("unexpected event") );
         }
 
-        wxLogMessage(wxT("%s dialog is being closed."), txt),
+        wxLogMessage(wxT("%s dialog is being closed."), txt);
+
+        if ( idMenu != -1 )
+        {
+            GetMenuBar()->Check(idMenu, FALSE);
+        }
 
         dlg->Destroy();
     }
@@ -885,7 +895,7 @@ void MyModelessDialog::OnClose(wxCloseEvent& event)
 // ----------------------------------------------------------------------------
 
 MyModalDialog::MyModalDialog(wxWindow *parent)
-             : wxDialog(parent, -1, _T("Modal dialog"))
+             : wxDialog(parent, -1, wxString(_T("Modal dialog")))
 {
     wxBoxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);