NO

Author Topic: Application Task Manager icon  (Read 5449 times)

patrick

  • Guest
Application Task Manager icon
« on: December 03, 2011, 12:32:16 AM »
Apologies that my first post/question here might be simple one, but my Google-fu has let me down.

How do you set what icon is shown next to an application's name in Windows Task Manager? My app has an .ico file compiled in, with three different sized icons - 16x16, 32x32 and 48x48 - which are correctly used on the Desktop (normal and with large icons) and in the Taskbar. However, the icon shown in Task Manager is still the generic icon that Windows uses for applications without their own specific icon.

Any pointers would be gratefully received.

CommonTater

  • Guest
Re: Application Task Manager icon
« Reply #1 on: December 03, 2011, 01:13:31 AM »
What icon does it show in Windows Explorer?

Also... the correct icon may not show up until you place your application in a folder unter Program Files.

patrick

  • Guest
Re: Application Task Manager icon
« Reply #2 on: December 03, 2011, 01:29:46 AM »
What icon does it show in Windows Explorer?

The correct one - that's why I'm confused. I'm running XP, BTW, and if I look at the app in Explorer, I can switch between Detail, List, Icon, Tile and Thumbnail views, and my icon is displayed each time (different sizes, obviously). If the app is running, my icon appears on the Taskbar button for the application. The only place that it stubbornly refuses to appear is in Task Manager...

Quote
Also... the correct icon may not show up until you place your application in a folder unter Program Files.

Nope, tried that and no difference - sorry. Frustrating :-(

patrick

  • Guest
Re: Application Task Manager icon
« Reply #3 on: December 03, 2011, 01:46:44 AM »
OK; thanks to CommonTater for responding. Embarrassingly, this is a coder error (i.e. I cocked up) - not a great way to start my life on this board; but talking it through helped me solve the issue, at least.

My app is a dialog based one, and I was failing to set the small icon for each and every dialog that I was creating. As there is no main window for the app, there isn't a 'general' icon being set. My oversight. Sorry to waste the bandwidth.

CommonTater

  • Guest
Re: Application Task Manager icon
« Reply #4 on: December 03, 2011, 04:30:38 AM »
You can still create a (windowless) class to register it as the appicon...


patrick

  • Guest
Re: Application Task Manager icon
« Reply #5 on: December 03, 2011, 09:03:33 AM »
You can still create a (windowless) class to register it as the appicon...

I've tried just registering a class (which includes reference to my icon) up front and centre in WinMain(), but that doesn't seem to affect what icon is shown in Task Manager. Do you have some brief example code?

CommonTater

  • Guest
Re: Application Task Manager icon
« Reply #6 on: December 03, 2011, 01:20:42 PM »
You should be able to use the standard RegisterClass() function call...

Did you confirm that RegisterClass() didn't fail?

The only other thing I can think of is that your large "program icon" should be the first icon on the list in your resources.... 

patrick

  • Guest
Re: Application Task Manager icon
« Reply #7 on: December 03, 2011, 02:28:56 PM »
I first started using the Pelles IDE 3 or 4 days ago - I switched from a command line BCC environment mid-project. When I came to create a new project in Pelles just now to create a simple test case to try to get my head around why I'm having problems, I saw that there was a dialog wizard template; the code that this produces does exactly what you've been talking about.

I'll have a good look at that base code and compare it to what I'd previously written; I'm sure I'll be able to suss out the problem now.

Thanks again for your quick responses :-)

CommonTater

  • Guest
Re: Application Task Manager icon
« Reply #8 on: December 03, 2011, 03:01:42 PM »
Good luck with it... If you have more problems, post your code and we'll see what we can do...