Author: dquintana
Date: Fri May 2 17:25:19 2014
New Revision: 63114
URL:
http://svn.reactos.org/svn/reactos?rev=63114&view=rev
Log:
[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.
Modified:
branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp
branches/shell-experiments/dll/win32/browseui/toolsband.cpp
Modified: branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/browseui/internettoolbar.cpp [iso-8859-1] Fri May
2 17:25:19 2014
@@ -849,7 +849,7 @@
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 = 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());
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] Fri May 2
17:25:19 2014
@@ -278,14 +278,17 @@
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);
-
- ImageList_Add(imageList, imageBitmap, NULL);
- DeleteObject(imageBitmap);
-
- SendMessage(TB_SETIMAGELIST, 0, (LPARAM)imageList);
+ 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);
+ }
SendMessage(TB_ADDBUTTONSW, numShownButtons, (LPARAM)&tbButtonsAdd);