on 2/19/07 11:40 PM, Scott Crick (Lists) at [EMAIL PROTECTED] wrote: > On 2/18/07 9:04 PM, "Chris Little" <[EMAIL PROTECTED]> wrote: > >> Refresh and Invalidate do the same thing. Refresh calls Invalidate and then >> UpdateWindow to force the invalidated region to be repainted. If you are >> calling Refresh or Invalidate you need to be passing false as a parameter to >> surpress the automatic erase that the RB framework adds before calling the >> paint events of the Windows and then the controls that intersect the >> invalidated area. Call Refresh if you need an immediate redraw or invalidate >> if you want lazy painting. >> >> You shouldn't have to do anything to handle the normal paint events. The key >> to making transparency to work is to never erase. The stuff underneath look >> after all of that. That may mean that the window has to do some erasing. It >> depends on your situation. > > Okay...then perhaps I'm still missing something rather obvious. Let's look > at a concrete example. I have a sample project at > <http://www.searchwaresolutions.com/other/custombuttontest.zip> (44k) that > implements a custom pushbutton using custom graphics and masks for > transparency. > > In the drawing method, I have to use a ClearRect call in order to clear out > the old graphics, otherwise the graphics of the button become distorted as > it draws the button over itself (and the anti-aliased edges). > > How does this relate to Refresh and/or Invalidate? I can't call this in the > drawing method otherwise I get into a continuous loop of Paint events and > Refresh calls. > > In the context you are describing above, how do I go about replacing all the > graphics and still have the background show through, but without flicker > (especially on Windows)?
I sent an updated sample off-list. Chris _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
