Applied patch [ 619539 ] patch to get small icon via geticon

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-06-01 13:57:23 +00:00
parent ef094fa075
commit 5c5428f913
7 changed files with 34 additions and 9 deletions

View File

@@ -336,7 +336,8 @@ bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
bool wxFileTypeImpl::GetIcon(wxIcon *icon,
wxString *iconFile,
int *iconIndex) const
int *iconIndex,
int iconSize) const
{
#if wxUSE_GUI
wxString strIconKey;
@@ -367,7 +368,11 @@ bool wxFileTypeImpl::GetIcon(wxIcon *icon,
// 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