Commit 24a3ae06 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

If a color bitmap is provided, store bitmap information from it

instead of the mask bitmap one.
parent 68b8a4ab
......@@ -1840,11 +1840,22 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo)
info->ptHotSpot.y = iconinfo->yHotspot;
}
if (iconinfo->hbmColor)
{
info->nWidth = bmpXor.bmWidth;
info->nHeight = bmpXor.bmHeight;
info->nWidthBytes = bmpXor.bmWidthBytes;
info->bPlanes = bmpXor.bmPlanes;
info->bBitsPerPixel = bmpXor.bmBitsPixel;
}
else
{
info->nWidth = bmpAnd.bmWidth;
info->nHeight = iconinfo->hbmColor ? bmpAnd.bmHeight : (bmpAnd.bmHeight / 2);
info->nHeight = bmpAnd.bmHeight / 2;
info->nWidthBytes = bmpAnd.bmWidthBytes;
info->bPlanes = bmpAnd.bmPlanes;
info->bBitsPerPixel = bmpAnd.bmBitsPixel;
}
/* Transfer the bitmap bits to the CURSORICONINFO structure */
......
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