1

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.

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.

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.

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.

So why would it work on one machine, when run directly from the exe, and not on another of the same windows version?

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.

CoreyCoop
  • 23
  • 4
  • Have a look here: http://stackoverflow.com/questions/969033/change-pinned-taskbar-icon-windows-7 – cha Jan 20 '14 at 05:47
  • That link has some good information in it, and I'll probably go on to using overlays, as that should work regardless. I'm still confused why it works on one machine fine, and another, nominally the save version of windows (same updates as well) it does not! – CoreyCoop Jan 23 '14 at 05:59

0 Answers0