Progress Bar: Fix Class Style & Repainting (resend2)

Robert Shearman rob at codeweavers.com
Wed Sep 29 06:29:41 CDT 2004


Dimitrie O. Paun wrote:

>On Tue, Sep 28, 2004 at 12:12:09PM -0700, Alexandre Julliard wrote:
>  
>
>>Robert Shearman <rob at codeweavers.com> writes:
>>
>>    
>>
>>>Changelog:
>>>- Fix class style to include the hbrBackground member.
>>>- Fix repainting issues introduced by this change.
>>>- Add WM_ERASEBKGND handler and remove background drawing code from
>>>the WM_PAINT handler.
>>>      
>>>
>>Isn't that going to cause a lot of flicker?  This was the reason for
>>the existing code, because otherwise it looks really bad with apps
>>that update the progress bar a lot.
>>    
>>
>
>Indeed, IIRC I've tried to have as optimum background drawing code
>as possible (in terms of overwriting areas, etc), as flicker in the
>progress bar would look rather ugly.
>  
>

Yes, I saw the hack we have in the Crossover code and saw the discussion 
last year. This code still keeps code that doesn't unnecessarily redraw 
the background, but the whole client area needs to be painted each time 
(even if normally nothing is drawn in the rest of the area), because 
some InstallShields depend on this for correctly displaying the % in 
their progress bars.

>We have to be careful with these sort of changes, in that there are
>some controls that work real hard to avoid flicker as much as possible.
>Yes, the code is bigger, more complicated, and maybe sometimes not
>100% the way MS does it. But if it doesn't cause any problems, having
>a good looking control is important IMO.
>  
>

Feel free to test the code and report any flicker. I'll fix the marquee 
case and then send you a test program if you like.

Rob





More information about the wine-devel mailing list