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?
- The EXE icon supporting all resolutions the Windows Explorer can show a file at
- The small 16×16 icon in the window titlebar
- The 24×24 icon in the taskbar
- I was about to mention the alt-tab window, but apparently in 10 and above it too switched from 32×32 icons to 24×24 ones
You can ask
LoadImagefor the 24×24 version, set this intoICON_BIG.LoadIconhas been superseded by theLoadImagefunction (withLR_DEFAULTSIZEandLR_SHAREDflags set).Cx\Cyin functionLoadImage, If this parameter is zero andLR_DEFAULTSIZEis not used, the function uses the actual resource height\width.