mrwad99
asked on
#define value for string table addition
Ah hello.
Regarding the string table editor in VS.NET 2003, how can I determine which is the next value that will be used for a new string ? (i.e. every new string added gets a #define value for it). I thought the key was the following section of resource.h:
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 130
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1006
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
however,
_APS_NEXT_RESOURCE_VALUE only increments when I add a new resource (like dialog or menu)
_APS_NEXT_CONTROL_VALUE only increments when I add a new control, like a button
_APS_NEXT_COMMAND_VALUE only increments when I add a new command, like a menu option handler
_APS_NEXT_SYMED_VALUE is apparently to do with adding new symbols.
I have read the suggested links (mainly http://msdn2.microsoft.com/en-us/library/6t3612sk(VS.80).aspx) but still don't know how the ID for a new string is defined.
Does anyone here ?
TIA
Regarding the string table editor in VS.NET 2003, how can I determine which is the next value that will be used for a new string ? (i.e. every new string added gets a #define value for it). I thought the key was the following section of resource.h:
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 130
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1006
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
however,
_APS_NEXT_RESOURCE_VALUE only increments when I add a new resource (like dialog or menu)
_APS_NEXT_CONTROL_VALUE only increments when I add a new control, like a button
_APS_NEXT_COMMAND_VALUE only increments when I add a new command, like a menu option handler
_APS_NEXT_SYMED_VALUE is apparently to do with adding new symbols.
I have read the suggested links (mainly http://msdn2.microsoft.com/en-us/library/6t3612sk(VS.80).aspx) but still don't know how the ID for a new string is defined.
Does anyone here ?
TIA
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-(
Do you have just one .rc file and one resource.h file ?
>>I have a big project with loads and loads of strings in it, and I am now adding new ones,
this problem is occuring due to duplicating resource by copy paste and renaming resource names ?
btw if you refer following tech note general strings having valid range of 1 -> 0x7FFF
'TN020: ID Naming and Numbering Conventions'
http://msdn2.microsoft.com/en-US/library/t2zechd4.aspx
you may also refer this possible cause of resource id clash by copy/paste and rename
http://www.kbalertz.com/141345/Duplicating.Resource.Causes.Resource.Collision.aspx
-MAHESH
this problem is occuring due to duplicating resource by copy paste and renaming resource names ?
btw if you refer following tech note general strings having valid range of 1 -> 0x7FFF
'TN020: ID Naming and Numbering Conventions'
http://msdn2.microsoft.com/en-US/library/t2zechd4.aspx
you may also refer this possible cause of resource id clash by copy/paste and rename
http://www.kbalertz.com/141345/Duplicating.Resource.Causes.Resource.Collision.aspx
-MAHESH
A further question for you - is it mixing strings in dll's and exe's ?
ASKER
Andy: no, these strings are just in the program EXE itself. It would not be a problem if duplicate string IDs exist in the exe and in separate DLLs anyway, as long as I set the resource handle to be appropriate.
I will close this soon if nothing else happens here.
I will close this soon if nothing else happens here.
exe's and dll's - that is the answer I expected BUT it was better to confirm it.
This might be of use to you
http://www.codeproject.com/macro/resorg.asp
http://www.codeproject.com/macro/resorg.asp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks both. Since the answer was not found, I will still give the points for effort.
ASKER
>> Is this just a general question for your own edification or do you have a specific requirement?
I really need to know. The thing is, I have a big project with loads and loads of strings in it, and I am now adding new ones, but found that when I run the program, some parts of the UI have the incorrect strings due to the new string IDs clashing with ones already existing.
This led me to realise that if I do not figure out how to solve this, it could get to the point where I have far too many strings to sort the problem.