PDA

View Full Version : event wheel when left click


gizmo27
19th November 2009, 00:51
hi

I'm programming in c++ with API WINDOWS

I got my push button and when I click on : values are increasing

but there's an effect only if I click one time : else nothing happens.

I'd like the values to increased even if the wheel left click is sticked into

the values "stop" when I stop pushing the left click

do you understand ?

to be clear : I push 10 times on the left click and the value increase from '1' to '10' 1 by 1
I want to push only 1 time : and see the values increasing from '1' to '10'

is it possible with a push button ?

neuron2
19th November 2009, 01:57
It works automatically for spin buttons. Try out the Video/Luminance dialog in DGIndex.

If you must do it with a button, then you'll have to start a timer or something to generate your actions as long as the state is down. Then kill the timer when you get the up event. Something like this:

http://www.codeproject.com/KB/buttons/autorepeat.aspx

gizmo27
19th November 2009, 11:13
spin button are updown control in fact ?

how to make it work with 2 edit box ?

using 2 buttons : 1 for 'UP' et 1 for 'DOWN' appears to be easier for me

I'm novice for windows programming : I don't really know what's a classe and an under class and how to create

I went on the site but the code is not complete and you must login to download te source

neuron2
19th November 2009, 15:21
spin button are updown control in fact ? Alternate names, yes. They are called spin buttons by Microsoft, the developers of the Win32 API, so one should use that term.

how to make it work with 2 edit box ? Answered in your other thread.

using 2 buttons : 1 for 'UP' et 1 for 'DOWN' appears to be easier for me Whatever floats your boat.

I'm novice for windows programming : I don't really know what's a class and an under class and how to create You don't have to create a derived class. You just need to implement his timer idea. But as a novice programmer even that may be a challenge for you.

I went on the site but the code is not complete and you must login to download te source So make an account and login!