Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 27 OCT 1998 12:44:46PM Paxton Scott wrote:

I hooked 2 proceedures to an edit box using "click" and "dblclick".

They both worked just fine as long a only one at a time was attached.

When both are attached, only the "click" event activates. No matter how fast I double click, the click event always executes.

What is the trick to allowing both a "click" and a "double click" to be attached to the same edit box at the same time?

Thanks for your insight!

arcs@wws.net

ARCS, Inc. [img]http://www.wws.net/arcs/arcslogo.gif[/img] </QUOTE> ---- === At 27 OCT 1998 01:26PM Carl Pates Sprezzatura wrote: === <QUOTE>Hi Paxton, AFAIK you can't do this because the system (Windows) will always fire off a 'CLICK' message before it works out that a double click has taken place. OI then picks these messages up and fires off your code accordingly. Perhaps you could detect a right click or the shift/ctrl/alt key to distinguish between the different actions? cpates@sprezzatura.com [url=http://www.sprezzatura.com" ]Sprezzatura Ltd

World Leaders in all things RevSoft


At 27 OCT 1998 03:13PM DSig (SigSolutions) wrote:

Not to argue with someone from Sprezzatura so I am actually looking for knowledge from those who are 'all things revsoft'

Is this true in all programs out there .. it seems that I have done both on a control (although I can't come up with an example right now).

DSig

David Tod Sigafoos ~ SigSolutions

dsig@teleport.com


At 28 OCT 1998 07:52AM Carl Pates Sprezzatura wrote:

Hi David,

This is from the Windows SDK, explaining the WM_LBUTTONDBLCLK message

Only windows that have the CS_DBLCLKS class style can receive WM_LBUTTONDBLCLK messages. Windows generates a WM_LBUTTONDBLCLK message when the user presses, releases, and again presses the left mouse button within the system's double-click time limit. Double-clicking the left mouse button actually generates four messages: a WM_LBUTTONDOWN message, a WM_LBUTTONUP message, the WM_LBUTTONDBLCLK message, and another WM_LBUTTONUP message.

As the system fires off the WM_LBUTTONDOWN and WM_LBUTTONUP messages before it fires of the WM_LBUTTONDBLCLK message I can't see how you can fail to run an OI CLICK event before you run the OI DBLCLK event. However, if there is a way around this I'd sure like to know too !

Regards

cpates@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft :-)


At 28 OCT 1998 10:03AM Dimitri wrote:

I've been having the same proble with right click and right double click on a control. The right click (cut copy paste popup) triggers instead of the right double click event in the WINMSG event.

I've been trying to make the right double click event the default drill down button for my app. Does anybody know how to do shift right

double click.

By the way left click and left double click works but I use the gotfocus event for left click and the WINMSG for left double click.


At 28 OCT 1998 12:57PM Carl Pates Sprezzatura wrote:

Dimitri,

I guess you're working on a Win32 system? If so what you're seeing is the result of a WM_CONTEXTMENU message that Windows sends when it gets a right click. The only way to stop this launching AFAIK is to subclass the control via a custom DLL to intercept and stop OI getting it. Then you should be able to get the double click message as normal.

All theoretically of course …

cpates@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 01 NOV 1998 02:51PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:

Like when you're editing on this board, and you can click on a spot to place the cursor there, or double click and highlight a word. All apps work the same way in this regard. Encoded into the control's click event is code polling the buffer and examing the next event. If there's another click there, it assumes a double click, based on timing code, and fires that off.

One could do this in one's own controls, if wanted. I'm sure Sprezz would be more than willing to consult with you on this :)

akaplan@sprezzatura.com

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/2195be9fe8ba0463852566aa005bfd5f.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1