From 58ac79d31715b36a824ea11ca577babac9ad309d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 20 Nov 2008 23:28:26 +0000 Subject: [PATCH] use ShellExecuteEx() instead of ShellExecute() which doesn't exist under WinCE (closes #10201) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/utilscmn.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 05bb209f57..deffb94e27 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -960,16 +960,17 @@ bool wxLaunchDefaultApplication(const wxString& document, int flags) return true; } #elif defined(__WXMSW__) - const INT_PTR result = (INT_PTR)::ShellExecute - ( - NULL, // parent window - _T("open"), - document.wx_str(), - NULL, // parameters - NULL, // working directory - SW_SHOWDEFAULT - ); - if ( result > 32 ) + WinStruct sei; + sei.lpFile = document.wx_str(); + sei.lpVerb = _T("open"); + sei.nShow = SW_SHOWDEFAULT; + + // avoid Windows message box in case of error for consistency with + // wxLaunchDefaultBrowser() even if don't show the error ourselves in this + // function + sei.fMask = SEE_MASK_FLAG_NO_UI; + + if ( ::ShellExecuteEx(&sei) ) return true; #endif -- 2.47.2