Same Resource IDs in resource.h
-
Hi im creating cotrols for various dialogs in my applcaition.So for each control one ID will create in resource.h .Sometimes waht happened same numeric ID is assigned to two differnt reource.It happens many of the time. How can i avoid that? Because of this i cannot add the resource to accelerator to assign fucntion.Every time when i add it shows resource id already exists.. Example: #define IDC_STATE0OP 1171 #define ID_CLRPAGE 1171 #define IDC_BUTTON3 1173 #define ID_ALRMDETAIL 1173 #define IDC_ACKBUTTON 1175 #define ID_BLOCKDET 1175 Pls help me to sort out this problem.
Anu
-
Hi im creating cotrols for various dialogs in my applcaition.So for each control one ID will create in resource.h .Sometimes waht happened same numeric ID is assigned to two differnt reource.It happens many of the time. How can i avoid that? Because of this i cannot add the resource to accelerator to assign fucntion.Every time when i add it shows resource id already exists.. Example: #define IDC_STATE0OP 1171 #define ID_CLRPAGE 1171 #define IDC_BUTTON3 1173 #define ID_ALRMDETAIL 1173 #define IDC_ACKBUTTON 1175 #define ID_BLOCKDET 1175 Pls help me to sort out this problem.
Anu
Menu and taskbar IDs (for example, ID_CLRPAGE) by convention are assigned numbers greater than 32771. How did ID_CLRPAGE and ID_BLOCKDET get assigned their values in the first place? If you used the VS resource editor, it will automatically assign the values, and it will use the lines at the bottom of resource.h that look like:
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 131
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1041
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endifThese lines tell the resource editor what the next available value is, so there won't be collisions.
Best wishes, Hans
-
Hi im creating cotrols for various dialogs in my applcaition.So for each control one ID will create in resource.h .Sometimes waht happened same numeric ID is assigned to two differnt reource.It happens many of the time. How can i avoid that? Because of this i cannot add the resource to accelerator to assign fucntion.Every time when i add it shows resource id already exists.. Example: #define IDC_STATE0OP 1171 #define ID_CLRPAGE 1171 #define IDC_BUTTON3 1173 #define ID_ALRMDETAIL 1173 #define IDC_ACKBUTTON 1175 #define ID_BLOCKDET 1175 Pls help me to sort out this problem.
Anu
See everything is in your resource file only, if you see these macro/decalartion govern the numbering of controls
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 32771
#endif
#endifcheck and correct there next count
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
See everything is in your resource file only, if you see these macro/decalartion govern the numbering of controls
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 32771
#endif
#endifcheck and correct there next count
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
In my resource.h it shows like
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 252
#define _APS_NEXT_COMMAND_VALUE 33078
#define _APS_NEXT_CONTROL_VALUE 1140
#define _APS_NEXT_SYMED_VALUE 115
#endif
#endifHere how can i change..Can u gice ay idea?
Anu
-
In my resource.h it shows like
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 252
#define _APS_NEXT_COMMAND_VALUE 33078
#define _APS_NEXT_CONTROL_VALUE 1140
#define _APS_NEXT_SYMED_VALUE 115
#endif
#endifHere how can i change..Can u gice ay idea?
Anu
Make sure that 1. all the resourses ids (like dialog) that are being used in these files are less than _APS_NEXT_RESOURCE_VALUE 2. all the control ids (i.e. button, textbox) are less than _APS_NEXT_CONTROL_VALUE value. 3. all commands (keyboard shortcuts) you have added should less than _APS_NEXT_COMMAND_VALUE Hope it will solve your problem.
-
In my resource.h it shows like
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 252
#define _APS_NEXT_COMMAND_VALUE 33078
#define _APS_NEXT_CONTROL_VALUE 1140
#define _APS_NEXT_SYMED_VALUE 115
#endif
#endifHere how can i change..Can u gice ay idea?
Anu
Hi Anu, Sometime VS misbehave while assigning ids. i believe either try installing latest SP for you visualstudio or manually change all the ID's.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You
-
Hi Anu, Sometime VS misbehave while assigning ids. i believe either try installing latest SP for you visualstudio or manually change all the ID's.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You