Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Same Resource IDs in resource.h

Same Resource IDs in resource.h

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestiontutoriallearning
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anu_Bala
    wrote on last edited by
    #1

    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

    H T 2 Replies Last reply
    0
    • A Anu_Bala

      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

      H Offline
      H Offline
      Hans Dietrich
      wrote on last edited by
      #2

      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
      #endif

      These lines tell the resource editor what the next available value is, so there won't be collisions.

      Best wishes, Hans


      [Hans Dietrich Software]

      1 Reply Last reply
      0
      • A Anu_Bala

        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

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        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
        #endif

        check 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" - Mixture

        cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

        A 1 Reply Last reply
        0
        • T ThatsAlok

          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
          #endif

          check 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" - Mixture

          cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

          A Offline
          A Offline
          Anu_Bala
          wrote on last edited by
          #4

          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
          #endif

          Here how can i change..Can u gice ay idea?

          Anu

          C T 2 Replies Last reply
          0
          • A Anu_Bala

            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
            #endif

            Here how can i change..Can u gice ay idea?

            Anu

            C Offline
            C Offline
            chevu
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • A Anu_Bala

              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
              #endif

              Here how can i change..Can u gice ay idea?

              Anu

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              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" - Mixture

              cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

              A 1 Reply Last reply
              0
              • T ThatsAlok

                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" - Mixture

                cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                A Offline
                A Offline
                Anu_Bala
                wrote on last edited by
                #7

                Yes,i did like that.I changed the IDs manually.

                Anu

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups