Corrections to wxLaunchDefaultBrowser() under MSW.
Don't give spurious error messages if the default browser doesn't provide DDE interface. Also use SEE_MASK_FLAG_NO_UI to avoid shell error messages as we give them ourselves. Backport of r55594 from trunk. Closes #9948. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -761,13 +761,11 @@ static bool wxLaunchDefaultBrowserBaseImpl(const wxString& url, int flags)
|
|||||||
wxRegKey keyDDE(key, wxT("DDEExec"));
|
wxRegKey keyDDE(key, wxT("DDEExec"));
|
||||||
if ( keyDDE.Exists() )
|
if ( keyDDE.Exists() )
|
||||||
{
|
{
|
||||||
const wxString ddeTopic = wxRegKey(keyDDE, wxT("topic"));
|
|
||||||
|
|
||||||
// we only know the syntax of WWW_OpenURL DDE request for IE,
|
// we only know the syntax of WWW_OpenURL DDE request for IE,
|
||||||
// optimistically assume that all other browsers are compatible
|
// optimistically assume that all other browsers are compatible
|
||||||
// with it
|
// with it
|
||||||
wxString ddeCmd;
|
wxRegKey keyTopic(keyDDE, wxT("topic"));
|
||||||
bool ok = ddeTopic == wxT("WWW_OpenURL");
|
bool ok = keyTopic.Exists() && keyTopic == wxT("WWW_OpenURL");
|
||||||
if ( ok )
|
if ( ok )
|
||||||
{
|
{
|
||||||
ddeCmd = keyDDE.QueryDefaultValue();
|
ddeCmd = keyDDE.QueryDefaultValue();
|
||||||
@@ -814,6 +812,7 @@ static bool wxLaunchDefaultBrowserBaseImpl(const wxString& url, int flags)
|
|||||||
sei.lpFile = url.c_str();
|
sei.lpFile = url.c_str();
|
||||||
sei.lpVerb = _T("open");
|
sei.lpVerb = _T("open");
|
||||||
sei.nShow = SW_SHOWNORMAL;
|
sei.nShow = SW_SHOWNORMAL;
|
||||||
|
sei.fMask = SEE_MASK_FLAG_NO_UI; // we give error message ourselves
|
||||||
|
|
||||||
BOOL nExecResult = ::ShellExecuteEx(&sei);
|
BOOL nExecResult = ::ShellExecuteEx(&sei);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user