X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..83911a5a4d3be63141419b4401259093514794a3:/src/msw/mimetype.cpp diff --git a/src/msw/mimetype.cpp b/src/msw/mimetype.cpp index d69a196151..a453c99079 100644 --- a/src/msw/mimetype.cpp +++ b/src/msw/mimetype.cpp @@ -20,7 +20,9 @@ #pragma hdrstop #endif -// this is Win32 only code +#if wxUSE_MIMETYPE + +// Doesn't compile in WIN16 mode #ifndef __WIN16__ #ifndef WX_PRECOMP @@ -39,7 +41,7 @@ #ifdef __WXMSW__ #include "wx/msw/registry.h" - #include "windows.h" + #include "wx/msw/private.h" #endif // OS #include "wx/msw/mimetype.h" @@ -86,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"); } } @@ -235,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 @@ -372,6 +377,8 @@ bool wxFileTypeImpl::GetIcon(wxIcon *icon, default: icon->SetHICON((WXHICON)hIcon); + wxSize size = wxGetHiconSize(hIcon); + icon->SetSize(size); if ( iconIndex ) *iconIndex = nIndex; if ( iconFile ) @@ -827,3 +834,5 @@ bool wxFileTypeImpl::RemoveDescription() #endif // __WIN16__ + +#endif // wxUSE_MIMETYPE