]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mimetype.cpp
don't use GetSelectedInto() in release build
[wxWidgets.git] / src / msw / mimetype.cpp
index 53a0551e81464ef09a9482d966ff07778ff8778a..a453c99079fd80138c9054de71807a9fb1bf9388 100644 (file)
@@ -41,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"
@@ -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
@@ -374,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 )