From: SM on 20 Apr 2010 02:18 Hi, I created an ATL project
From: David Lowndes on 20 Apr 2010 04:46 >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 21 Apr 2010 14:50 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.
|
Pages: 1 Prev: AfxFindResourceHandle Next: Two resource files having same identifier value |