setMousePointer bug

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

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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>procedure onMouse_Main( integer event, integer x, 
integer y, integer shift )</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; &nbsp;if event = LeftDown 
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; setMousePointer( Main,
SizeNSPointer )<BR>&nbsp;&nbsp;&nbsp; &nbsp;elsif event = RightDown 
then<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;setMousePointer( Main,
SizeWEPointer )<BR>&nbsp;&nbsp;&nbsp; &nbsp;elsif event = LeftUp 
then<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;setMousePointer( Main,
ArrowPointer )<BR>&nbsp;&nbsp;&nbsp; &nbsp;elsif event = RightUp 
then<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;setMousePointer( Main,
NULL )<BR>&nbsp;&nbsp;&nbsp; &nbsp;end if</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>end procedure<BR>onMouse[ Main ] = routine_id( 
"onMouse_Main" )</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>WinMain( Main, Normal )</FONT></DIV>
<DIV><FONT face=Arial size=2>-- end code</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>

--Boundary_(ID_WOHYqhfnhIjJ4i7bESTAjA)--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu