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. Opening a Menu on a default item

Opening a Menu on a default item

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++salesquestion
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.
  • A Offline
    A Offline
    Alexandre GRANVAUD
    wrote on last edited by
    #1

    Hi, I'm using the TrackPopupMenu() MFC function and would like (i really have to do this for my customer ;)) this contextual menu to open up on a default subitem. I mean, assuming i have in my menu an item 1 and an item 2, and item 2 is a popup having an subitem1 and a subitem2, i need the whole menu to directly open on subitem2 selected for example. Any idea on how to solve this ? thanks ! :)

    H A 2 Replies Last reply
    0
    • A Alexandre GRANVAUD

      Hi, I'm using the TrackPopupMenu() MFC function and would like (i really have to do this for my customer ;)) this contextual menu to open up on a default subitem. I mean, assuming i have in my menu an item 1 and an item 2, and item 2 is a popup having an subitem1 and a subitem2, i need the whole menu to directly open on subitem2 selected for example. Any idea on how to solve this ? thanks ! :)

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Do you want to show contextmenu on the item for example in the listctrl ?


      WhiteSky


      A 1 Reply Last reply
      0
      • H Hamid Taebi

        Do you want to show contextmenu on the item for example in the listctrl ?


        WhiteSky


        A Offline
        A Offline
        Alexandre GRANVAUD
        wrote on last edited by
        #3

        no i just want the contextmenu to openup on the desired subitem : a menu is a set of item and subitems, items having subitems beeing called popup because when passing on them, a sub-popup menu opens up. What i need is when i display my menu with TrackPopupMenu(), directly having a perticular sub-popmenu opened ;)

        1 Reply Last reply
        0
        • A Alexandre GRANVAUD

          Hi, I'm using the TrackPopupMenu() MFC function and would like (i really have to do this for my customer ;)) this contextual menu to open up on a default subitem. I mean, assuming i have in my menu an item 1 and an item 2, and item 2 is a popup having an subitem1 and a subitem2, i need the whole menu to directly open on subitem2 selected for example. Any idea on how to solve this ? thanks ! :)

          A Offline
          A Offline
          Alexandre GRANVAUD
          wrote on last edited by
          #4

          a function HiliteMenuItem() exists and its behaviour is exactly what i'm looking for BUT it only wroks for menus with a menubar, not for popup menus (contextual ones) someone has an idea ?

          M 1 Reply Last reply
          0
          • A Alexandre GRANVAUD

            a function HiliteMenuItem() exists and its behaviour is exactly what i'm looking for BUT it only wroks for menus with a menubar, not for popup menus (contextual ones) someone has an idea ?

            M Offline
            M Offline
            Mark Salsbery
            wrote on last edited by
            #5

            What about SetMenuItemInfo to set the state?

            "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

            A 1 Reply Last reply
            0
            • M Mark Salsbery

              What about SetMenuItemInfo to set the state?

              "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

              A Offline
              A Offline
              Alexandre GRANVAUD
              wrote on last edited by
              #6

              do you mean setting the state to MFS_HILITE ? i think it won't work as HiliteMenuItem() function must do the same.... and doesn't work for popup menus... but i'll try ;)

              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