[COMCTL32] Fix issue on showing current mouse pointer (#2829)

GetIconInfo() fill info.hbmColor with NULL HBITMAP handle on black/white bitmaps.

CORE-17062
This commit is contained in:
Jose Carlos Jesus 2020-05-21 20:52:13 +01:00 committed by Stanislav Motylkov
parent 685084b63c
commit 887764e607
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92

View file

@ -94,11 +94,24 @@ static BOOL get_icon_size( HICON handle, SIZE *size )
if (!GetIconInfo(handle, &info))
return FALSE;
#ifdef __REACTOS__
ret = GetObjectW(info.hbmMask, sizeof(bmp), &bmp);
#else
ret = GetObjectW(info.hbmColor, sizeof(bmp), &bmp);
#endif
if (ret)
{
size->cx = bmp.bmWidth;
size->cy = bmp.bmHeight;
#ifdef __REACTOS__
/*
If this structure defines a black and white icon, this bitmask is formatted
so that the upper half is the icon AND bitmask and the lower half is
the icon XOR bitmask.
*/
if (!info.hbmColor)
size->cy /= 2;
#endif
}
DeleteObject(info.hbmMask);