- int code = wxExecute(cmd, wxEXEC_SYNC, NULL, &env);
-
- wxLogStatus(wxT("Process '%s' terminated with exit code %d."),
- cmd.c_str(), code);
-
- m_cmdLast = cmd;
-}
-
-void MyFrame::OnSyncNoEventsExec(wxCommandEvent& WXUNUSED(event))
-{
- wxString cmd = wxGetTextFromUser(wxT("Enter the command: "),
- DIALOG_TITLE,
- m_cmdLast);
-
- if ( !cmd )
- return;
-
- wxLogStatus( wxT("'%s' is running please wait..."), cmd.c_str() );
-
- int code = wxExecute(cmd, wxEXEC_BLOCK);
+ int code = wxExecute(cmd, wxEXEC_SYNC | GetExecFlags(), NULL, &env);