I'm working on an MFC application, using external resources.
The resource.h file has been manually edited by other developers and I've seen that there are conflicting IDs.
I've seen the Microsoft TN020: ID Naming and Numbering Conventions.
I was just wondering if the IDs for controls and other resources (strings excluded) must be unique in the whole application or it's just enough if they are unique for each defined dialog.
Two controls in the same dialog must have different IDs (except when using IDC_STATIC
, which is -1
, in the resource editor). Two controls in different dialogs can have the same ID, good examples for that are buttons with the IDs IDOK
and IDCANCEL
.
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