user32: Pass correct flags in CreateIconFromResource().

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ziqing Hui 2021-12-09 11:20:56 +08:00 committed by Alexandre Julliard
parent 3b26e293bc
commit d112d746c7
2 changed files with 1 additions and 9 deletions

View file

@ -1592,7 +1592,7 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize,
HICON WINAPI CreateIconFromResource( LPBYTE bits, UINT cbSize,
BOOL bIcon, DWORD dwVersion)
{
return CreateIconFromResourceEx( bits, cbSize, bIcon, dwVersion, 0,0,0);
return CreateIconFromResourceEx( bits, cbSize, bIcon, dwVersion, 0, 0, LR_DEFAULTSIZE | LR_SHARED );
}

View file

@ -1595,10 +1595,8 @@ static void test_CreateIconFromResource(void)
/* Test the icon information. */
SetLastError(0xdeadbeef);
ret = GetIconInfo(handle, &icon_info);
todo_wine
ok(ret, "GetIconInfo() failed.\n");
error = GetLastError();
todo_wine
ok(error == 0xdeadbeef, "Last error: %u\n", error);
if (ret)
@ -1616,14 +1614,10 @@ static void test_CreateIconFromResource(void)
ICONINFOEXA infoex;
infoex.cbSize = sizeof(infoex);
ret = pGetIconInfoExA( handle, &infoex );
todo_wine
ok( ret, "GetIconInfoEx failed err %d\n", GetLastError() );
if (ret)
{
ok( infoex.wResID == 0, "GetIconInfoEx wrong resid %x\n", infoex.wResID );
ok( infoex.szModName[0] == 0, "GetIconInfoEx wrong module %s\n", infoex.szModName );
ok( infoex.szResName[0] == 0, "GetIconInfoEx wrong name %s\n", infoex.szResName );
}
}
/* Test creating an icon. */
@ -1637,10 +1631,8 @@ static void test_CreateIconFromResource(void)
/* Test the icon information. */
SetLastError(0xdeadbeef);
ret = GetIconInfo(handle, &icon_info);
todo_wine
ok(ret, "GetIconInfo() failed.\n");
error = GetLastError();
todo_wine
ok(error == 0xdeadbeef, "Last error: %u\n", error);
if (ret)