mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 12:26:32 +00:00
[USER32] Hackfix for CORE-17902 - The cursoricon (copyimage) that returns NULL to render - LR_COPYFROMRESOURCE (#6886)
* [USER32] Hackfix for CORE-17902 - The cursoricon (copyimage) that returns NULL to render - LR_COPYFROMRESOURCE --------- Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
This commit is contained in:
parent
32e65f2f8d
commit
d3ec7cdd48
|
@ -2044,7 +2044,15 @@ HANDLE WINAPI CopyImage(
|
|||
return BITMAP_CopyImage(hImage, cxDesired, cyDesired, fuFlags);
|
||||
case IMAGE_CURSOR:
|
||||
case IMAGE_ICON:
|
||||
return CURSORICON_CopyImage(hImage, uType == IMAGE_ICON, cxDesired, cyDesired, fuFlags);
|
||||
/* HACK: Copying bitmaps with LR_COPYFROMRESOURCE flag fails. CORE-17902.
|
||||
* This is a way to return the original bit map if we need
|
||||
* the icons to show up. We need a simpler test. */
|
||||
{
|
||||
HANDLE handle = CURSORICON_CopyImage(hImage, uType == IMAGE_ICON, cxDesired, cyDesired, fuFlags);
|
||||
if (!handle && (fuFlags & (LR_COPYFROMRESOURCE|LR_COPYRETURNORG)))
|
||||
handle = CURSORICON_CopyImage(hImage, uType == IMAGE_ICON, cxDesired, cyDesired, (fuFlags & ~LR_COPYFROMRESOURCE));
|
||||
return handle;
|
||||
}
|
||||
default:
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue