Win32Lib50c bug: onMouse: L & R dbl clicks,

new topic     » topic index » view thread      » older message » newer message

David,

Win32Lib 0.50c  either has a bug relative to "onMouse" which has persisted
from 44e & 45r, or I'm just using it wrong. ( Problem demo program below. )

If I use the onMouse trap in a WINDOW, neither the left nor the right
*double click* work; and if I reference the trap to a LIST BOX, then in
addition to the left & right 2x click not working, the *mouseMove* event
doesn't respond. rightDown works in both window & list box.

Am I doing something wrong??

And, is there a way to set the default font back to SYSTEM_FONT instead of
that tiny ANSI_VAR_FONT, other than by a user changing Win32Lib & loosing
the "free" count?  That is, a procedure that would allow a programmer to
select *what* the default font is, rather than just ask that the default
font be used?  I find that tiny font too small to read well.

Dan Moyer

-- onMouse problem demo code:
-- CODE BEGINS:
--  code generated by Win32Lib IDE v0.8

include Win32Lib.ew
without warning

----------------------------------------------------------------------------
----
--  Window Window1
global constant Window1 = create( Window, "The Window", 0, Default, Default,
560, 376+ 19, 0 )
global constant LText1 = create( LText, "", Window1, 144, 40, 156, 28, 0 )
global constant List3 = create( List, "List3", Window1, 20, 220, 384, 128,
0 )
global constant LText4 = create( LText, "move mouse :", Window1, 24, 40,
124, 28, 0 )
global constant LText5 = create( LText, "", Window1, 440, 40, 152, 28, 0 )
global constant LText6 = create( LText, "move mouse:", Window1, 320, 40,
116, 28, 0 )
global constant LText7 = create( LText, "", Window1, 440, 76, 152, 32, 0 )
global constant LText8 = create( LText, "Right down:", Window1, 320, 76,
104, 32, 0 )
global constant LText9 = create( LText, "Left 2x click:", Window1, 25, 115,
108, 28, 0 )
global constant LText10 = create( LText, "", Window1, 128, 115, 150, 20, 0 )
global constant LText11 = create( LText, "Right 2x click:", Window1, 25,
158, 116, 28, 0 )
global constant LText12 = create( LText, "", Window1, 140, 158, 150, 20, 0 )
global constant LText13 = create( LText, "Left 2x click:", Window1, 320,
115, 112, 28, 0 )
global constant LText14 = create( LText, "", Window1, 440, 116, 148, 24, 0 )
global constant LText15 = create( LText, "WINDOW MOUSE EVENTS:", Window1,
20, 8, 150, 20, 0 )
global constant LText16 = create( LText, "LIST BOX MOUSE EVENTS:", Window1,
300, 12, 150, 20, 0 )
global constant LText17 = create( LText, "Right down :", Window1, 25, 76,
120, 24, 0 )
global constant LText18 = create( LText, "", Window1, 136, 76, 148, 24, 0 )
global constant LText19 = create( LText, "Right 2x click:", Window1, 320,
156, 158, 20, 0 )
global constant LText20 = create( LText, "", Window1, 440, 157, 150, 20, 0 )
----------------------------------------------------------------------------
----

procedure Window1_onMouse ( int event, int x, int y, int shift )
if event = MouseMove then
  setText(LText1, sprint(x) & "  " & sprint(y))
elsif event = LeftDoubleClick then
  setText(LText10, sprint(x) & "  " & sprint(y))
elsif event = RightDoubleClick then
  setText(LText12, sprint(x) & "  " & sprint(y))
elsif event = RightDown then
  setText(LText18, sprint(x) & "  " & sprint(y))
end if
end procedure

onMouse[Window1] = routine_id("Window1_onMouse")

----------------------------------------------------------------------------
----

procedure List3_onMouse ( int event, int x, int y, int shift )

if event = MouseMove then
   setText(LText5, sprint(x) & "  " & sprint(y))
elsif event = RightDown then
   setText(LText7, sprint(x) & "  " & sprint(y))
elsif event = LeftDoubleClick then
   setText(LText14, sprint(x) & "  " & sprint(y))
elsif event = RightDoubleClick then
   setText(LText20, sprint(x) & "  " & sprint(y))
end if
end procedure

onMouse[List3] = routine_id("List3_onMouse")

----------------------------------------------------------------------------
----

WinMain( Window1, Normal )

-- CODE END

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu