Author: dquintana
Date: Thu May 22 21:35:23 2014
New Revision: 63419
URL:
http://svn.reactos.org/svn/reactos?rev=63419&view=rev
Log:
[BROWSEUI]
* Also load and use the "hot" toolbar bitmap from shell32.dll, not just the
normal one.
Modified:
branches/shell-experiments/dll/win32/browseui/toolsband.cpp
Modified: branches/shell-experiments/dll/win32/browseui/toolsband.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/toolsband.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/browseui/toolsband.cpp [iso-8859-1] Thu May 22
21:35:23 2014
@@ -274,20 +274,31 @@
TBSTYLE_EX_HIDECLIPPEDBUTTONS | TBSTYLE_EX_MIXEDBUTTONS |
TBSTYLE_EX_DRAWDDARROWS);
HINSTANCE shell32Instance = GetModuleHandle(_T("shell32.dll"));
- HBITMAP imageBitmap = reinterpret_cast<HBITMAP>(
+ HBITMAP imgNormal = reinterpret_cast<HBITMAP>(
LoadImage(shell32Instance, MAKEINTRESOURCE(214),
IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION));
- if (imageBitmap)
- {
- DIBSECTION bitmapInfo;
- GetObjectW(imageBitmap, sizeof(bitmapInfo), &bitmapInfo);
- HIMAGELIST imageList = ImageList_Create(bitmapInfo.dsBm.bmHeight,
bitmapInfo.dsBm.bmHeight, ILC_COLOR32, 4, 4);
-
- ImageList_Add(imageList, imageBitmap, NULL);
- DeleteObject(imageBitmap);
-
- SendMessage(TB_SETIMAGELIST, 0, (LPARAM) imageList);
+ HBITMAP imgHot = reinterpret_cast<HBITMAP>(
+ LoadImage(shell32Instance, MAKEINTRESOURCE(215),
+ IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION));
+
+ if (imgNormal && imgHot)
+ {
+ BITMAP bitmapInfo;
+ GetObjectW(imgNormal, sizeof(bitmapInfo), &bitmapInfo);
+ HIMAGELIST himlNormal = ImageList_Create(bitmapInfo.bmHeight,
bitmapInfo.bmHeight, ILC_COLOR32, 4, 4);
+
+ ImageList_Add(himlNormal, imgNormal, NULL);
+ DeleteObject(imgNormal);
+
+ GetObjectW(imgHot, sizeof(bitmapInfo), &bitmapInfo);
+ HIMAGELIST himlHot = ImageList_Create(bitmapInfo.bmHeight, bitmapInfo.bmHeight,
ILC_COLOR32, 4, 4);
+
+ ImageList_Add(himlHot, imgHot, NULL);
+ DeleteObject(imgHot);
+
+ SendMessage(TB_SETIMAGELIST, 0, (LPARAM) himlNormal);
+ SendMessage(TB_SETHOTIMAGELIST, 0, (LPARAM) himlHot);
}
SendMessage(TB_ADDBUTTONSW, numShownButtons, (LPARAM)&tbButtonsAdd);