reinitialize image list in ShellBrowser::invalidate_cache()
Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp
_____
Modified: trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp
--- trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp
2005-12-28 22:45:04 UTC (rev 20406)
+++ trunk/reactos/subsys/system/explorer/shell/shellbrowser.cpp
2005-12-28 22:46:09 UTC (rev 20407)
@@ -190,8 +190,7 @@
_pDropTarget->Release(); // free TreeDropTarget
_pDropTarget = NULL;
return false;
- }
- else
+ } else
_pDropTarget->Release();
FORMATETC ftetc;
@@ -273,6 +272,12 @@
void ShellBrowser::invalidate_cache()
{
+ (void)TreeView_SetImageList(_left_hwnd, _himl_old,
TVSIL_NORMAL);
+ ImageList_Destroy(_himl);
+
+ _himl_old = TreeView_SetImageList(_left_hwnd, _himl,
TVSIL_NORMAL);
+ _himl = ImageList_Create(GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), ILC_MASK|ILC_COLOR24, 2, 0);
+
for(map<int,int>::const_iterator it=_image_map.begin();
it!=_image_map.end(); ++it)
g_Globals._icon_cache.free_icon(it->first);
Show replies by date