From: David Quintana Date: Thu, 22 May 2014 21:35:23 +0000 (+0000) Subject: [BROWSEUI] X-Git-Tag: backups/shell-experiments@75904~238 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=0acd44c3d7681f4ea90823d1aedae4afd54e7fcb [BROWSEUI] * Also load and use the "hot" toolbar bitmap from shell32.dll, not just the normal one. svn path=/branches/shell-experiments/; revision=63419 --- diff --git a/dll/win32/browseui/toolsband.cpp b/dll/win32/browseui/toolsband.cpp index 8cd95bbf92f..31376c415d6 100644 --- a/dll/win32/browseui/toolsband.cpp +++ b/dll/win32/browseui/toolsband.cpp @@ -274,20 +274,31 @@ HRESULT STDMETHODCALLTYPE CToolsBand::SetSite(IUnknown* pUnkSite) TBSTYLE_EX_HIDECLIPPEDBUTTONS | TBSTYLE_EX_MIXEDBUTTONS | TBSTYLE_EX_DRAWDDARROWS); HINSTANCE shell32Instance = GetModuleHandle(_T("shell32.dll")); - HBITMAP imageBitmap = reinterpret_cast( + HBITMAP imgNormal = reinterpret_cast( LoadImage(shell32Instance, MAKEINTRESOURCE(214), IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION)); - if (imageBitmap) + HBITMAP imgHot = reinterpret_cast( + LoadImage(shell32Instance, MAKEINTRESOURCE(215), + IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION)); + + if (imgNormal && imgHot) { - DIBSECTION bitmapInfo; - GetObjectW(imageBitmap, sizeof(bitmapInfo), &bitmapInfo); - HIMAGELIST imageList = ImageList_Create(bitmapInfo.dsBm.bmHeight, bitmapInfo.dsBm.bmHeight, ILC_COLOR32, 4, 4); + 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(imageList, imageBitmap, NULL); - DeleteObject(imageBitmap); + ImageList_Add(himlHot, imgHot, NULL); + DeleteObject(imgHot); - SendMessage(TB_SETIMAGELIST, 0, (LPARAM) imageList); + SendMessage(TB_SETIMAGELIST, 0, (LPARAM) himlNormal); + SendMessage(TB_SETHOTIMAGELIST, 0, (LPARAM) himlHot); } SendMessage(TB_ADDBUTTONSW, numShownButtons, (LPARAM)&tbButtonsAdd);