How to handle hover + mouse down on a control ?

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Is there any C++ .NET best practice for handling the case where a mouse is
held on
a control and the right-button is held down - signifying a rapidly repeating
action
equivalent to clicking the left button a bunch of times?

For example, I have a button that one mouse click increments the value. I
would like to add
the feature where holding the left button down while over the control causes
the value to
increment repeatedly as the button is held down.

The brute-force approach might be to start a timer on mouse_left_down and
then wait for
the mouse_left_up event firing to stop the action. Is there some simpler
way to implement this?

-- Tom
 
Hi,

If you don't want go all the long way and use WIN API , the way you
described is the way to go , and it is relativly strightforward.

Hope I helped you to make a decision.
 
Back
Top