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. TrackPopupMenu & WM_MENURBUTTONUP

TrackPopupMenu & WM_MENURBUTTONUP

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 2 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.
  • G Offline
    G Offline
    GregH
    wrote on last edited by
    #1

    Is there a way to programatically cancel/close a menu that was displayed using TrackPopupMenu? I am displaying a menu using TrackPopupMenu. When that menu is rt-clicked, I handle the WM_MENURBUTTONUP message and create a new popup context menu by calling TrackPopupMenu with the TPM_RECURSE flag set. I would like all the menus to close when a selection is made from the context menu, but have not found a way to do so. Currently only the context menu is closed, not the original menu. Any ideas on how to force it to close as well? Thanks, Greg

    M 1 Reply Last reply
    0
    • G GregH

      Is there a way to programatically cancel/close a menu that was displayed using TrackPopupMenu? I am displaying a menu using TrackPopupMenu. When that menu is rt-clicked, I handle the WM_MENURBUTTONUP message and create a new popup context menu by calling TrackPopupMenu with the TPM_RECURSE flag set. I would like all the menus to close when a selection is made from the context menu, but have not found a way to do so. Currently only the context menu is closed, not the original menu. Any ideas on how to force it to close as well? Thanks, Greg

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      I believe sending a WM_CANCELMODE to the parent window of the menus will do the trick. --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm

      G 1 Reply Last reply
      0
      • M Michael Dunn

        I believe sending a WM_CANCELMODE to the parent window of the menus will do the trick. --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm

        G Offline
        G Offline
        GregH
        wrote on last edited by
        #3

        That did it. 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