1. SS_NOTIFY and mouse clicks
- Posted by "Andy Drummond" <andy at kestreltele.com> Nov 08, 2004
- 501 views
This is a multi-part message in MIME format. ------=_NextPart_000_0004_01C4C597.DB8C11E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit I am using static controls with the SS_NOTIFY style to draw myself some fancy special controls. It works fine but I get a w2HClick handler call for both the "click" and "unclick" events, and I can't find any way to differentiate one from the other. I am using a simple toggle which is not far off what I want but it is pretty easy to fool it. Can anyone tell me either how to respond only to "click" events or to tell if the mouse button is down or up? I have looked in the Win32Lib docs but can't find either .... Andy Drummond ------=_NextPart_000_0004_01C4C597.DB8C11E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 8bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2523" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>I am using static controls with the SS_NOTIFY style to draw myself some fancy special controls.</FONT></DIV> <DIV><FONT face=Arial size=2>It works fine but I get a w2HClick handler call for both the "click" and "unclick" events, and I can't find any way to differentiate one from the other. I am using a simple toggle which is not far off what I want but it is pretty easy to fool it.</FONT></DIV> <DIV><FONT face=Arial size=2>Can anyone tell me either how to respond only to "click" events or to tell if the mouse button is down or up? I have looked in the Win32Lib docs but can't find either ....</FONT></DIV> <DIV><FONT face=Arial size=2>Andy Drummond</FONT></DIV> <DIV> </DIV></BODY></HTML> ------=_NextPart_000_0004_01C4C597.DB8C11E0--
2. Re: SS_NOTIFY and mouse clicks
- Posted by Derek Parnell <ddparnell at bigpond.com> Nov 08, 2004
- 459 views
Andy Drummond wrote: > > This is a multi-part message in MIME format. > > ------=_NextPart_000_0004_01C4C597.DB8C11E0 > Content-Type: text/plain; > charset="iso-8859-1" > Content-Transfer-Encoding: 8bit > > I am using static controls with the SS_NOTIFY style to draw myself some fancy > special > controls. > It works fine but I get a w2HClick handler call for both the "click" and > "unclick" > events, What's an "unclick" event? A click event is a combination of Mousedown followed by MouseUp, within the double-click period, and within a few pixels of each other. By "click" are you meaning the MouseDown event and "unclick" the mouse UP event? If so, set you hander for w32HMouse events and watch for Down/Up events for the left and/or right button. >and I can't find any way to differentiate one from the other. I am using a > simple toggle which is not far off what I want but it is pretty easy to fool > it. > Can anyone tell me either how to respond only to "click" events or to tell if > the mouse > button is down or up? I have looked in the Win32Lib docs but can't find either > .... -- Derek Parnell Melbourne, Australia
3. Re: SS_NOTIFY and mouse clicks
- Posted by Tommy Carlier <tommy.carlier at telenet.be> Nov 08, 2004
- 488 views
Derek Parnell wrote: > What's an "unclick" event? A click event is a combination of Mousedown > followed by MouseUp, within the double-click period, and within a few > pixels of each other. Why does it have to be within the double-click period? If I press down the mouse button, I wait a second, and release the button without moving the mouse, shouldn't that count as a click? Certain people have heavy fingers, and when they press down a mouse button, it's physically tough to lift their heavy finger to release the button. I think it is important to make your applications accessible, also for people with heavy fingers. -- Recycle your pets. tommy online: http://users.telenet.be/tommycarlier tommy.blog: http://tommycarlier.blogspot.com
4. Re: SS_NOTIFY and mouse clicks
- Posted by Dave Probert <zingo at purpletiger.com> Nov 08, 2004
- 485 views
Tommy Carlier wrote: > > Derek Parnell wrote: > > What's an "unclick" event? A click event is a combination of Mousedown > > followed by MouseUp, within the double-click period, and within a few > > pixels of each other. > > Why does it have to be within the double-click period? If I press down > the mouse button, I wait a second, and release the button without moving > the mouse, shouldn't that count as a click? > > Certain people have heavy fingers, and when they press down a mouse button, > it's physically tough to lift their heavy finger to release the button. > > I think it is important to make your applications accessible, also for > people with heavy fingers. > > Or suggest they get helium filled mouse's - that way the mouse will rise onto their fingers and so lifting the heavy weight. And what about those people with really light fingers (they've probably stolen the mouse!) - they might not be able to click at all. There should be a w32HPossibleMouseClick event I think. . .. : :: = == == = :: : .. . Server-Side DB driven web sites, Software Development and part-time games developer contact dave_p at purpletiger dot com . .. : :: = == == = :: : .. .
5. Re: SS_NOTIFY and mouse clicks
- Posted by Derek Parnell <ddparnell at bigpond.com> Nov 08, 2004
- 450 views
- Last edited Nov 09, 2004
Tommy Carlier wrote: > > Derek Parnell wrote: > > What's an "unclick" event? A click event is a combination of Mousedown > > followed by MouseUp, within the double-click period, and within a few > > pixels of each other. > > Why does it have to be within the double-click period? If I press down > the mouse button, I wait a second, and release the button without moving > the mouse, shouldn't that count as a click? Maybe. On things like buttons and menus, things that have a specific Microsoft generated click event, the time delay is not significant. But on things like bitmaps, windows, labels etc... it might be. To me the 'concept' of a click is a short-sharp action (relatively speaking) which is different from a mouse up/down event. THat's why I choose to implement it this way. > Certain people have heavy fingers, and when they press down a mouse button, > it's physically tough to lift their heavy finger to release the button. > > I think it is important to make your applications accessible, also for > people with heavy fingers. Such people already tend to have set their double-click period to a reasonable length for themselves. However, I can easily set up Win32lib so that the coder has a choice over this aspect of a click event. It'll be in the next version for you. -- Derek Parnell Melbourne, Australia
6. Re: SS_NOTIFY and mouse clicks
- Posted by "Wolf" <wolfritz at king.igs.net> Nov 09, 2004
- 473 views
> However, I can easily set up Win32lib so that the coder has a choice over > this aspect of a click event. It'll be in the next version for you. 'coder' ? Ok, this'll be great for us folks who fall asleep at the mouse, ... or still use a 386SX16 at 8 mhz. Seriously though, a more useful win32lib function might be one that prints out cheques to the user as recipient, with ...you know, ...Derek Parnell's signature ! Please! What's a few more kilobucks, err, kilobytes here or there....
7. Re: SS_NOTIFY and mouse clicks
- Posted by Tommy Carlier <tommy.carlier at telenet.be> Nov 09, 2004
- 532 views
Derek Parnell wrote: > Tommy Carlier wrote: > > Derek Parnell wrote: > > > What's an "unclick" event? A click event is a combination of Mousedown > > > followed by MouseUp, within the double-click period, and within a few > > > pixels of each other. > > Why does it have to be within the double-click period? If I press down > > the mouse button, I wait a second, and release the button without moving > > the mouse, shouldn't that count as a click? > Maybe. On things like buttons and menus, things that have a specific > Microsoft generated click event, the time delay is not significant. But on > things like bitmaps, windows, labels etc... it might be. > > To me the 'concept' of a click is a short-sharp action (relatively speaking) > which is different from a mouse up/down event. THat's why I choose to > implement it this way. > > Certain people have heavy fingers, and when they press down a mouse button, > > it's physically tough to lift their heavy finger to release the button. > > > > I think it is important to make your applications accessible, also for > > people with heavy fingers. > Such people already tend to have set their double-click period to a > reasonable length for themselves. > > However, I can easily set up Win32lib so that the coder has a choice over > this aspect of a click event. It'll be in the next version for you. Well, I don't need the feature, so you don't have to do it for me. The reason I'm asking, is because I'm working on Win4Eu, and I've just implemented the Click-event myself. I've looked at your implementation in Win32Lib, and I've looked at Microsoft's implementation for the .NET framework (which is a lot more complicated). Their implementation doesn't even check the mouse movement. They just check if the mouse cursor is still on the control. So if you press the mouse button on a control, you move the cursor around (over other controls), you move the cursor back over the original control and release the button, a click-event is generated. My current implementation is a bit of both worlds: it does check if the mouse has moved a lot, but it doesn't check the time between pressing and releasing the button. -- Recycle your pets. tommy online: http://users.telenet.be/tommycarlier tommy.blog: http://tommycarlier.blogspot.com