setMousePointer bug
- Posted by g.haberek at comcast.net Sep 18, 2002
- 566 views
This is a multi-part message in MIME format. --Boundary_(ID_WOHYqhfnhIjJ4i7bESTAjA) i found a bug (using Don Phillips' VSplitter control) in setMousePointer() when you set the mouse pointer to NULL or 0, the program crashes via kernel32.dll. go a head try it, here's my code: -- begin code include win32lib.ew without warning constant Main = create( Window, "Left click or right Click to change pointer (Right crashes!)", 0, Default, Default, .6, .6, 0 ) procedure onMouse_Main( integer event, integer x, integer y, integer shift ) if event = LeftDown then setMousePointer( Main, SizeNSPointer ) elsif event = RightDown then setMousePointer( Main, SizeWEPointer ) elsif event = LeftUp then setMousePointer( Main, ArrowPointer ) elsif event = RightUp then setMousePointer( Main, NULL ) end if end procedure onMouse[ Main ] = routine_id( "onMouse_Main" ) WinMain( Main, Normal ) -- end code An easy fix is to reset the pointer to ArrowPointer, but I would still like to know, is this a Win32Lib error or relly a kernel32.dll error? ~Greg --Boundary_(ID_WOHYqhfnhIjJ4i7bESTAjA) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: 7BIT <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type> <META content="MSHTML 5.00.2614.3500" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>i found a bug (using Don Phillips' VSplitter control) in setMousePointer() when you set the mouse pointer to NULL or 0, the program crashes via kernel32.dll. go a head try it, here's my code:</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>-- begin code</FONT></DIV> <DIV><FONT face=Arial size=2>include win32lib.ew<BR>without warning</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>constant Main = create( Window, "Left click or right Click to change pointer (Right crashes!)", 0, Default, Default, .6, .6, 0 )</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>procedure onMouse_Main( integer event, integer x, integer y, integer shift )</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2> if event = LeftDown then<BR> setMousePointer( Main, SizeNSPointer )<BR> elsif event = RightDown then<BR> setMousePointer( Main, SizeWEPointer )<BR> elsif event = LeftUp then<BR> setMousePointer( Main, ArrowPointer )<BR> elsif event = RightUp then<BR> setMousePointer( Main, NULL )<BR> end if</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>end procedure<BR>onMouse[ Main ] = routine_id( "onMouse_Main" )</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>WinMain( Main, Normal )</FONT></DIV> <DIV><FONT face=Arial size=2>-- end code</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>An easy fix is to reset the pointer to ArrowPointer, but I would still like to know, i</FONT><FONT face=Arial size=2>s this a Win32Lib error or relly a kernel32.dll error?</FONT></DIV> <DIV> </DIV> --Boundary_(ID_WOHYqhfnhIjJ4i7bESTAjA)--