X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5af4b77ff3152e9ecdd971fb88bf296724001327..4e4a5fed9f544d3bec51b75b6e8638d4481d8534:/samples/exec/exec.cpp diff --git a/samples/exec/exec.cpp b/samples/exec/exec.cpp index 50c351e463..d11a4ac917 100644 --- a/samples/exec/exec.cpp +++ b/samples/exec/exec.cpp @@ -376,7 +376,8 @@ void MyFrame::OnKill(wxCommandEvent& WXUNUSED(event)) _T("Enter PID:"), _T("Exec question"), m_pidLast, - 1, INT_MAX, + // we need the full unsigned int range + -INT_MAX, INT_MAX, this); if ( pid == -1 ) { @@ -475,7 +476,7 @@ void MyFrame::OnKill(wxCommandEvent& WXUNUSED(event)) void MyFrame::DoAsyncExec(const wxString& cmd) { wxProcess *process = new MyProcess(this, cmd); - m_pidLast = wxExecute(cmd, FALSE /* async */, process); + m_pidLast = wxExecute(cmd, wxEXEC_ASYNC, process); if ( !m_pidLast ) { wxLogError(_T("Execution of '%s' failed."), cmd.c_str()); @@ -501,7 +502,7 @@ void MyFrame::OnSyncExec(wxCommandEvent& WXUNUSED(event)) wxLogStatus(_T("'%s' is running please wait..."), cmd.c_str()); - int code = wxExecute(cmd, TRUE /* sync */); + int code = wxExecute(cmd, wxEXEC_SYNC); wxLogStatus(_T("Process '%s' terminated with exit code %d."), cmd.c_str(), code); @@ -577,7 +578,7 @@ void MyFrame::OnExecWithRedirect(wxCommandEvent& WXUNUSED(event)) else // async exec { MyPipedProcess *process = new MyPipedProcess(this, cmd); - if ( !wxExecute(cmd, FALSE /* async */, process) ) + if ( !wxExecute(cmd, wxEXEC_ASYNC, process) ) { wxLogError(_T("Execution of '%s' failed."), cmd.c_str()); @@ -611,7 +612,7 @@ void MyFrame::OnExecWithPipe(wxCommandEvent& WXUNUSED(event)) // always execute the filter asynchronously MyPipedProcess2 *process = new MyPipedProcess2(this, cmd, input); - int pid = wxExecute(cmd, FALSE /* async */, process); + int pid = wxExecute(cmd, wxEXEC_ASYNC, process); if ( pid ) { wxLogStatus(_T("Process %ld (%s) launched."), pid, cmd.c_str());