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 =
&quot;current window&quot; 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>&nbsp;&nbsp;&nbsp; -- redraws *everything*</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; integer hwnd</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; -- get the handle</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; hwnd =3D window_handle[id]</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; -- invalidate all of the current =
window, and clear it</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; if not c_func( xInvalidateRect, =
{hwnd, NULL, 1} ) then</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; abortErr( =
&quot;InvalidateRect in wrepaintWindow failed.&quot; )</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; end if</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; -- set the full refresh =
flag</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; window_refresh[id] =3D 1</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; -- trigger an immediate paint =
message</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; 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--

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu