The Src/resource.h file is a bit problematic one. It only lists resource ID numbers as C define lines. It doesn't have any other content. But synchronizing and altering those IDs quite a pain when altering resources. Basically every ID should be unique etc.
The file is better handled by just generating it from resources we have. If we re-generate the file when we update resources we don't need to do any painful merging and synchronizing.
Attached is a work-in-progress script that parses resource IDs from resource file (Src/Merge.rc) and outputs resource.h file from those IDs.
There are still many things to do before this script can be really taken into development use. For example:
- parse more than one file
- format lines in resource.h properly
- add VS APSTUDIO defines for resource editor
- group IDs so that menuids have own number area, control IDs own number area etc
- group string IDs so that they match grouping in RC file
- handle IDs with two defined names