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 kept pushed

button kept pushed

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

    Hi all, I've a button to move to the next point in a plot when the button is pushed. The matter is that i must click on the button many times if i wanna continue to pass to the next point in the plot, while i would like to obtain this keeping clicked the button. How can i do that ? Thanx in advance, Desmo16.

    C R T 3 Replies Last reply
    0
    • D Desmo16

      Hi all, I've a button to move to the next point in a plot when the button is pushed. The matter is that i must click on the button many times if i wanna continue to pass to the next point in the plot, while i would like to obtain this keeping clicked the button. How can i do that ? Thanx in advance, Desmo16.

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      OnButtonDown: start a timer OnTimer: move the selection to the next point OnButtonUp: stop the timer

      image processing | blogging

      1 Reply Last reply
      0
      • D Desmo16

        Hi all, I've a button to move to the next point in a plot when the button is pushed. The matter is that i must click on the button many times if i wanna continue to pass to the next point in the plot, while i would like to obtain this keeping clicked the button. How can i do that ? Thanx in advance, Desmo16.

        R Offline
        R Offline
        Roger Stoltz
        wrote on last edited by
        #3

        I suggest you override CButton and create a button class that repeats the BN_CLICKED event. Have a look at Joe Newcomer's article here[^] for tips on how to accomplish this behaviour. You could even have more than one timer event to make the BN_CLICKED events generated with higher frequency if the button is kept down for a longer time. -- Roger


        "It's supposed to be hard, otherwise anybody could do it!" - selfquote

        "No one remembers a coward!" - Jan Elfström 1998
        "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above

        1 Reply Last reply
        0
        • D Desmo16

          Hi all, I've a button to move to the next point in a plot when the button is pushed. The matter is that i must click on the button many times if i wanna continue to pass to the next point in the plot, while i would like to obtain this keeping clicked the button. How can i do that ? Thanx in advance, Desmo16.

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

          Desmo16 wrote:

          The matter is that i must click on the button many times if i wanna continue to pass to the next point in the plot, while i would like to obtain this keeping clicked the button. How can i do that ?

          Set timer and send BN_CLICKED message from it!

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

          cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief And You

          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