1. Win32Lib: onMouse not work completely? (in 44e & 45r)

David,

I can't get the onMouse trap to work right in versions 44e & 45r; in a
WINDOW, the left & right double click don't work for me, and if I reference
the trap to a LIST BOX, then in addition to the left & right 2x click not
working, the move event doesn't respond.  Below is a demo of the problem.
Am I doing something wrong??

Dan Moyer

P.S.  Hope you change the default font back or give options, as I can't read
that tiny font in 45r very well at all.


-- 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 )

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu