Commit f2bf0227 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

user32: Do not return the class icon when ICON_SMALL2 is requested.

parent f4c59406
...@@ -640,8 +640,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa ...@@ -640,8 +640,6 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
break; break;
case ICON_SMALL2: case ICON_SMALL2:
ret = wndPtr->hIconSmall; ret = wndPtr->hIconSmall;
if (!ret) ret = (HICON)GetClassLongPtrW( hwnd, GCLP_HICONSM );
/* FIXME: should have a default here if class icon is null */
break; break;
default: default:
ret = 0; ret = 0;
......
...@@ -1002,6 +1002,13 @@ static void test_icons(void) ...@@ -1002,6 +1002,13 @@ static void test_icons(void)
hsmicon = (HICON)GetClassLongPtrW(hwnd, GCLP_HICONSM); hsmicon = (HICON)GetClassLongPtrW(hwnd, GCLP_HICONSM);
ok(hsmicon != NULL, "GetClassLong should return non-zero handle\n"); ok(hsmicon != NULL, "GetClassLong should return non-zero handle\n");
ok(SendMessageA(hwnd, WM_GETICON, ICON_BIG, 0) == 0,
"WM_GETICON with ICON_BIG should not return the class icon\n");
ok(SendMessageA(hwnd, WM_GETICON, ICON_SMALL, 0) == 0,
"WM_GETICON with ICON_SMALL should not return the class icon\n");
ok(SendMessageA(hwnd, WM_GETICON, ICON_SMALL2, 0) == 0,
"WM_GETICON with ICON_SMALL2 should not return the class icon\n");
hsmallnew = CopyImage(wcex.hIcon, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), hsmallnew = CopyImage(wcex.hIcon, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON), 0); GetSystemMetrics(SM_CYSMICON), 0);
ok(!SetClassLongPtrW(hwnd, GCLP_HICONSM, (LONG_PTR)hsmallnew), ok(!SetClassLongPtrW(hwnd, GCLP_HICONSM, (LONG_PTR)hsmallnew),
......
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