1. Win32Lib Bug fix
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BDE322.9FC5819A
charset="iso-8859-1"
Michael wrote with about a problem with disappearing buttons in Win32Lib.
There *is* a bug in Win32Lib, in the redrawWindow() function. Turns out to
be a fairly old one, too. I had been using the "current window" handle,
instead of the handle of the id passed to the routine. The procedure should
be corrected to:
global procedure repaintWindow( integer id )
-- redraws *everything*
integer hwnd
-- get the handle
hwnd = window_handle[id]
-- invalidate all of the current window, and clear it
if not c_func( xInvalidateRect, {hwnd, NULL, 1} ) then
abortErr( "InvalidateRect in wrepaintWindow failed." )
end if
-- set the full refresh flag
window_refresh[id] = 1
-- trigger an immediate paint message
ok = c_func( xSendMessage, { hwnd, WM_PAINT, 0, 0 } )
end procedure
This will take care of most of the problems. There is still a problem with
buttons disappearing from the form, but that's another kind of bug (I'm
sending him that fix, too).
I'll post the update when Robert gets back. Sorry for the inconvenience.
-- David Cuny
------_=_NextPart_001_01BDE322.9FC5819A
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2232.0">
<TITLE>Win32Lib Bug fix</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Michael wrote with about a problem with disappearing =
buttons in Win32Lib.</FONT>
</P>
<P><FONT SIZE=3D2>There *is* a bug in Win32Lib, in the redrawWindow() =
function. Turns out to be a fairly old one, too. I had been using the =
"current window" handle, instead of the handle of the id =
passed to the routine. The procedure should be corrected to:</FONT></P>
<BR>
<P><FONT SIZE=3D2>global procedure repaintWindow( integer id )</FONT>
</P>
<P><FONT SIZE=3D2> -- redraws *everything*</FONT>
<BR><FONT SIZE=3D2> integer hwnd</FONT>
</P>
<P><FONT SIZE=3D2> -- get the handle</FONT>
<BR><FONT SIZE=3D2> hwnd =3D window_handle[id]</FONT>
</P>
<P><FONT SIZE=3D2> -- invalidate all of the current =
window, and clear it</FONT>
<BR><FONT SIZE=3D2> if not c_func( xInvalidateRect, =
{hwnd, NULL, 1} ) then</FONT>
<BR><FONT SIZE=3D2> abortErr( =
"InvalidateRect in wrepaintWindow failed." )</FONT>
<BR><FONT SIZE=3D2> end if</FONT>
</P>
<P><FONT SIZE=3D2> -- set the full refresh =
flag</FONT>
<BR><FONT SIZE=3D2> window_refresh[id] =3D 1</FONT>
</P>
<P><FONT SIZE=3D2> -- trigger an immediate paint =
message</FONT>
<BR><FONT SIZE=3D2> ok =3D c_func( xSendMessage, { =
hwnd, WM_PAINT, 0, 0 } )</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>end procedure</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>This will take care of most of the problems. There is =
still a problem with buttons disappearing from the form, but that's =
another kind of bug (I'm sending him that fix, too).</FONT></P>
<P><FONT SIZE=3D2>I'll post the update when Robert gets back. Sorry for =
the inconvenience.</FONT>
</P>
<P><FONT SIZE=3D2>-- David Cuny</FONT>
</P>
</HTML>
------_=_NextPart_001_01BDE322.9FC5819A--