From 69667a5f9be8b1ed8c217ef31c05785114d0ab5b Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 14 May 2011 12:57:52 +0000 Subject: [PATCH] [SHELL32] Owen Rudge : Implement SHGetImageList http://source.winehq.org/git/wine.git/commitdiff/9db87f13d3f0f9e07accc9b5e12dccd202b88156 Fixes explorer++ main window patch provided by igorko svn path=/trunk/; revision=51729 --- reactos/dll/win32/shell32/shellord.c | 35 ++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/shell32/shellord.c b/reactos/dll/win32/shell32/shellord.c index 2559cb6db14..b1f5aed4dba 100644 --- a/reactos/dll/win32/shell32/shellord.c +++ b/reactos/dll/win32/shell32/shellord.c @@ -47,6 +47,7 @@ #include "shlwapi.h" #include "commdlg.h" #include "recyclebin.h" +#include "commoncontrols.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); WINE_DECLARE_DEBUG_CHANNEL(pidl); @@ -2247,10 +2248,40 @@ void WINAPI SHFlushSFCache(void) { } +/************************************************************************* + * SHGetImageList (SHELL32.727) + * + * Returns a copy of a shell image list. + * + * NOTES + * Windows XP features 4 sizes of image list, and Vista 5. Wine currently + * only supports the traditional small and large image lists, so requests + * for the others will currently fail. + */ HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) { - FIXME("STUB: %i %s\n",iImageList,debugstr_guid(riid)); - return E_NOINTERFACE; + HIMAGELIST hLarge, hSmall; + HIMAGELIST hNew; + HRESULT ret = E_FAIL; + + /* Wine currently only maintains large and small image lists */ + if ((iImageList != SHIL_LARGE) && (iImageList != SHIL_SMALL) && (iImageList != SHIL_SYSSMALL)) + { + FIXME("Unsupported image list %i requested\n", iImageList); + return E_FAIL; + } + + Shell_GetImageLists(&hLarge, &hSmall); + hNew = ImageList_Duplicate(iImageList == SHIL_LARGE ? hLarge : hSmall); + + /* Get the interface for the new image list */ + if (hNew) + { + ret = HIMAGELIST_QueryInterface(hNew, riid, ppv); + ImageList_Destroy(hNew); + } + + return ret; } /*************************************************************************