Re: Windows vertical retrace
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 21, 2006
- 543 views
ags wrote: > One question though.. why is there no non-erasing equivalent for paintRect? Because nobody asked for it.
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
-- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell