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. button catch double click.

button catch double click.

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

    I search on Web, and did not get clear answer. Now here is the way to catch double click action by a ordinary button. :laugh: create CMyButton based on CButton. add WM_LBUTTONDBLCLK message handler. use wizard add variable for the IDC_BUTTON1. let it's type be CMyButton. that's it. You will catch Bouble Click action my CMyButton. Easy huh!

    G B 2 Replies Last reply
    0
    • L LeeeNN

      I search on Web, and did not get clear answer. Now here is the way to catch double click action by a ordinary button. :laugh: create CMyButton based on CButton. add WM_LBUTTONDBLCLK message handler. use wizard add variable for the IDC_BUTTON1. let it's type be CMyButton. that's it. You will catch Bouble Click action my CMyButton. Easy huh!

      G Offline
      G Offline
      Gary R Wheeler
      wrote on last edited by
      #2

      Maybe so, but you need to question using double-click with a standard button. Windows users don't typically double-click buttons, so you're going to have a hard time training them to do so in your application. Presumably, the normal click on your buttons performs some other action. You'll also have the danger of that action being performed instead, even though the user thought they were performing a double-click.


      Software Zen: delete this;

      1 Reply Last reply
      0
      • L LeeeNN

        I search on Web, and did not get clear answer. Now here is the way to catch double click action by a ordinary button. :laugh: create CMyButton based on CButton. add WM_LBUTTONDBLCLK message handler. use wizard add variable for the IDC_BUTTON1. let it's type be CMyButton. that's it. You will catch Bouble Click action my CMyButton. Easy huh!

        B Offline
        B Offline
        Branislav
        wrote on last edited by
        #3

        Try to use BN_DOUBLECLICKED and your button need to be Notify.

        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