Click here to Skip to main content
15,443,631 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi all,

I have two applications written in Visual C++, one of then is the main application, and the other is an updater for the first one. If I run the updater ithin main application directory it appears with the icon of the main application, but if I run the updater in another directory it appears with its icon.

I have check resource load and all seems to be be ok, the resource IDR_MAINFRAME exists and has the lowest id number, in fact IDR_MAINFRAME id in the updater app has a lower value than in the main one, althought that cannot be the problem. I have also check that SetIcon function is called inside updater app.

I have no idea of which causes this strange behaviour, probably is something related to resource loading but I do not find any usefull information about this.

I realize that is a very strange situation so any help is welcome.

Thank you in advance.
Alex_GR 8-Sep-11 11:29am    
I am really surprised that nobody has any idea about this. If I find anything I will post the solution.
Ali Fakoor 19-Sep-11 7:58am     CRLF
Well yes, it appears so! Thanks for your interest to share the solution in advance. Just a question, does it happen by chance that you copied the updater application from the main application (cloning main app and then modifying it to become the different updater app). If so I remember that two types of icons were stored in the app, one the small size which are used for the taskbar icon, other for the shortcut icon, etc. (Just sharing my old memories, not sure whether it helps here)
Alex_GR 19-Sep-11 8:26am     CRLF
Hi, The second app was not copied from the main one and I have checked also the icons. The most stange think is that it only shows the incorrect icon if I launch it from the same directory of the main. Now I have to deal with other things and this problem have to wait, when I continue if I find a solution I will post it. Thanks.
Alex_GR 12-Sep-11 11:31am    
In a virtual machine with XP its works properly, it has to be something related to new taskbar in Vista and W7.
Alex_GR 13-Sep-11 5:49am    
I have also tried to copy the main app diretory (installation directory) to another location and in this case the updater shows the correct icon, so I am starting to think that maybe is something related to the windowsa registry or another internal cache...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900