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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. IDC_EDITn

IDC_EDITn

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
5 Posts 5 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.
  • O Offline
    O Offline
    Oriented
    wrote on last edited by
    #1

    visual C++6 when i write DDX_Text(pDX, IDC_EDIT10+4, VAR); where VAR is a member variable, it puts the VAR value in IDC_EDIT24 not IDC14 as i expected, and when i write: DDX_Text(pDX, IDC_EDIT5+2, VAR); it reads it as IDC_EDIT7; in the same way, it reads 4+1 = 15 !! 5+4=19; 10+7 = ?? anyone can help plZ?:laugh:

    D R 2 Replies Last reply
    0
    • O Oriented

      visual C++6 when i write DDX_Text(pDX, IDC_EDIT10+4, VAR); where VAR is a member variable, it puts the VAR value in IDC_EDIT24 not IDC14 as i expected, and when i write: DDX_Text(pDX, IDC_EDIT5+2, VAR); it reads it as IDC_EDIT7; in the same way, it reads 4+1 = 15 !! 5+4=19; 10+7 = ?? anyone can help plZ?:laugh:

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      What are the numeric values of IDC_EDIT10, IDC_EDIT24, IDC14, IDC_EDIT5, and IDC_EDIT7?


      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

      1 Reply Last reply
      0
      • O Oriented

        visual C++6 when i write DDX_Text(pDX, IDC_EDIT10+4, VAR); where VAR is a member variable, it puts the VAR value in IDC_EDIT24 not IDC14 as i expected, and when i write: DDX_Text(pDX, IDC_EDIT5+2, VAR); it reads it as IDC_EDIT7; in the same way, it reads 4+1 = 15 !! 5+4=19; 10+7 = ?? anyone can help plZ?:laugh:

        R Offline
        R Offline
        Roger Wright
        wrote on last edited by
        #3

        It looks like the controls were not added to the dialog in the same order as they are numbered. Each IDC_EDITxx is associated with a numeric value which is incremented after each assignment to prevent reuse of a number. If IDC_EDIT10 is associated with 33405, for example, the expression IDC_EDIT10+4 evaluates to 33409, which is apparently associated with the identifier IDC_EDIT24, not IDC_EDIT14. You can recreate the controls on the dialog in the correct order to fix this, or find another way to refer to specific controls. Or stick around - someone else may have a better solution.:) Will Build Nuclear Missile For Food - No Target Too Small

        M P 2 Replies Last reply
        0
        • R Roger Wright

          It looks like the controls were not added to the dialog in the same order as they are numbered. Each IDC_EDITxx is associated with a numeric value which is incremented after each assignment to prevent reuse of a number. If IDC_EDIT10 is associated with 33405, for example, the expression IDC_EDIT10+4 evaluates to 33409, which is apparently associated with the identifier IDC_EDIT24, not IDC_EDIT14. You can recreate the controls on the dialog in the correct order to fix this, or find another way to refer to specific controls. Or stick around - someone else may have a better solution.:) Will Build Nuclear Missile For Food - No Target Too Small

          M Offline
          M Offline
          Mike Dimmick
          wrote on last edited by
          #4

          You can adjust the numbers in the Visual C++ resource editor by going to properties, then putting '=x' after the name, where x is the number you want it to have (e.g. 'IDC_EDIT10=1000', without the quotes). Stability. What an interesting concept. -- Chris Maunder

          1 Reply Last reply
          0
          • R Roger Wright

            It looks like the controls were not added to the dialog in the same order as they are numbered. Each IDC_EDITxx is associated with a numeric value which is incremented after each assignment to prevent reuse of a number. If IDC_EDIT10 is associated with 33405, for example, the expression IDC_EDIT10+4 evaluates to 33409, which is apparently associated with the identifier IDC_EDIT24, not IDC_EDIT14. You can recreate the controls on the dialog in the correct order to fix this, or find another way to refer to specific controls. Or stick around - someone else may have a better solution.:) Will Build Nuclear Missile For Food - No Target Too Small

            P Offline
            P Offline
            Prakash Nadar
            wrote on last edited by
            #5

            No better solution I believe... This one problem you need to avoid when using group radiobuttons.


            MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"

            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