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 control

Button control

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

    Hi there, Can someone please help me. I am programming a dialog GUI for a touch screen interface to control a motor and I want it to run the motor when someone presses the button and holds it and then the motor is stopped when it button is released. Can I use BN_PUSHED and BN_UNPUSHED? or is there another way. Does anyone have any examples that I could reference? Cheers Jim :confused:

    PJ ArendsP N 2 Replies Last reply
    0
    • J jimjim733

      Hi there, Can someone please help me. I am programming a dialog GUI for a touch screen interface to control a motor and I want it to run the motor when someone presses the button and holds it and then the motor is stopped when it button is released. Can I use BN_PUSHED and BN_UNPUSHED? or is there another way. Does anyone have any examples that I could reference? Cheers Jim :confused:

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      BN_PUSHED and BN_UNPUSHED are old 16bit windows notifications used for drawing owner drawn buttons. Do not use them. You should be be handling the WM_LBUTTONDOWN and WM_LBUTTONUP messages (or what ever the touch screen equivalent is) that are sent to your button control.


      You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      1 Reply Last reply
      0
      • J jimjim733

        Hi there, Can someone please help me. I am programming a dialog GUI for a touch screen interface to control a motor and I want it to run the motor when someone presses the button and holds it and then the motor is stopped when it button is released. Can I use BN_PUSHED and BN_UNPUSHED? or is there another way. Does anyone have any examples that I could reference? Cheers Jim :confused:

        N Offline
        N Offline
        Nishad S
        wrote on last edited by
        #3

        Would my article help you? [ODBaseBtn]

        - NS -

        J 1 Reply Last reply
        0
        • N Nishad S

          Would my article help you? [ODBaseBtn]

          - NS -

          J Offline
          J Offline
          jimjim733
          wrote on last edited by
          #4

          Thanks for the help. That's all running now. Jim :-D

          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