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. The Lounge
  3. Devstudio messing up resource.h

Devstudio messing up resource.h

Scheduled Pinned Locked Moved The Lounge
5 Posts 4 Posters 0 Views
  • 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.
  • L Offline
    L Offline
    Leo Davidson
    wrote on last edited by
    #1

    This has happened to me twice now, anyone know of an automated tool to fix the mess? When creating a dialog resource with a lot of controls, DevStudio seems to start assigning the controls new labels like IDC_BUTTON_69 and then in resource.h it's defining the labels to numbers which are already used for other labels (not used at the moment by the dialog). This means that when I finish adding buttons and try to define their labels to what I want, I can't use those identifiers that got reused! FFS! How difficult can it be for DevStudio to count up from the _APS_NEXT_CONTROL_VALUE number instead of doing this stupid thing. I imagine it THINKS it's doing me a favour... I really wish programs would stop trying to do me favours like this! :-) Now that I've got that off my chest, I suppose it would be pretty trivial to write my own program to fix the mess so I'll do that now. :) Thanks for listening, heh.

    E J A 3 Replies Last reply
    0
    • L Leo Davidson

      This has happened to me twice now, anyone know of an automated tool to fix the mess? When creating a dialog resource with a lot of controls, DevStudio seems to start assigning the controls new labels like IDC_BUTTON_69 and then in resource.h it's defining the labels to numbers which are already used for other labels (not used at the moment by the dialog). This means that when I finish adding buttons and try to define their labels to what I want, I can't use those identifiers that got reused! FFS! How difficult can it be for DevStudio to count up from the _APS_NEXT_CONTROL_VALUE number instead of doing this stupid thing. I imagine it THINKS it's doing me a favour... I really wish programs would stop trying to do me favours like this! :-) Now that I've got that off my chest, I suppose it would be pretty trivial to write my own program to fix the mess so I'll do that now. :) Thanks for listening, heh.

      E Offline
      E Offline
      Erik Funkenbusch
      wrote on last edited by
      #2

      I'm not quite sure I understand your problem. I've never seen what you are describing. DevStudio always uses _APS_NEXT_CONTROL_VALUE when adding new controls. Are you instead, copying controls instead of adding new ones? How can you repeat the problem?

      1 Reply Last reply
      0
      • L Leo Davidson

        This has happened to me twice now, anyone know of an automated tool to fix the mess? When creating a dialog resource with a lot of controls, DevStudio seems to start assigning the controls new labels like IDC_BUTTON_69 and then in resource.h it's defining the labels to numbers which are already used for other labels (not used at the moment by the dialog). This means that when I finish adding buttons and try to define their labels to what I want, I can't use those identifiers that got reused! FFS! How difficult can it be for DevStudio to count up from the _APS_NEXT_CONTROL_VALUE number instead of doing this stupid thing. I imagine it THINKS it's doing me a favour... I really wish programs would stop trying to do me favours like this! :-) Now that I've got that off my chest, I suppose it would be pretty trivial to write my own program to fix the mess so I'll do that now. :) Thanks for listening, heh.

        J Offline
        J Offline
        Jonathan Gilligan
        wrote on last edited by
        #3

        I'm not sure whether it will help you, but you might want to look at the shareware Programmer's Assistant from BarnStormer (http://www.barnstormer-software.com). It has several features for renumbering resources and it may be able to fix your problem

        1 Reply Last reply
        0
        • L Leo Davidson

          This has happened to me twice now, anyone know of an automated tool to fix the mess? When creating a dialog resource with a lot of controls, DevStudio seems to start assigning the controls new labels like IDC_BUTTON_69 and then in resource.h it's defining the labels to numbers which are already used for other labels (not used at the moment by the dialog). This means that when I finish adding buttons and try to define their labels to what I want, I can't use those identifiers that got reused! FFS! How difficult can it be for DevStudio to count up from the _APS_NEXT_CONTROL_VALUE number instead of doing this stupid thing. I imagine it THINKS it's doing me a favour... I really wish programs would stop trying to do me favours like this! :-) Now that I've got that off my chest, I suppose it would be pretty trivial to write my own program to fix the mess so I'll do that now. :) Thanks for listening, heh.

          A Offline
          A Offline
          Anna Jayne Metcalfe
          wrote on last edited by
          #4

          I'm in the process of developing an Add-In for Visual C++ 6.0 which addresses this. It includes a wizard to renumber resource symbols, and so may fit your needs - if so please let me know and I'll send you a copy. Visit http://www.resorg.co.uk for details. ================================================= Andy Metcalfe - Sonardyne International Ltd Email: andy.metcalfe@lineone.net Web: http://website.lineone.net/~andy.metcalfe ================================================= "I used to be a medieval re-enactor, but I'm alright now" =================================================

          L 1 Reply Last reply
          0
          • A Anna Jayne Metcalfe

            I'm in the process of developing an Add-In for Visual C++ 6.0 which addresses this. It includes a wizard to renumber resource symbols, and so may fit your needs - if so please let me know and I'll send you a copy. Visit http://www.resorg.co.uk for details. ================================================= Andy Metcalfe - Sonardyne International Ltd Email: andy.metcalfe@lineone.net Web: http://website.lineone.net/~andy.metcalfe ================================================= "I used to be a medieval re-enactor, but I'm alright now" =================================================

            L Offline
            L Offline
            Leo Davidson
            wrote on last edited by
            #5

            Andy, what you're working on looks brilliant! If you do want someone to help test it I'd love a copy as I'm sure this problem will come up again and I also like the idea of having the resources sorted alphabetically (obsessive? me?? :-)). Either way, good luck developing it and if I can help in any way let me know. From your webpage it looks like one of those projects that starts off looking simple but turns out to be quite complex if you want to do it right. (Unloading the project and all that.) Cheers, Le

            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

            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups