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. number o fcontrols limited to 255?

number o fcontrols limited to 255?

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
9 Posts 7 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.
  • E Offline
    E Offline
    elephantstar
    wrote on last edited by
    #1

    It seems Visual C++ dialog boxes limit the number of controls to 255. I tried adding more controls but it keeps reverting to the select tool. How do I get around this? Thanks!

    B J B 4 Replies Last reply
    0
    • E elephantstar

      It seems Visual C++ dialog boxes limit the number of controls to 255. I tried adding more controls but it keeps reverting to the select tool. How do I get around this? Thanks!

      B Offline
      B Offline
      BlackDice
      wrote on last edited by
      #2

      why the he** would you EVER wanna put more controls than that on a form? My articles BlackDice

      1 Reply Last reply
      0
      • E elephantstar

        It seems Visual C++ dialog boxes limit the number of controls to 255. I tried adding more controls but it keeps reverting to the select tool. How do I get around this? Thanks!

        B Offline
        B Offline
        BlackDice
        wrote on last edited by
        #3

        But seriously, I think if you really need to do that, you might wanna try adding them at runtime. My articles BlackDice

        E 1 Reply Last reply
        0
        • B BlackDice

          But seriously, I think if you really need to do that, you might wanna try adding them at runtime. My articles BlackDice

          E Offline
          E Offline
          elephantstar
          wrote on last edited by
          #4

          Client requirements. So there's no way of changing the limit? Adding it at run-time is my best bet? Doing that might complicate things?

          R D 2 Replies Last reply
          0
          • E elephantstar

            It seems Visual C++ dialog boxes limit the number of controls to 255. I tried adding more controls but it keeps reverting to the select tool. How do I get around this? Thanks!

            J Offline
            J Offline
            Joe Woodbury
            wrote on last edited by
            #5

            The editor limits the number of controls to 255, you can add more dynamically. But as the previous poster said, any dialog with that many controls is going to be a usability nightmare. Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

            1 Reply Last reply
            0
            • E elephantstar

              Client requirements. So there's no way of changing the limit? Adding it at run-time is my best bet? Doing that might complicate things?

              R Offline
              R Offline
              Renjith Ramachandran
              wrote on last edited by
              #6

              i think you can add more controls by changing the id of the control from default to your custom names ( ie IDC_XXXXX1, IDC_XXXXX2 in to custom ones) BTW: how u tried to create the controls? simply copy-> paste ? Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.

              T 1 Reply Last reply
              0
              • R Renjith Ramachandran

                i think you can add more controls by changing the id of the control from default to your custom names ( ie IDC_XXXXX1, IDC_XXXXX2 in to custom ones) BTW: how u tried to create the controls? simply copy-> paste ? Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.

                T Offline
                T Offline
                toxcct
                wrote on last edited by
                #7

                renjith_sree wrote:

                think you can add more controls by changing the id of the control from default to your custom names

                no, this is a know issue... the only way to get rid of it is to add the 256+ controls at runtime...


                TOXCCT >>> GEII power
                [toxcct][VisualCalc]

                1 Reply Last reply
                0
                • E elephantstar

                  It seems Visual C++ dialog boxes limit the number of controls to 255. I tried adding more controls but it keeps reverting to the select tool. How do I get around this? Thanks!

                  B Offline
                  B Offline
                  BadKarma
                  wrote on last edited by
                  #8

                  Hi, If you need to put so many controls on a single dialog, there is something wrong with your design. This is most definitely not manageable. There are different ways to implement a manageable dialog, which does the same (or even better): - property sheets - sub dialogs - child controls - status bars - toolbars So the real question is why do you need so many controls on a single dialog. codito ergo sum

                  1 Reply Last reply
                  0
                  • E elephantstar

                    Client requirements. So there's no way of changing the limit? Adding it at run-time is my best bet? Doing that might complicate things?

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

                    elephantstar wrote:

                    So there's no way of changing the limit?

                    Correct. It is a design-time limitation. Why do you not use a tabbed dialog instead? Surely you can put 255 controls into meaningful groups.


                    "Take only what you need and leave the land as you found it." - Native American Proverb

                    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