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. VC++6.0 menu limit?

VC++6.0 menu limit?

Scheduled Pinned Locked Moved C / C++ / MFC
c++performancehelptutorialquestion
13 Posts 9 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.
  • M Offline
    M Offline
    Member 708172
    wrote on last edited by
    #1

    Hi ALL! VC++6.0, XP SP3, MFC Dialog-based App. Adding a next item to the menu I've suddenly got a message "Out of memory. Unable to complete command". After restart it's impossible to load project clicking .DSW file: workspace stays empty, no files loaded. Killing of the .CLW solves the problem for an one session. After I restart project, it again doesn't work, need delete .CLW again. Now, I cannot add a menu item. Currently there are about 1000 items in the menu. I have a bad suspicion that may be there is a LIMIT for the wizard when it adds a menu item? Please, any ideas how to add items?

    L A P M 4 Replies Last reply
    0
    • M Member 708172

      Hi ALL! VC++6.0, XP SP3, MFC Dialog-based App. Adding a next item to the menu I've suddenly got a message "Out of memory. Unable to complete command". After restart it's impossible to load project clicking .DSW file: workspace stays empty, no files loaded. Killing of the .CLW solves the problem for an one session. After I restart project, it again doesn't work, need delete .CLW again. Now, I cannot add a menu item. Currently there are about 1000 items in the menu. I have a bad suspicion that may be there is a LIMIT for the wizard when it adds a menu item? Please, any ideas how to add items?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Member 708172 wrote:

      Currently there are about 1000 items in the menu.

      Seriously? How do you expect anyone to navigate such a maze? You should rethink your design.

      One of these days I'm going to think of a really clever signature.

      1 Reply Last reply
      0
      • M Member 708172

        Hi ALL! VC++6.0, XP SP3, MFC Dialog-based App. Adding a next item to the menu I've suddenly got a message "Out of memory. Unable to complete command". After restart it's impossible to load project clicking .DSW file: workspace stays empty, no files loaded. Killing of the .CLW solves the problem for an one session. After I restart project, it again doesn't work, need delete .CLW again. Now, I cannot add a menu item. Currently there are about 1000 items in the menu. I have a bad suspicion that may be there is a LIMIT for the wizard when it adds a menu item? Please, any ideas how to add items?

        A Offline
        A Offline
        Albert Holguin
        wrote on last edited by
        #3

        There's really no reason why you should have that many items in a menu. You're at a point where no person would want to navigate through that.

        1 Reply Last reply
        0
        • M Member 708172

          Hi ALL! VC++6.0, XP SP3, MFC Dialog-based App. Adding a next item to the menu I've suddenly got a message "Out of memory. Unable to complete command". After restart it's impossible to load project clicking .DSW file: workspace stays empty, no files loaded. Killing of the .CLW solves the problem for an one session. After I restart project, it again doesn't work, need delete .CLW again. Now, I cannot add a menu item. Currently there are about 1000 items in the menu. I have a bad suspicion that may be there is a LIMIT for the wizard when it adds a menu item? Please, any ideas how to add items?

          P Offline
          P Offline
          PecuniousPete
          wrote on last edited by
          #4

          Member 708172 wrote:

          Currently there are about 1000 items in the menu.

          VS, every user of your program, the universe and life itslef probably hates you for that. :)

          1 Reply Last reply
          0
          • M Member 708172

            Hi ALL! VC++6.0, XP SP3, MFC Dialog-based App. Adding a next item to the menu I've suddenly got a message "Out of memory. Unable to complete command". After restart it's impossible to load project clicking .DSW file: workspace stays empty, no files loaded. Killing of the .CLW solves the problem for an one session. After I restart project, it again doesn't work, need delete .CLW again. Now, I cannot add a menu item. Currently there are about 1000 items in the menu. I have a bad suspicion that may be there is a LIMIT for the wizard when it adds a menu item? Please, any ideas how to add items?

            M Offline
            M Offline
            Member 708172
            wrote on last edited by
            #5

            I have no questions about design. I have questions about fight the wizard in VC6.0 ------------------------------------- PS. This project isn't bubbleshooter or a text processor. Therefore its menu doesn't consist of Help->About only. This project operates with cars, that are splitted by models. Do you know how many car models in the world? No, you don't, but somehow you are sure that our users are not happy to navigate through this menu. Who from you solved a problem to combine over 1000 cars in an one project? Nobody. But all seems that they are guru in this question... OK, I'm listening you, make your suggestions...

            F J L M J 5 Replies Last reply
            0
            • M Member 708172

              I have no questions about design. I have questions about fight the wizard in VC6.0 ------------------------------------- PS. This project isn't bubbleshooter or a text processor. Therefore its menu doesn't consist of Help->About only. This project operates with cars, that are splitted by models. Do you know how many car models in the world? No, you don't, but somehow you are sure that our users are not happy to navigate through this menu. Who from you solved a problem to combine over 1000 cars in an one project? Nobody. But all seems that they are guru in this question... OK, I'm listening you, make your suggestions...

              F Offline
              F Offline
              Freak30
              wrote on last edited by
              #6

              Well, don't put every single model into the menu but just the highest hierarchy level. Open a sub dialog with a ComboBox (or several if there are more sub levels) and add only the items apllicable for the current parent level. This should cut down your memory usage.

              1 Reply Last reply
              0
              • M Member 708172

                I have no questions about design. I have questions about fight the wizard in VC6.0 ------------------------------------- PS. This project isn't bubbleshooter or a text processor. Therefore its menu doesn't consist of Help->About only. This project operates with cars, that are splitted by models. Do you know how many car models in the world? No, you don't, but somehow you are sure that our users are not happy to navigate through this menu. Who from you solved a problem to combine over 1000 cars in an one project? Nobody. But all seems that they are guru in this question... OK, I'm listening you, make your suggestions...

                J Offline
                J Offline
                Jochen Arndt
                wrote on last edited by
                #7

                A suggestion: Rethink your design. I (and probably all others here) would use a database and provide filter options to query matching recordsets and show the results as list from where additional actions can be executed. Doing so allows you to update the database with new data without changing a single line of code for your application and you will not run into any limits. A probable solution is using dynamically item creation rather than using resources. When doing so, you may realize that using a database is a good idea. Finally, switching from menu selections to lists with filters may also come into mind.

                1 Reply Last reply
                0
                • M Member 708172

                  I have no questions about design. I have questions about fight the wizard in VC6.0 ------------------------------------- PS. This project isn't bubbleshooter or a text processor. Therefore its menu doesn't consist of Help->About only. This project operates with cars, that are splitted by models. Do you know how many car models in the world? No, you don't, but somehow you are sure that our users are not happy to navigate through this menu. Who from you solved a problem to combine over 1000 cars in an one project? Nobody. But all seems that they are guru in this question... OK, I'm listening you, make your suggestions...

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Member 708172 wrote:

                  I have no questions about design. I have questions about fight the wizard in VC6.0

                  If you design it correctly you will not have to fight the wizard. This is not a good way to deal with large numbers of options, as others have pointed out. You should consider the use of dialogs with lists which will allow you to alter things dynamically rather than having to rebuild your entire program every time a minor change in your item set occurs.

                  Member 708172 wrote:

                  Who from you solved a problem to combine over 1000 cars in an one project? Nobody.

                  You have no idea what problems some of the contributors here have solved; many have been working very successfully in IT development for years. That is why you should listen to their advice. Of course you are free to ignore it and stick with your own design, but don't be surprised if you run into even more problems.

                  One of these days I'm going to think of a really clever signature.

                  1 Reply Last reply
                  0
                  • M Member 708172

                    I have no questions about design. I have questions about fight the wizard in VC6.0 ------------------------------------- PS. This project isn't bubbleshooter or a text processor. Therefore its menu doesn't consist of Help->About only. This project operates with cars, that are splitted by models. Do you know how many car models in the world? No, you don't, but somehow you are sure that our users are not happy to navigate through this menu. Who from you solved a problem to combine over 1000 cars in an one project? Nobody. But all seems that they are guru in this question... OK, I'm listening you, make your suggestions...

                    M Offline
                    M Offline
                    Maximilien
                    wrote on last edited by
                    #9

                    Are you really using menus (i.e. CMenu, ... ) ??? or are you talking about something else ? If using menus, split the menus into sub menus of companies and models; that will probably help. IMO, menus are not designed to do this kind of interaction. My suggestion would be to have (at least) 2 list box side-by-side, first one on the left would be the car manufacturer, and the one on the right would be the car models which is dependent on the manufacturer. Scenario : - first list is filled with car manufacturer; second list is empty. - user selects car manufacturer; second list is filled with car models. - user selects car model on the second list. You can also add some more UI to select the car manufacture year. You can also add behaviour so that the user could start type the car manufacturer and/or model to automatically scroll to the appropriate item in the list. ... Good luck.

                    Nihil obstat

                    M 1 Reply Last reply
                    0
                    • M Member 708172

                      I have no questions about design. I have questions about fight the wizard in VC6.0 ------------------------------------- PS. This project isn't bubbleshooter or a text processor. Therefore its menu doesn't consist of Help->About only. This project operates with cars, that are splitted by models. Do you know how many car models in the world? No, you don't, but somehow you are sure that our users are not happy to navigate through this menu. Who from you solved a problem to combine over 1000 cars in an one project? Nobody. But all seems that they are guru in this question... OK, I'm listening you, make your suggestions...

                      J Offline
                      J Offline
                      jschell
                      wrote on last edited by
                      #10

                      Member 708172 wrote:

                      This project operates with cars

                      Ok.

                      Member 708172 wrote:

                      that are splitted by models.

                      That has nothing to do with cars. It has to do with design of the software. And it is wrong.

                      Member 708172 wrote:

                      No, you don't, but somehow you are sure that our users are not happy to navigate through this menu.

                      I suspect however that your users do not care equally about every single model though. So let us say hypothetically (and only that) that they do not want to use a dialog to select the car. Then you provide a way to dynamically add the cars that they do care about to the menu. Presumably that is a feature that you have seen in other applications. Such as text processors.

                      Member 708172 wrote:

                      Who from you solved a problem to combine over 1000 cars in an one project?

                      Not a project - a menu.

                      Member 708172 wrote:

                      make your suggestions...

                      A dialog where they select make then model. Which is certainly what I have seen on every car app that I have seen. And if you want then you can let them add them to the menu. Might note of course that make/model might not even be sufficient but trying to map variations after that to a menu would make it that much harder. But it is just another drop down in a dialog.

                      1 Reply Last reply
                      0
                      • M Maximilien

                        Are you really using menus (i.e. CMenu, ... ) ??? or are you talking about something else ? If using menus, split the menus into sub menus of companies and models; that will probably help. IMO, menus are not designed to do this kind of interaction. My suggestion would be to have (at least) 2 list box side-by-side, first one on the left would be the car manufacturer, and the one on the right would be the car models which is dependent on the manufacturer. Scenario : - first list is filled with car manufacturer; second list is empty. - user selects car manufacturer; second list is filled with car models. - user selects car model on the second list. You can also add some more UI to select the car manufacture year. You can also add behaviour so that the user could start type the car manufacturer and/or model to automatically scroll to the appropriate item in the list. ... Good luck.

                        Nihil obstat

                        M Offline
                        M Offline
                        Member 708172
                        wrote on last edited by
                        #11

                        >Are you really using menus (i.e. CMenu, ... ) ??? Very good question. I do not use CMenu, instead I did Insert->Resource->Menu and wrote menu items. Next I involved the "dialog properties" and selected this menu in a listbox. I didn't use directly CMenu. About csenario: "...first list is filled with car manufacturer" I have ~80 manufacturers without China market :) I think, finally it may be ~100. ------------------------------------ I've spent else a bit time and now I'm knowing a bit more... 1. This bug isn't a "news". And I'm not the first person who has detected it. 2. On old version of VC there was a bug: Wizard supports file .CLW upto 64K. Not bigger. Microsoft had fixed this bug, but unfortunatelly at "microsoft manner". I've done some experiments and now I know: 1. Wizard can create a long .CLW. But wizard cannot read .CLW above certain size. 2. There are many types of resources in the .CLW. Wizard places all those types on the DIFFERENT stacks each type. Therefore I have no problem to add dialogs (currently I have 65 dialogs, they require a short space). But I have problem to add menu items (currently 1096).

                        C 1 Reply Last reply
                        0
                        • M Member 708172

                          >Are you really using menus (i.e. CMenu, ... ) ??? Very good question. I do not use CMenu, instead I did Insert->Resource->Menu and wrote menu items. Next I involved the "dialog properties" and selected this menu in a listbox. I didn't use directly CMenu. About csenario: "...first list is filled with car manufacturer" I have ~80 manufacturers without China market :) I think, finally it may be ~100. ------------------------------------ I've spent else a bit time and now I'm knowing a bit more... 1. This bug isn't a "news". And I'm not the first person who has detected it. 2. On old version of VC there was a bug: Wizard supports file .CLW upto 64K. Not bigger. Microsoft had fixed this bug, but unfortunatelly at "microsoft manner". I've done some experiments and now I know: 1. Wizard can create a long .CLW. But wizard cannot read .CLW above certain size. 2. There are many types of resources in the .CLW. Wizard places all those types on the DIFFERENT stacks each type. Therefore I have no problem to add dialogs (currently I have 65 dialogs, they require a short space). But I have problem to add menu items (currently 1096).

                          C Offline
                          C Offline
                          Chris Meech
                          wrote on last edited by
                          #12

                          I could be missing something obvious here, but how do you keep your application up to date? Cars and manufacturers come and go on a frequent basis. With every change you will be recompiling your resources and re-linking your application. That seems an odd and certainly unconventional way of doing it. ie. That's a lot of maintenance work. Just curious. :)

                          Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                          M 1 Reply Last reply
                          0
                          • C Chris Meech

                            I could be missing something obvious here, but how do you keep your application up to date? Cars and manufacturers come and go on a frequent basis. With every change you will be recompiling your resources and re-linking your application. That seems an odd and certainly unconventional way of doing it. ie. That's a lot of maintenance work. Just curious. :)

                            Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]

                            M Offline
                            M Offline
                            Maximilien
                            wrote on last edited by
                            #13

                            hint: cheap labor. :~

                            Nihil obstat

                            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