From: Mark Harmstone Subject: [PATCH] user32: Specify size for default window icon in NC_IconForWindow. Message-Id: <55BCD1A1.3000209@burntcomma.com> Date: Sat, 1 Aug 2015 15:03:13 +0100 If no size is specified when loading an icon, LoadImageW loads the first one it comes across. If SM_CXSMICON is more than 16, this means the default window icon will be an upscaled version of the 16x16 icon, rather than the native one if it exists. --- dlls/user32/nonclient.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 11b8d08..1267ab6 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -172,7 +172,8 @@ static HICON NC_IconForWindow( HWND hwnd ) * get the default one. */ if (!hIcon && (GetWindowLongW( hwnd, GWL_STYLE ) & DS_MODALFRAME)) - hIcon = LoadImageW(0, (LPCWSTR)IDI_WINLOGO, IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR); + hIcon = LoadImageW(0, (LPCWSTR)IDI_WINLOGO, IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), + GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR); return hIcon; }