Commit 21b94d4c authored by Oleg Krylov's avatar Oleg Krylov Committed by Alexandre Julliard

comctl32: Correctly map toolbar bitmap mask color in case of non-default color scheme.

parent 9edcd1c1
...@@ -2689,48 +2689,48 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2689,48 +2689,48 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
switch (lpAddBmp->nID) switch (lpAddBmp->nID)
{ {
case IDB_STD_SMALL_COLOR: case IDB_STD_SMALL_COLOR:
hbmLoad = LoadBitmapW (COMCTL32_hModule, hbmLoad = CreateMappedBitmap (COMCTL32_hModule,
MAKEINTRESOURCEW(IDB_STD_SMALL)); IDB_STD_SMALL, 0, NULL, 0);
nIndex = ImageList_AddMasked (himlDef, nIndex = ImageList_AddMasked (himlDef,
hbmLoad, comctl32_color.clrBtnFace); hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad); DeleteObject (hbmLoad);
break; break;
case IDB_STD_LARGE_COLOR: case IDB_STD_LARGE_COLOR:
hbmLoad = LoadBitmapW (COMCTL32_hModule, hbmLoad = CreateMappedBitmap (COMCTL32_hModule,
MAKEINTRESOURCEW(IDB_STD_LARGE)); IDB_STD_LARGE, 0, NULL, 0);
nIndex = ImageList_AddMasked (himlDef, nIndex = ImageList_AddMasked (himlDef,
hbmLoad, comctl32_color.clrBtnFace); hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad); DeleteObject (hbmLoad);
break; break;
case IDB_VIEW_SMALL_COLOR: case IDB_VIEW_SMALL_COLOR:
hbmLoad = LoadBitmapW (COMCTL32_hModule, hbmLoad = CreateMappedBitmap (COMCTL32_hModule,
MAKEINTRESOURCEW(IDB_VIEW_SMALL)); IDB_VIEW_SMALL, 0, NULL, 0);
nIndex = ImageList_AddMasked (himlDef, nIndex = ImageList_AddMasked (himlDef,
hbmLoad, comctl32_color.clrBtnFace); hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad); DeleteObject (hbmLoad);
break; break;
case IDB_VIEW_LARGE_COLOR: case IDB_VIEW_LARGE_COLOR:
hbmLoad = LoadBitmapW (COMCTL32_hModule, hbmLoad = CreateMappedBitmap (COMCTL32_hModule,
MAKEINTRESOURCEW(IDB_VIEW_LARGE)); IDB_VIEW_LARGE, 0, NULL, 0);
nIndex = ImageList_AddMasked (himlDef, nIndex = ImageList_AddMasked (himlDef,
hbmLoad, comctl32_color.clrBtnFace); hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad); DeleteObject (hbmLoad);
break; break;
case IDB_HIST_SMALL_COLOR: case IDB_HIST_SMALL_COLOR:
hbmLoad = LoadBitmapW (COMCTL32_hModule, hbmLoad = CreateMappedBitmap (COMCTL32_hModule,
MAKEINTRESOURCEW(IDB_HIST_SMALL)); IDB_HIST_SMALL, 0, NULL, 0);
nIndex = ImageList_AddMasked (himlDef, nIndex = ImageList_AddMasked (himlDef,
hbmLoad, comctl32_color.clrBtnFace); hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad); DeleteObject (hbmLoad);
break; break;
case IDB_HIST_LARGE_COLOR: case IDB_HIST_LARGE_COLOR:
hbmLoad = LoadBitmapW (COMCTL32_hModule, hbmLoad = CreateMappedBitmap (COMCTL32_hModule,
MAKEINTRESOURCEW(IDB_HIST_LARGE)); IDB_HIST_LARGE, 0, NULL, 0);
nIndex = ImageList_AddMasked (himlDef, nIndex = ImageList_AddMasked (himlDef,
hbmLoad, comctl32_color.clrBtnFace); hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad); DeleteObject (hbmLoad);
...@@ -2744,7 +2744,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2744,7 +2744,7 @@ TOOLBAR_AddBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
} }
else else
{ {
hbmLoad = LoadBitmapW (lpAddBmp->hInst, (LPWSTR)lpAddBmp->nID); hbmLoad = CreateMappedBitmap(lpAddBmp->hInst, lpAddBmp->nID, 0, NULL, 0);
nIndex = ImageList_AddMasked (himlDef, hbmLoad, comctl32_color.clrBtnFace); nIndex = ImageList_AddMasked (himlDef, hbmLoad, comctl32_color.clrBtnFace);
DeleteObject (hbmLoad); DeleteObject (hbmLoad);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment