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. how i can catch right button click on CButton ? (mfc)

how i can catch right button click on CButton ? (mfc)

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
6 Posts 4 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I try to make some DoModol when user click whith right button of mouse on CButton , but i cant catch click above. please help me. . . .

    D L 2 Replies Last reply
    0
    • L Lost User

      I try to make some DoModol when user click whith right button of mouse on CButton , but i cant catch click above. please help me. . . .

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Right-clicking a button is not very intuitive. What exactly is it that you are trying to do?


      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

      L 1 Reply Last reply
      0
      • L Lost User

        I try to make some DoModol when user click whith right button of mouse on CButton , but i cant catch click above. please help me. . . .

        L Offline
        L Offline
        Larry J Siddens
        wrote on last edited by
        #3

        Create a new class and inheriate the CButton class... class CMyButton : public CButton { . . . } Then capture on the WM_RBUTTONDOWN message. Using the wizard for VC6.0 and the properties for VS2003. In there do what you need to do. Hope this helps. Larry J. Siddens

        L 1 Reply Last reply
        0
        • D David Crow

          Right-clicking a button is not very intuitive. What exactly is it that you are trying to do?


          "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

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

          i need to popup window dialog (something like menu popup), the dialog/menu will popup on right click button.

          1 Reply Last reply
          0
          • L Larry J Siddens

            Create a new class and inheriate the CButton class... class CMyButton : public CButton { . . . } Then capture on the WM_RBUTTONDOWN message. Using the wizard for VC6.0 and the properties for VS2003. In there do what you need to do. Hope this helps. Larry J. Siddens

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

            ok , this is the "long" way that i thought about , but can`t i do it with out creat new class ?? does microsoft didnt make to us "easy" to us easy life ?

            T 1 Reply Last reply
            0
            • L Lost User

              ok , this is the "long" way that i thought about , but can`t i do it with out creat new class ?? does microsoft didnt make to us "easy" to us easy life ?

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              yanshof wrote: but can`t i do it with out creat new class ?? No you have to make you own class derived from CButton! yanshof wrote: does microsoft didnt make to us "easy" to us easy life ? :doh: Don't you think MS already make you life easy by providing Inheritance to there proprietary classes

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta

              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