Author: tfaber
Date: Tue Feb 17 12:59:22 2015
New Revision: 66333
URL:
http://svn.reactos.org/svn/reactos?rev=66333&view=rev
Log:
[EXPLORER]
- Load default application icon and display it in the taskbar for windows that have no
icon. Fixes "GetIconInfo failed" debug prints all over the place (and looks
prettier).
CORE-9211 #resolve
Modified:
trunk/reactos/base/shell/explorer/taskswnd.cpp
Modified: trunk/reactos/base/shell/explorer/taskswnd.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/tasksw…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskswnd.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/taskswnd.cpp [iso-8859-1] Tue Feb 17 12:59:22 2015
@@ -419,6 +419,8 @@
}
icon = GetWndIcon(TaskItem->hWnd);
+ if (!icon)
+ icon = static_cast<HICON>(LoadImage(NULL, MAKEINTRESOURCE(OIC_SAMPLE),
IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTSIZE));
TaskItem->IconIndex = ImageList_ReplaceIcon(m_ImageList,
TaskItem->IconIndex, icon);
tbbi.iImage = TaskItem->IconIndex;
@@ -562,6 +564,8 @@
}
icon = GetWndIcon(TaskItem->hWnd);
+ if (!icon)
+ icon = static_cast<HICON>(LoadImage(NULL, MAKEINTRESOURCE(OIC_SAMPLE),
IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTSIZE));
TaskItem->IconIndex = ImageList_ReplaceIcon(m_ImageList, -1, icon);
tbBtn.iBitmap = TaskItem->IconIndex;