Where are document icons REALLY kept? 
Author Message
 Where are document icons REALLY kept?

Ok, In MFC, at least on Visual C++ 5, if I do a RegisterShellFileTypes(TRUE)
command with my document's type, it will assign the icon in the resource editor
called IDR_APPNAMETYPE to the documents. If you edit it, it will change the
document icon to the new one you drew.

Here's what's strange. If I delete the IDR_APPNAMETYPE resource and then build,
the Open and Save As will show the application icon for its documents.

If I add a new icon, it will call it IDI_ICON1. If I rename it back to
IDR_APPNAMETYPE and draw something, it will revert the document icon back to
what it was before I deleted the resource. NO MATTER WHAT I DO, including
clearing the types from the regisitry, it still use the old icon. Changing
IDR_APPNAMETYPE in the editor will not reflect any changes to the doc icon from
there on.

Where does it keep the document icons? I have a messed up icon from an old
version of an application, and even if I clear the registry and create a new
project with the same name, all of the document types use the old messed up
icon.



Sat, 09 Aug 2003 11:57:18 GMT  
 Where are document icons REALLY kept?
check the Id's number value!!!

Quote:
> Ok, In MFC, at least on Visual C++ 5, if I do a

RegisterShellFileTypes(TRUE)
Quote:
> command with my document's type, it will assign the icon in the resource
editor
> called IDR_APPNAMETYPE to the documents. If you edit it, it will change
the
> document icon to the new one you drew.

> Here's what's strange. If I delete the IDR_APPNAMETYPE resource and then
build,
> the Open and Save As will show the application icon for its documents.

> If I add a new icon, it will call it IDI_ICON1. If I rename it back to
> IDR_APPNAMETYPE and draw something, it will revert the document icon back
to
> what it was before I deleted the resource. NO MATTER WHAT I DO, including
> clearing the types from the regisitry, it still use the old icon. Changing
> IDR_APPNAMETYPE in the editor will not reflect any changes to the doc icon
from
> there on.

> Where does it keep the document icons? I have a messed up icon from an old
> version of an application, and even if I clear the registry and create a
new
> project with the same name, all of the document types use the old messed
up
> icon.



Sat, 09 Aug 2003 12:01:27 GMT  
 Where are document icons REALLY kept?
I am guessing somewhat, but look at CMultiDocTemplate::CMultiDocTemplate and
SingleDocTemplate::CSingleDocTemplate.


Quote:
> Ok, In MFC, at least on Visual C++ 5, if I do a

RegisterShellFileTypes(TRUE)
Quote:
> command with my document's type, it will assign the icon in the resource
editor
> called IDR_APPNAMETYPE to the documents. If you edit it, it will change
the
> document icon to the new one you drew.

> Here's what's strange. If I delete the IDR_APPNAMETYPE resource and then
build,
> the Open and Save As will show the application icon for its documents.

> If I add a new icon, it will call it IDI_ICON1. If I rename it back to
> IDR_APPNAMETYPE and draw something, it will revert the document icon back
to
> what it was before I deleted the resource. NO MATTER WHAT I DO, including
> clearing the types from the regisitry, it still use the old icon. Changing
> IDR_APPNAMETYPE in the editor will not reflect any changes to the doc icon
from
> there on.

> Where does it keep the document icons? I have a messed up icon from an old
> version of an application, and even if I clear the registry and create a
new
> project with the same name, all of the document types use the old messed
up
> icon.



Sat, 09 Aug 2003 12:12:31 GMT  
 Where are document icons REALLY kept?
I don't suppose this is what's going on here
but I've had similar confusion when I forgot that
as well as the 32x32 icon you see first in the editor
there's also often a 16x16 one. It's easy to copy an icon
and change only the visible one, then wonder why
the original carries on being displayed at the top of a document.

Pat


Quote:
> Ok, In MFC, at least on Visual C++ 5, if I do a

RegisterShellFileTypes(TRUE)
Quote:
> command with my document's type, it will assign the icon in the resource
editor
> called IDR_APPNAMETYPE to the documents. If you edit it, it will change
the
> document icon to the new one you drew.

> Here's what's strange. If I delete the IDR_APPNAMETYPE resource and then
build,
> the Open and Save As will show the application icon for its documents.

> If I add a new icon, it will call it IDI_ICON1. If I rename it back to
> IDR_APPNAMETYPE and draw something, it will revert the document icon back
to
> what it was before I deleted the resource. NO MATTER WHAT I DO, including
> clearing the types from the regisitry, it still use the old icon. Changing
> IDR_APPNAMETYPE in the editor will not reflect any changes to the doc icon
from
> there on.

> Where does it keep the document icons? I have a messed up icon from an old
> version of an application, and even if I clear the registry and create a
new
> project with the same name, all of the document types use the old messed
up
> icon.



Sat, 09 Aug 2003 17:17:09 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Does #ifndef really keep code from being compiled

2. I have it kinda but I am really confused.PLease HElp

3. Am I WRONG or is this really STRANGE!

4. LNK2001 unresolved external symbol (I really am in trouble here, please help)

5. I am really new to visual c++

6. Sockets really slow, am i missing something ?

7. Q: Change view but keep frame and document in MDI

8. Keeping open a document after views closed

9. Keeping document type out of explorer file...new menu

10. Keeping open a document after views closed

11. Input file, not really a document

12. Icon size keeps changing...

 

 
Powered by phpBB® Forum Software