Re: Redraw Issue

new topic     » goto parent     » topic index » view thread      » older message » newer message

Here is some code I personally use for window resize.
It's rather quick to see that InvalidateRect would 
force a repaint of the entire Window.

Possibly (not haveing looked first) that the library
you use to handle this is forceing more than one 
InvalidateRect or haveing a Paint event tied closely
to this....

When I use the routine (below) to resize windows, even on a
somewhat slow 233mhz machine, I experience 0 (zero)
flicker........tested with 20+ controls in the client as well....

</snip>


    elsif iMsg = WM_SIZE then
     
          inc = HIWORD(lParam)-peek4s(rect_Bottom)
          if inc > 0 and orgY >= vyScreen-peek4s(rect_Bottom) then 
             orgY -= inc
          end if

          if orgY < 0 then 
             orgY = 0
          end if

          inc = LOWORD(lParam)-peek4s(rect_Right)
          if inc > 0 and orgX >= vxScreen-peek4s(rect_Right) then 
             orgX -= inc
          end if

          if orgX < 0 then 
             orgX = 0
          end if
      
          c_proc(GetClientRect, {hwnd,rect})

          poke4(sifMask,or_bits(SIF_RANGE, SIF_POS))
          poke4(sifMin, 0)
          
          poke4(sifMax,vxScreen-peek4s(rect_Right))
          poke4(sifPos,orgX)
          ok = c_func(xSetScrollInfo,{hwnd, SB_HORZ, si, 1})  
                
          poke4(sifMax,vyScreen-peek4s(rect_Bottom))
          poke4(sifPos,orgY)
          ok = c_func(xSetScrollInfo,{hwnd, SB_VERT, si, 1})
          
          return c_func(xInvalidateRect, {hwnd, NULL, 0})

<snip/>

ck, your answer about the window being smooth in the demo I
sent you answers my question about your hardware. There is nothing
wrong with it.....Its must be your code or the library you are useing!

Euman
euman at bellsouth.net

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu