title: MFC program in Windows 7 not changing icon in taskbar
body: <p>I am creating an app for a client.  It is written in 32 bit MFC using Visual Studio 2010 and run on 64 bit Windows 7 (compatibility with other versions of windows not required, it's for a very closed system on limited machines)  The program will be started automatically in minimized mode when the machine boots.  </p>
  
  <p>The program collects data from a bunch of serial ports, and if restored, shows specifics and allows the user to change or fix things, but when minimized should just show a single "red LED" icon to show something is amiss, or a "green LED" icon to show everything is OK, no user intervention is required.  </p>
  
  <p>On my development machine (also Win 7-64), running the program from within Visual Studio or directly from Windows Explorer, when I change the icon using CWnd::SetIcon it changes in the window and in the taskbar, just as I want it to.  If I make a shortcut to the program and start it with the shortcut, the default icon is displayed in the taskbar and will not change.  Fine, it's taking the icon from the shortcut, that is explained. </p>
  
  <p>The odd part is that on the target machine, no matter how I start it, including clicking on in using Windows Explorer in it's folder (like I did on my development machine), or using the Windows Registry "Run", it always uses the default icon, and never changes in the taskbar.  I expected that when I used a shortcut on the desktop or in the Startup folder, since that was the behavior on my development machine.  </p>
  
  <p>So why would it work on one machine, when run directly from the exe, and not on another of the same windows version?</p>
  
  <p>More to the point, how can I make it work on the target system?  I also need to make sure that solution will work when autostarted on power-up/login.</p>