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. Right Click on dialong button.

Right Click on dialong button.

Scheduled Pinned Locked Moved C / C++ / MFC
hardware
3 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.
  • S Offline
    S Offline
    ScotDolan
    wrote on last edited by
    #1

    I need the capablitiy to right click on dialog button and display a CMenu object that will have list of options that can be performed. As of right now, I am unable to capture a right mouse click over a dialog button. I am using the ON_WM_RBUTTONDOWN(). The message captures the right mouse clicks over the empty dialog space but no use for me. . Anyone can recommend, a way to capture right mouse clicks over dialog buttons. I do need to know which button i am over.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    S J 2 Replies Last reply
    0
    • S ScotDolan

      I need the capablitiy to right click on dialog button and display a CMenu object that will have list of options that can be performed. As of right now, I am unable to capture a right mouse click over a dialog button. I am using the ON_WM_RBUTTONDOWN(). The message captures the right mouse clicks over the empty dialog space but no use for me. . Anyone can recommend, a way to capture right mouse clicks over dialog buttons. I do need to know which button i am over.

      Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Subclass CButton (for the buttons on your dialog) to detect the right button clicks and send some form of notification (a Windows message of some sort) to the dialog? That's pretty much what I'd do in WTL, although as WTL has the concept of forwarding messages from sub-classed controls to their containers, it'd be a bit simpler.

      1 Reply Last reply
      0
      • S ScotDolan

        I need the capablitiy to right click on dialog button and display a CMenu object that will have list of options that can be performed. As of right now, I am unable to capture a right mouse click over a dialog button. I am using the ON_WM_RBUTTONDOWN(). The message captures the right mouse clicks over the empty dialog space but no use for me. . Anyone can recommend, a way to capture right mouse clicks over dialog buttons. I do need to know which button i am over.

        Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

        J Offline
        J Offline
        Jijo Raj
        wrote on last edited by
        #3

        Check out this article[^]. It does exactly what you needs - a context menu when you right click on a button! Regards, Jijo.

        _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

        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