This is basically an extension of the question here.
I am working on an old MFC application where it seems the resource.h file has been manually edited and has gone messy. I see that there are conflicting IDs in there.
I just want to confirm if we can have two resources with the same ID of different type. For example, I have something like
IDD_1 101
IDS_2 101
or
IDR_1 102
IDS_2 102
Basically, there are resources defined with the same ID, but of different types.
A comment to the original question says that Resources of the same type don't share identifiers
. If that is true, is it also valid for the IDR_xxxx
IDs?
I am asking because I am using the Resource ID Organiser which seems to think that all IDs must be unique.
Although it's not recommended it should work OK with different types. The API FindResource uses the ID and Type to identify the resource. The problems you're more likely to hit revolve around the way MFC uses the resource id to refer to another resource, e.g. the help text for a toolbar button. Those sort of bugs can be very time consuming so you might just want to bite the bullet now and re-number so your resource ids are unique.
I am asking because I am using the Resource ID Organiser which seems to think that all IDs must be unique.
I thought I would just add that there is an option in Resource ID Organiser that allows for conflicts between symbol types:
It is not documented in the help topic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With