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. conditional menu

conditional menu

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionlearning
6 Posts 3 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.
  • J Offline
    J Offline
    josip cagalj
    wrote on last edited by
    #1

    Hi, I have two menu resources (IDR_MAINFRAME) with different conditions (created using 'right mouse-> Insert Copy' on original). I use them in different Releases. The thing is I can't get second one to load, always the original one is shown. I set condition for both VER1 and VER2, I manage Project Properties in resource and c/c++->Preprocessor parts but still cant get the the second one to be loaded? Thanks in advance

    L K 2 Replies Last reply
    0
    • J josip cagalj

      Hi, I have two menu resources (IDR_MAINFRAME) with different conditions (created using 'right mouse-> Insert Copy' on original). I use them in different Releases. The thing is I can't get second one to load, always the original one is shown. I set condition for both VER1 and VER2, I manage Project Properties in resource and c/c++->Preprocessor parts but still cant get the the second one to be loaded? Thanks in advance

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

      Try running through the debugger to see exactly what resource id you are using when you try to show the menu.

      It's time for a new signature.

      1 Reply Last reply
      0
      • J josip cagalj

        Hi, I have two menu resources (IDR_MAINFRAME) with different conditions (created using 'right mouse-> Insert Copy' on original). I use them in different Releases. The thing is I can't get second one to load, always the original one is shown. I set condition for both VER1 and VER2, I manage Project Properties in resource and c/c++->Preprocessor parts but still cant get the the second one to be loaded? Thanks in advance

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        you better load and set the menu at runtime, so you get better control of it.

        Press F1 for help or google it. Greetings from Germany

        J 1 Reply Last reply
        0
        • K KarstenK

          you better load and set the menu at runtime, so you get better control of it.

          Press F1 for help or google it. Greetings from Germany

          J Offline
          J Offline
          josip cagalj
          wrote on last edited by
          #4

          It's an IDR_MAINFRAME menu, it loads I guess in MainFrm::OnCreate, why doe I need to do all that, why doesn't it loads corectly?

          K 1 Reply Last reply
          0
          • J josip cagalj

            It's an IDR_MAINFRAME menu, it loads I guess in MainFrm::OnCreate, why doe I need to do all that, why doesn't it loads corectly?

            K Offline
            K Offline
            KarstenK
            wrote on last edited by
            #5

            your second menu has and different identifier or language. IDR_MAINFRAME2 ? So it wont get loaded, but the standard one.

            Press F1 for help or google it. Greetings from Germany

            J 1 Reply Last reply
            0
            • K KarstenK

              your second menu has and different identifier or language. IDR_MAINFRAME2 ? So it wont get loaded, but the standard one.

              Press F1 for help or google it. Greetings from Germany

              J Offline
              J Offline
              josip cagalj
              wrote on last edited by
              #6

              No the ID is the same "IDR_MAINFRAME", but they have difrerent 'Language' and 'Condition' property set. Thanks

              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