#pragma hdrstop
#endif
-// this is Win32 only code
+#if wxUSE_MIMETYPE
+
+// Doesn't compile in WIN16 mode
#ifndef __WIN16__
#ifndef WX_PRECOMP
#ifdef __WXMSW__
#include "wx/msw/registry.h"
- #include "windows.h"
+ #include "wx/msw/private.h"
#endif // OS
#include "wx/msw/mimetype.h"
m_strFileType = strFileType;
if ( !strFileType ) {
- m_strFileType = m_ext.AfterFirst('.') + "_auto_file";
+ m_strFileType = m_ext.AfterFirst('.') + _T("_auto_file");
}
}
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
default:
icon->SetHICON((WXHICON)hIcon);
+ wxSize size = wxGetHiconSize(hIcon);
+ icon->SetSize(size);
if ( iconIndex )
*iconIndex = nIndex;
if ( iconFile )
// now make other extensions have the same filetype
-
+
for (iExtCount=1; iExtCount < ftInfo.GetExtensionsCount(); iExtCount++ )
{
ext = ftInfo.GetExtensions()[iExtCount];
// SetCommand(), SetDefaultIcon() &c will use it later)
wxRegKey keyFT(wxRegKey::HKCR, filetype);
ok = keyFT.Create();
-
- wxFileType *ft = NULL;
+
+ wxFileType *ft = NULL;
ft = CreateFileType(filetype, extWithDot);
if (ft)
bool wxFileTypeImpl::SetCommand(const wxString& cmd,
const wxString& verb,
- bool overwriteprompt)
+ bool WXUNUSED(overwriteprompt))
{
wxCHECK_MSG( !m_ext.IsEmpty() && !verb.IsEmpty(), FALSE,
_T("SetCommand() needs an extension and a verb") );
#endif
// __WIN16__
+
+#endif // wxUSE_MIMETYPE