mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[BROWSEUI]
* Also load and use the "hot" toolbar bitmap from shell32.dll, not just the normal one. svn path=/branches/shell-experiments/; revision=63419
This commit is contained in:
parent
d36426f9c0
commit
0acd44c3d7
1 changed files with 19 additions and 8 deletions
|
@ -274,20 +274,31 @@ HRESULT STDMETHODCALLTYPE CToolsBand::SetSite(IUnknown* pUnkSite)
|
||||||
TBSTYLE_EX_HIDECLIPPEDBUTTONS | TBSTYLE_EX_MIXEDBUTTONS | TBSTYLE_EX_DRAWDDARROWS);
|
TBSTYLE_EX_HIDECLIPPEDBUTTONS | TBSTYLE_EX_MIXEDBUTTONS | TBSTYLE_EX_DRAWDDARROWS);
|
||||||
|
|
||||||
HINSTANCE shell32Instance = GetModuleHandle(_T("shell32.dll"));
|
HINSTANCE shell32Instance = GetModuleHandle(_T("shell32.dll"));
|
||||||
HBITMAP imageBitmap = reinterpret_cast<HBITMAP>(
|
HBITMAP imgNormal = reinterpret_cast<HBITMAP>(
|
||||||
LoadImage(shell32Instance, MAKEINTRESOURCE(214),
|
LoadImage(shell32Instance, MAKEINTRESOURCE(214),
|
||||||
IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION));
|
IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION));
|
||||||
|
|
||||||
if (imageBitmap)
|
HBITMAP imgHot = reinterpret_cast<HBITMAP>(
|
||||||
|
LoadImage(shell32Instance, MAKEINTRESOURCE(215),
|
||||||
|
IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION));
|
||||||
|
|
||||||
|
if (imgNormal && imgHot)
|
||||||
{
|
{
|
||||||
DIBSECTION bitmapInfo;
|
BITMAP bitmapInfo;
|
||||||
GetObjectW(imageBitmap, sizeof(bitmapInfo), &bitmapInfo);
|
GetObjectW(imgNormal, sizeof(bitmapInfo), &bitmapInfo);
|
||||||
HIMAGELIST imageList = ImageList_Create(bitmapInfo.dsBm.bmHeight, bitmapInfo.dsBm.bmHeight, ILC_COLOR32, 4, 4);
|
HIMAGELIST himlNormal = ImageList_Create(bitmapInfo.bmHeight, bitmapInfo.bmHeight, ILC_COLOR32, 4, 4);
|
||||||
|
|
||||||
ImageList_Add(imageList, imageBitmap, NULL);
|
ImageList_Add(himlNormal, imgNormal, NULL);
|
||||||
DeleteObject(imageBitmap);
|
DeleteObject(imgNormal);
|
||||||
|
|
||||||
SendMessage(TB_SETIMAGELIST, 0, (LPARAM) imageList);
|
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);
|
SendMessage(TB_ADDBUTTONSW, numShownButtons, (LPARAM)&tbButtonsAdd);
|
||||||
|
|
Loading…
Reference in a new issue