Commit 9072dbd2 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

shell32/tests: Add a test for the size of the icon returned by ExtractIcons().

parent 6c7760f2
TESTDLL = shell32.dll
IMPORTS = shell32 ole32 oleaut32 user32 advapi32
IMPORTS = shell32 ole32 oleaut32 user32 gdi32 advapi32
C_SRCS = \
appbar.c \
......
......@@ -1159,6 +1159,8 @@ static void test_ExtractIcon(void)
char path[MAX_PATH];
HANDLE file;
int r;
ICONINFO info;
BITMAP bm;
/* specified instance handle */
hicon = ExtractIconA(GetModuleHandleA("shell32.dll"), NULL, 0);
......@@ -1214,6 +1216,10 @@ if (0)
/* existing index */
hicon = ExtractIconW(NULL, shell32W, 0);
ok(hicon != NULL && HandleToLong(hicon) != -1, "Got icon %p\n", hicon);
GetIconInfo(hicon, &info);
GetObjectW(info.hbmColor, sizeof(bm), &bm);
ok(bm.bmWidth == GetSystemMetrics(SM_CXICON), "got %d\n", bm.bmWidth);
ok(bm.bmHeight == GetSystemMetrics(SM_CYICON), "got %d\n", bm.bmHeight);
DestroyIcon(hicon);
/* returns number of resources */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment