mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[BROWSEUI]
* Do not set the imagelist if the bitmap wasn't loaded. * Fix the flags that caused the toolbar not to relocate when toggling the lock mode. svn path=/branches/shell-experiments/; revision=63114
This commit is contained in:
@@ -849,7 +849,7 @@ HRESULT STDMETHODCALLTYPE CInternetToolbar::InitNew()
|
||||
hResult = CreateToolsBar(&toolsBar);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
AddDockItem(toolsBar, ITBBID_TOOLSBAND, CDockSite::ITF_NOTITLE | CDockSite::ITF_NEWBANDALWAYS);
|
||||
AddDockItem(toolsBar, ITBBID_TOOLSBAND, CDockSite::ITF_NOTITLE | CDockSite::ITF_NEWBANDALWAYS | CDockSite::ITF_GRIPPERALWAYS);
|
||||
fControlsBar.Attach(toolsBar.Detach()); // transfer the ref count
|
||||
hResult = fControlsBar->QueryInterface(IID_PPV_ARG(IOleWindow, &toolbarOleWindow));
|
||||
if (FAILED(hResult))
|
||||
@@ -862,7 +862,7 @@ HRESULT STDMETHODCALLTYPE CInternetToolbar::InitNew()
|
||||
hResult = CreateAddressBand(&navigationBar);
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
AddDockItem(navigationBar, ITBBID_ADDRESSBAND, CDockSite::ITF_NEWBANDALWAYS);
|
||||
AddDockItem(navigationBar, ITBBID_ADDRESSBAND, CDockSite::ITF_NEWBANDALWAYS | CDockSite::ITF_GRIPPERALWAYS);
|
||||
hResult = navigationBar->QueryInterface(IID_PPV_ARG(IOleWindow, &navigationOleWindow));
|
||||
hResult = navigationOleWindow->GetWindow(&fNavigationWindow);
|
||||
fNavigationBar.Attach(navigationBar.Detach());
|
||||
|
||||
@@ -278,14 +278,17 @@ HRESULT STDMETHODCALLTYPE CToolsBand::SetSite(IUnknown* pUnkSite)
|
||||
LoadImage(shell32Instance, MAKEINTRESOURCE(214),
|
||||
IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_CREATEDIBSECTION));
|
||||
|
||||
DIBSECTION bitmapInfo;
|
||||
GetObjectW(imageBitmap, sizeof(bitmapInfo), &bitmapInfo);
|
||||
HIMAGELIST imageList = ImageList_Create(bitmapInfo.dsBm.bmHeight, bitmapInfo.dsBm.bmHeight, ILC_COLOR32, 4, 4);
|
||||
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);
|
||||
ImageList_Add(imageList, imageBitmap, NULL);
|
||||
DeleteObject(imageBitmap);
|
||||
|
||||
SendMessage(TB_SETIMAGELIST, 0, (LPARAM)imageList);
|
||||
SendMessage(TB_SETIMAGELIST, 0, (LPARAM) imageList);
|
||||
}
|
||||
|
||||
SendMessage(TB_ADDBUTTONSW, numShownButtons, (LPARAM)&tbButtonsAdd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user