Don't use DDEExec registry key in wxMSW wxExecute() if it's empty.
Some file types have DDEExec subkey in the registry but no value for it, don't use DDE for launching the files of these types in this case as this only results in errors. Closes #15388. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -574,6 +574,7 @@ All (GUI):
|
||||
wxMSW:
|
||||
|
||||
- It is now possible to tab into radio boxes again.
|
||||
- Fix launching some types of files under Windows 7 and later (Steven Houchins).
|
||||
|
||||
wxOSX:
|
||||
|
||||
|
@@ -291,6 +291,10 @@ wxString wxFileTypeImpl::GetCommand(const wxString& verb) const
|
||||
if ( keyDDE.Open(wxRegKey::Read) ) {
|
||||
wxString ddeCommand, ddeServer, ddeTopic;
|
||||
keyDDE.QueryValue(wxEmptyString, ddeCommand);
|
||||
|
||||
// in some cases "DDEExec" subkey exists but has no value, we
|
||||
// shouldn't use DDE in this case
|
||||
if ( !ddeCommand.empty() ) {
|
||||
ddeCommand.Replace(wxT("%1"), wxT("%s"));
|
||||
|
||||
wxRegKey keyServer(wxRegKey::HKCR, strKey + wxT("\\Application"));
|
||||
@@ -309,6 +313,7 @@ wxString wxFileTypeImpl::GetCommand(const wxString& verb) const
|
||||
<< wxT('#') << ddeTopic
|
||||
<< wxT('#') << ddeCommand;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif // wxUSE_IPC
|
||||
if ( !foundFilename )
|
||||
|
Reference in New Issue
Block a user