If a color bitmap is provided, store bitmap information from it
instead of the mask bitmap one.
This commit is contained in:
parent
68b8a4ab69
commit
24a3ae0601
@ -1831,20 +1831,31 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo)
|
|||||||
/* If we are creating an icon, the hotspot is unused */
|
/* If we are creating an icon, the hotspot is unused */
|
||||||
if (iconinfo->fIcon)
|
if (iconinfo->fIcon)
|
||||||
{
|
{
|
||||||
info->ptHotSpot.x = ICON_HOTSPOT;
|
info->ptHotSpot.x = ICON_HOTSPOT;
|
||||||
info->ptHotSpot.y = ICON_HOTSPOT;
|
info->ptHotSpot.y = ICON_HOTSPOT;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
info->ptHotSpot.x = iconinfo->xHotspot;
|
info->ptHotSpot.x = iconinfo->xHotspot;
|
||||||
info->ptHotSpot.y = iconinfo->yHotspot;
|
info->ptHotSpot.y = iconinfo->yHotspot;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->nWidth = bmpAnd.bmWidth;
|
if (iconinfo->hbmColor)
|
||||||
info->nHeight = iconinfo->hbmColor ? bmpAnd.bmHeight : (bmpAnd.bmHeight / 2);
|
{
|
||||||
info->nWidthBytes = bmpAnd.bmWidthBytes;
|
info->nWidth = bmpXor.bmWidth;
|
||||||
info->bPlanes = bmpAnd.bmPlanes;
|
info->nHeight = bmpXor.bmHeight;
|
||||||
info->bBitsPerPixel = bmpAnd.bmBitsPixel;
|
info->nWidthBytes = bmpXor.bmWidthBytes;
|
||||||
|
info->bPlanes = bmpXor.bmPlanes;
|
||||||
|
info->bBitsPerPixel = bmpXor.bmBitsPixel;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
info->nWidth = bmpAnd.bmWidth;
|
||||||
|
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 */
|
/* Transfer the bitmap bits to the CURSORICONINFO structure */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user