It's been a decade now (and two major Windows versions) since Microsoft shrunk the "big" taskbar icons (introduced in Windows 7) from 32×32 to 24×24, without providing an option for unpackaged applications to properly set a 24×24 icon to a window (WM_SETICON
still accepts only two values for wParam
, etc.).
This is further complicated by the fact that according to GetSystemMetrics(SM_CXICON)
, the official size of a "big" icon is still 32×32.
Has the situation improved in any way since then? Is there any API through which a classic Windows API application can have all its icons work correctly in a native resolution?
You can ask LoadImage
for the 24×24 version, set this into ICON_BIG
.
LoadIcon
has been superseded by the LoadImage
function (with LR_DEFAULTSIZE
and LR_SHARED
flags set). Cx\Cy
in function LoadImage
, If this parameter is zero and LR_DEFAULTSIZE
is not used, the function uses the actual resource height\width.