(I\'m using Visual Studio 2008, though I remember having similar problems with older versions as well.)
I\'ve tried several different methods (many of them mentioned
I've revisited this to see if I can close out my question. I have been unable to get the app's icon to show up in the alt-tab list just through embedding it in the executable; it will show up in the taskbar, as the file's icon in Explorer, and elsewhere just fine.
I figured I'd try something simpler for setting the icon manually, and went with LoadIcon()
instead, as the code below shows:
HICON hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON1) );
if( hIcon )
{
SendMessage( GetHandle(), WM_SETICON, ICON_BIG, (LPARAM)hIcon );
DestroyIcon( hIcon );
}
// ... Same for ICON_SMALL
This seems to have done the trick. I really don't know why, but so far it's the only change that had any effect. It's really not an issue I should spend any more time on, so I'll just go with this.