X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6bad4c327cb73463176096cdc8f30e50b6af7978..41b78190adf985fa6e91a34aba76b1693a8ffc72:/src/msw/mimetype.cpp diff --git a/src/msw/mimetype.cpp b/src/msw/mimetype.cpp index c5d5039212..6ce8557e4e 100644 --- a/src/msw/mimetype.cpp +++ b/src/msw/mimetype.cpp @@ -6,7 +6,7 @@ // Created: 23.09.98 // RCS-ID: $Id$ // Copyright: (c) 1998 Vadim Zeitlin -// Licence: wxWindows license (part of wxExtra library) +// Licence: wxWindows licence (part of wxExtra library) ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -88,7 +88,7 @@ void wxFileTypeImpl::Init(const wxString& strFileType, const wxString& ext) m_strFileType = strFileType; if ( !strFileType ) { - m_strFileType = m_ext.AfterFirst('.') + "_auto_file"; + m_strFileType = m_ext.AfterFirst('.') + _T("_auto_file"); } } @@ -237,6 +237,9 @@ wxString wxFileTypeImpl::GetCommand(const wxChar *verb) const wxRegKey(wxRegKey::HKCR, strKey + _T("\\Topic")). QueryValue(_T(""), ddeTopic); + if (ddeTopic.IsEmpty()) + ddeTopic = wxT("System"); + // HACK: we use a special feature of wxExecute which exists // just because we need it here: it will establish DDE // conversation with the program it just launched @@ -365,6 +368,7 @@ bool wxFileTypeImpl::GetIcon(wxIcon *icon, int nIndex = wxAtoi(strIndex); HICON hIcon = ExtractIcon(GetModuleHandle(NULL), strExpPath, nIndex); + switch ( (int)hIcon ) { case 0: // means no icons were found case 1: // means no such file or it wasn't a DLL/EXE/OCX/ICO/...