Re: [Win32lib] Two problems and one fix
- Posted by Martin Stachon <martin.stachon at worldonline.cz> Apr 30, 2003
- 517 views
Thanks Derek. Actually, my problem was because I called getClientRect() to get window client rect and then setRect() for control inside the window. But setRect() also calls getClientRect() so the toolbar height was added in twice. Now I call setRect(id, 0, 0, ..) and it works fine. Martin > Martin, > actually I was too quick with my reply. A better fix for the getClientRect > is to replace the line ... > > rect[2] = size[2] > > with these TWO lines ... > > rect[2] += size[2] > rect[4] -= size[2] > > ---------------- > cheers, > Derek Parnell > ----- Original Message ----- > From: "Martin Stachon" <martin.stachon at worldonline.cz> > To: "EUforum" <EUforum at topica.com> > Sent: Wednesday, April 30, 2003 1:27 AM > Subject: [Win32lib] Two problems and one fix > > > > Hi Derek and all allied win32lib programmers. > > I've found two new problems with the latest win32lib. > > > > a) setWindowScrollRange() setting does not take effect > > until the scrollbar is forced to redraw. Patch to fix > > this is below. > > > > b) client rectangle (getClientRect) is incorrect if toolbar > > is present. No patch for this :( > > > > The patch : (GNU diff -u format) > > > > --- f:\downloads\w32005805\include\win32lib.ew Fri Apr 18 03:35:48 2003 > > +++ c:\euphoria\win32lib\win32lib.ew Tue Apr 29 16:49:04 2003 > > @@ -17214,10 +17219,10 @@ > > > > > > VOID = w32Func( xSetScrollInfo, > > - { getHandle( id ), -- handle > > + { getHandle( id ), -- handle > > typeScroll, -- > > sif, -- pointer to structure > > - 0 } ) -- redraw flag > > + 1 } ) -- redraw flag > > > > -- Free structure > > release_mem( sif ) > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > > TOPICA - Start your own email discussion group. FREE! > >