1. [WIN] How to ignore doubleClicks

Hi, all

I'm having trouble with a program which has several button controls
(Win32lib.ew). If a user clicks on a button, the
expected processes execute correctly. But, if the user double-clicks on a
button, the program code executes twice. I
need a way to have the program treat a 'double-click' as if it were a 'single
left-click'. I've searched through the
programs which came with Win32Lib (v.55.1) and found 'if event =
LeftDoubleClick' in program 'RUNTHIS.EXW', but haven't
been able to get this working in the program I'm working on (get error "event"
has not been assigned a value."

Any suggestions are appreciated.

TIA

Josh

new topic     » topic index » view message » categorize

2. Re: [WIN] How to ignore doubleClicks

Hi Josh,
    at first glace, I'd say there is a problem with your code then. The
"event" parameter is sent to the onMouse handler and definitely has a value.
But just to make sure, does the Euphoria error refer to a line in win32lib
code or your code?

There is a known bug with double-clicks being ignored on Window controls,
but you mention that you're using buttons. Is that a PushButton control
then?

To fix the ignored double-clicks you need to change the win32lib.ew file.
Replace the line that has ...

    vWindowClassStyle = {CS_HREDRAW, CS_VREDRAW}

with ...

    vWindowClassStyle = {CS_HREDRAW, CS_VREDRAW, CS_DBLCLKS }

but i don't think that's your problem, in this case.

For other controls, Windows sends the mouse events in this order ...

onMouse(WM_LBUTTONDOWN)
onMouse(WM_LBUTTONUP)
onClick()
onMouse(WM_LBUTTONDBLCLK)
onMouse(WM_LBUTTONUP)

and there maybe some onMouse(WM_MOUSEMOVE) in amongst those.

Finally, you can always send me the code (or a reproducable sample of the
problem) to examine.
------
Derek Parnell
Melbourne, Australia
"To finish a job quickly, go slower."

----- Original Message -----
From: "Jim Duffy" <futures8 at earthlink.net>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, May 15, 2001 5:01 AM
Subject: [WIN] How to ignore doubleClicks


> I'm having trouble with a program which has several button controls
(Win32lib.ew). If a user clicks on a button, the
> expected processes execute correctly. But, if the user double-clicks on a
button, the program code executes twice. I
> need a way to have the program treat a 'double-click' as if it were a
'single left-click'. I've searched through the
> programs which came with Win32Lib (v.55.1) and found 'if event =
LeftDoubleClick' in program 'RUNTHIS.EXW', but haven't
> been able to get this working in the program I'm working on (get error
"event" has not been assigned a value."

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu