Question : Duplicate Resource IDs

I've heard that duplicate Resource IDs can cause problems.
Is this true?

trishm

Answer : Duplicate Resource IDs

Duplicate resource ID's - actually you won't necessarily get build errors, nor problems.

The resource editor should stop you putting two controls with the same ID onto a dialog for example but you can have a string resource and a control ... all with the same ID.


You *might* end up with problems, but then again everything could be OK.

Consider.
In a dll there is a string resource with the ID 1234 and in your app a string resource with ID 1234 - which string will be loaded when you ask for a string with the ID 1234.  You need to make certain that the correct one does actually get retrieved.

Consider.
On a dialog resource there is a button with the ID 1234.  At runtime you add a button, unfortunately with the ID 1234.  How do you determine which is clicked when you app receives the message that button 1234 was clicked?
Random Solutions  
 
programming4us programming4us