RE: fatal error CVT1100: duplicate resource. type:ICON, name:1, la

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Danny,

Glad to see you're making progress!

>1) Go to Solution Explorer.
>2) Right click MyResourceFile.rc and select Properties.
>3) Change "Exclude From Build" to Yes.
>4) Open your projects .rc2 file for text editing.
>5) Add #include "..\MyResourceFile.rc".
>6) Rebuild all and now things work (or seem to).
>
>I am able to use the icon's in the second resource file now
>(MyResourceFile.rc). But as I stated, I am worried since normally VC
doesn't
>allow two resource files with icons in each to compile legally.

>From the workaround above, I think you don't need to worry about it--- you
just inclde/merge your second resource file into your project's original
resouce file, so in this scenario, your project only has the original
resouce file to compile.


>My next step is to try some tests to move the second resource file to a
DLL
>along with the source for the doc/view/frame and dynamically at runtime,
>actually load the doc/view/frame and its associated resources (icon, menu,
>toolbars, formview, ...).

It would be OK, you can create a resouce-only DLL to add your second
resource file, and the application could call LoadLibrary to explicitly
link to that DLL. Then the application would call the generic functions
FindResource and LoadResource to access the resources at run-time, please
refer to the following MSDN doc for more detailed info:

Create a Resource-Only DLL
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HT
ML/_core_create_a_resource.2d.only_dll.asp

I hope the above information helps, if you have any questions or concerns,
please do not hesitate to let me know. I am standing by to help you.


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages