user32: Do not return the class icon when ICON_SMALL2 is requested.
This commit is contained in:
parent
f4c5940656
commit
f2bf0227a2
@ -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)
|
|||||||
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),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user