From: SM on
Hi,
I created an ATL project
From: David Lowndes on
>When I opened the resource1.h file, i have a value as below
>#define IDR_OPTIONSMENU 101
>Two Identifiers have same values as 101(auto generated by vc++).
>Is this ok to have same values for Identifiers or do I need to change
>values manually?

If the identifiers are for the same type of resource, then obviously
there's a problem. If they're for different things (such as a menu
item and a string) there shouldn't be a problem.

Dave
From: John H. on
On Apr 20, 3:46 am, David Lowndes <Dav...(a)example.invalid> wrote:
> >When I opened the resource1.h file, i have a value as below
> >#define IDR_OPTIONSMENU                 101
> >Two Identifiers have same values as 101(auto generated by vc++).
> >Is this ok to have same values for Identifiers or do I need to change
> >values manually?
>
> If the identifiers are for the same type of resource, then obviously
> there's a problem. If they're for different things (such as a menu
> item and a string) there shouldn't be a problem.

In addition to what Mr. Lowndes said:
Controls in different dialogs can have the same identifier value.
For instance, say I have two dialogs:
#define IDD_MOVIE 101
#define IDD_ICECREAM 102
Each dialog has a control that show a picture:
#define IDC_MOVIE_PICTURE 1001 // used in the movie dialog
#define IDC_ICECREAM_PICTURE 1001 // used in the ice cream dialog
This should work ok.
You could even just have one #define that is used in both dialogs:
#define IDC_PICTURE 1001
but this might not be a good practice from a software engineering
perspective.