| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | While the button is down |
I'd like to be able to press a pushbutton and increase
a variable while the pushbutton is being pressed.
Here's how I could do this. I could use a UserButton
an respond to the BN_CLICKED, paint the button in the highlighted
state, start a timer, and increase the variable every time I receive
a timer notification. And when I press the UserButton again, I
would terminate the timer.
I don't like this because I have to press the button to
start the timer, and then press it again to stop the timer. What I
want is a way of increasing the timer while the button is being pressed
down. So my second idea about this is to respond to the WM_BUTTON1DOWN
message, start the timer, increase the variable at every timer
notification, and then terminate the timer when I receive the
WM_BUTTON1UP message. I've tried this approach, but I don't seem to be
receiving WM_BUTTON... messages when I'm pressing down on a UserButton
or PushButton.
So I'm stuck, and don't know how to accomplish this. I know
it is possible, since the CD Player that comes with Warp can do it.
Any ideas?
Stephane [TEAM OS/2]
--- Blue Wave/OS2 v2.20
* Origin: Juxtaposition BBS (1:167/133)SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/888 800/1 @PATH: 167/133 116 90 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.