// Created: 23.09.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence: wxWindows license (part of wxExtra library)
+// Licence: wxWindows licence (part of wxExtra library)
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
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
bool wxFileTypeImpl::GetIcon(wxIcon *icon,
wxString *iconFile,
- int *iconIndex) const
+ int *iconIndex,
+ int iconSize) const
{
#if wxUSE_GUI
wxString strIconKey;
// here we need C based counting!
int nIndex = wxAtoi(strIndex);
- HICON hIcon = ExtractIcon(GetModuleHandle(NULL), strExpPath, nIndex);
+ HICON hIcon, hIconLarge, hIconSmall;
+ ExtractIconEx(strExpPath, nIndex, &hIconLarge, &hIconSmall, 1);
+
+ hIcon = (iconSize == wxICON_LARGE) ? hIconLarge : hIconSmall;
+
+
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/...