I have no experience with the Win32 API or anything, but I'm under the impression that when an icon is embedded in an .exe, Windows will automatically use the icons it contains in the following places (maybe more):
1) Windows Explorer
2) The Taskbar
3) The top-left corner of the application window
4) The box that appears when you hold Alt+Tab
However, when I try embedding an .ico file in my SFML program's .exe using Resource Hacker, it only appears in Windows Explorer and the Taskbar, not in the application window or the Alt-Tab box.
Is this actually standard Windows behavior, and I'm supposed to use setIcon() to get uses 3 and 4 to work? Or is SFML actively setting its windows' icons to the OS default instead of letting Windows use the embedded icons?
I have tried setIcon(), and it does work, but it's not a complete solution because it only accepts a single array of pixels rather than an .ico file. Since icon uses 2, 3 and 4--the ones that setIcon() seems to affect--often require different sizes, that one array of pixels ends up getting upscaled or downscaled, both of which look quite bad. Is there some workaround for this?
I've also seen the wiki tutorial on embedding the pixel array into your source code, but that won't make the icon appear in Windows Explorer (...right?) and it can't get around the fact that getIcon() only takes one array so that doesn't seem like a solution either.
Of course, this is a very minor problem in the grand scheme of things, and aside from this I'm absolutely loving SFML as a library and am almost done with my first big program in it (which is why I'm trying to add niceties like icons now). So I won't be devastated if there is no good general solution.
I've been using Microsoft Visual C++ 2010 Express, dynamically linking SFML for debug builds and statically linking for release builds (for some reason the debug build is unbearably slow with static linking) on Windows 7 Professional 64-bit. Same behavior on both builds. I've never used Mac OS X or Linux much, so I know nothing about how they deal with windows and icons, so maybe I'm unaware of some portability issues that affect this.