Dont have found any mention to this file in the Microsoft documentation, but you can #include it inside your app.h file or even in the project's stdafx file.
Main Topics
Browse All TopicsA dialog based app created using the app wizard contains as resource the res subdirectory and appname.rc and resource.h. But since while VS is creating resrc1.h (VC++ 6.0 SP5). I modified resource.h to assure unique IDs for all different (sub)dialogs to allow creating tooltips with string resource numbers identical to the control IDs. I don't know if this is the origin for creating resrc1.h in addition to resource.h. appname.rc is modified accordingly but all other source files which need resources have to include resource.h and resrc1.h from then on. And assuring unique IDs over 2 files seems more difficult than scanning a single file.
Does anyone know under which conditions this file gets created? Or better how to remove its necessity?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I have just written a simple utility to sort/rearrange control IDs for subdialogs which
assures unique IDs
can manipulate tab order
observer command ranges
Then I would need what can still go into resource.h and what needs to be put in resrc1.h since latter seems to be a continuation of resource.h which is still needed. The idea adding resrc1.h (and resource.h) to stdafx.h file would at least eliminate the need to include them into every projects source file has the drawback that a complete recompile is necessary for every change of dialogs resources. Latter could be a big increase in delelopment time.
Unfortunatly when adding string resources of copying controls from one (sub)dialog to another some control IDs got duplicated. How do you get them back to unique ones. I was left with duplicated ones even within a dialog resource. I wonder why the app still worked. And when you copy something from another app I see even more problems using cut and paste. The app wizard/class wizard is not very smart in that direction. Thats why I want to manipulate the resource.h file. Manual resource can be added to rc2 file no problem.
It is created automatically when adding (modifying?) resource IDs. It contains none or a single newly created resouce and the numbers to use for the next IDs to create. Those are in synch with resource.h and the additions from that file.
The purpose is not unclear. I want to know why it is created instead of using/continuing to use resource.h or if there is a hidden purpose for it.
I think I found the problem. Some parts of appname.rc got removed. Those contained the TEXTINCLUDE defines thus resource.h and afxres.h where not found/parsed correctly. Restored this part from version control and now resource.h gets used as before.
So now I need to find out how that part is used. I had to change all resource by hand to be english (US). How can I make this default for an obviously located VC++ version. (XP and VC++ are english version but either might be localized back to english from swiss (german).
I set all to english (US) but still some parts are in the appname.rc file of the home language model. No idea why I can't remove this since I don't want anything here. But the reason for creating resrc1.h was that the part
#ifdef APSTUDIO_INVOKED
//////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
got mixed up. After I removed all parts referring to resrc1.h it said it could not save to resource.h invalid directory. Correction this from an old version solved this part. What I am left with is that I have an empty part with default language resources for the country the PC is standing in.
Not really. Just discovered that it seems to be the default icon which gets no language added to it. It is displayed with the wrong one in the property since before changing it to be english as well there were no two languages in the rc file. When setting the icons language from non displayed at the side of the resource but the wrong one in the property restores the two language version of the rc file.
But the resources created by the wizard are displayed (in the resource view) as having that default language english US in my case. The property dialog shows the same for them. Newly added resources have no entry in the resource view and the default language of VS in the property dialog (german (switzerland) in my case) which is incorrect!
My previous comment turns out to be of dubious quality. It seems to use the locale (control panel, regional options) as the defaut for new resources. (Can't see the wood for the trees!). Is yours set as german (swiss) ? The resources language is only shown if the setting is different from that of the PC.
And to summarize it seems to be that the property popup shows the OS locale if none is specified explicitly. This is for a app created to be of a different locale setting than that of the OS just wrong. The resource is of locale settings specified for the app as wanted.
Will MS do updates on that for VS 6?
Business Accounts
Answer for Membership
by: AndyAinscowPosted on 2004-08-23 at 05:15:36ID: 11869408
I have VC 6 SP5, that still uses resource.h and haven't met this resrc1.h before. (With the 1 in the name this sounds like an intermediate file - what happens if you disable your anti-virus software - is it norton?)