Re: Windows vertical retrace
- Posted by ags <eu at 531pi.co.nz> Jun 21, 2006
- 803 views
Derek Parnell wrote: > > ags wrote: > > > One question though.. why is there no non-erasing equivalent for paintRect? > > Because nobody asked for it. > > }}} <eucode> > global procedure redrawRect( integer id, integer x1, integer y1, integer x2, > integer y2 ) > > -- Redraws only a portion of the window > atom hWnd > atom rect > > -- Allocate rectangle > rect = w32acquire_mem( 0, SIZEOF_RECT ) > poke4(rect, {x1,y1,x2,y2}) > > hWnd = getHandle( id ) > > -- invalidate sub-window of the current window > if w32Func( xInvalidateRect, {hWnd, rect, 0} ) then > VOID = w32Func(xSendMessage,{hWnd, WM_PAINT, 0, 0 }) > end if > > -- Free the rectangle structure > w32release_mem( rect ) > > end procedure > > </eucode> {{{ > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell This works well. Though with rapidly updating graphics it still seems better to repaint everything at once. Thanks Gary