Home » Category » Microsoft Visual C & C++

Microsoft Visual C & C++: document icon replaced with default after linking

202| Wed, 06 Feb 2008 20:32:00 GMT| reedhumphrey| Comments (3)
This is an MFC SDI application written in Visual C++ 6. The 16x16 version of the second icon in my application (supposed to be the icon for the first document type) is replaced by the default document icon (looks like a sheet of paper with DOC written on it) upon linking. This results in all the files with the proper extension having the correct icon in "icon view", while having the default icon in "list view", "report view", etc (all the views that use the 16x16 version of the icon). I opened up the produced executable as a resource and found that the 16x16 icon for the document had been changed to the default, while the 32x32 was left alone. Anyone else encountered this?

Keywords & Tags: document, icon, replaced, default, linking, microsoft, visual c++, vc

URL: http://www.7prog.com/visual-c-c++/95074/
 
«« Prev - Next »» 3 helpful answers below.
Hi,

I think that you can delete that icon and have a different icon of your own and use the SetIcon function to set it. I think that it should work.

Let me know if that helped.
Visit http://www.geocities.com/contactgirish/homepage.html for some VC++ Links and Notes
[b]Regards,
V.Girish

vgirish | Sat, 10 Nov 2007 06:17:00 GMT |

I've looked through the resources for the project, there isn't a copy of the default icon anywhere in there. I looked at the documentation for CWnd::SetIcon (I assume that's what you were referring to) - it seems like that sets the icon of a window, not a file type. Thanks anyway!

reedhumphrey | Sat, 10 Nov 2007 06:18:00 GMT |

Hi,

Did you check for the YourProjectNameVTYPE icon ? Then, go to the string table and you can see that there. Try deleting it there and add a new icon to the resource and give it that id. For example, if your project name is Reed , then its ReedVTYPE.

Let me know if that helped.
Visit http://www.geocities.com/contactgirish/homepage.html for some VC++ Links and Notes
[b]Regards,
V.Girish

vgirish | Sat, 10 Nov 2007 06:19:00 GMT |

Microsoft Visual C & C++ Hot Answers

Microsoft Visual C & C++ New questions

Microsoft Visual C & C++ Related Categories