mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:22:57 +00:00
[USER32]
- Implement CopyImage(LR_SHARED) case. CORE-7575 svn path=/trunk/; revision=64919
This commit is contained in:
parent
796aebbf35
commit
f20e2e7a8f
1 changed files with 36 additions and 13 deletions
|
@ -1684,6 +1684,7 @@ CURSORICON_CopyImage(
|
||||||
{
|
{
|
||||||
HICON ret = NULL;
|
HICON ret = NULL;
|
||||||
ICONINFO ii;
|
ICONINFO ii;
|
||||||
|
CURSORDATA CursorData;
|
||||||
|
|
||||||
if (fuFlags & LR_COPYFROMRESOURCE)
|
if (fuFlags & LR_COPYFROMRESOURCE)
|
||||||
{
|
{
|
||||||
|
@ -1769,7 +1770,13 @@ CURSORICON_CopyImage(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the relevant function */
|
/* Call the relevant function */
|
||||||
ret = CURSORICON_LoadImageW(hModule, ustrRsrc.Buffer, cxDesired, cyDesired, fuFlags & LR_DEFAULTSIZE, bIcon);
|
ret = CURSORICON_LoadImageW(
|
||||||
|
hModule,
|
||||||
|
ustrRsrc.Buffer,
|
||||||
|
cxDesired,
|
||||||
|
cyDesired,
|
||||||
|
fuFlags & (LR_DEFAULTSIZE | LR_SHARED),
|
||||||
|
bIcon);
|
||||||
|
|
||||||
FreeLibrary(hModule);
|
FreeLibrary(hModule);
|
||||||
|
|
||||||
|
@ -1784,7 +1791,7 @@ CURSORICON_CopyImage(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is a regular copy */
|
/* This is a regular copy */
|
||||||
if(fuFlags & ~LR_COPYDELETEORG)
|
if (fuFlags & ~(LR_COPYDELETEORG | LR_SHARED))
|
||||||
FIXME("Unimplemented flags: 0x%08x\n", fuFlags);
|
FIXME("Unimplemented flags: 0x%08x\n", fuFlags);
|
||||||
|
|
||||||
if (!GetIconInfo(hicon, &ii))
|
if (!GetIconInfo(hicon, &ii))
|
||||||
|
@ -1793,8 +1800,24 @@ CURSORICON_CopyImage(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = CreateIconIndirect(&ii);
|
/* This is CreateIconIndirect with the LR_SHARED coat added */
|
||||||
|
if (!CURSORICON_GetCursorDataFromIconInfo(&CursorData, &ii))
|
||||||
|
goto Leave;
|
||||||
|
|
||||||
|
if (fuFlags & LR_SHARED)
|
||||||
|
CursorData.CURSORF_flags |= CURSORF_LRSHARED;
|
||||||
|
|
||||||
|
ret = NtUserxCreateEmptyCurObject(FALSE);
|
||||||
|
if (!ret)
|
||||||
|
goto Leave;
|
||||||
|
|
||||||
|
if (!NtUserSetCursorIconData(ret, NULL, NULL, &CursorData))
|
||||||
|
{
|
||||||
|
NtUserDestroyCursor(ret, TRUE);
|
||||||
|
goto Leave;
|
||||||
|
}
|
||||||
|
|
||||||
|
Leave:
|
||||||
DeleteObject(ii.hbmMask);
|
DeleteObject(ii.hbmMask);
|
||||||
if (ii.hbmColor) DeleteObject(ii.hbmColor);
|
if (ii.hbmColor) DeleteObject(ii.hbmColor);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue