How to handle hover + mouse down on a control ?

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
 
A

Alex Koltun

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top