At 09:40 PM 9/10/00 -0500, you wrote:

>Hmm, are you sure this is what we want ?

I don't see another way to solve this problem - the code I quote as
an example of the problem is taken from a real trace (the validated
window is the parent of the listbox in fact, but it amounts to the same
result). If you have another idea, I'll be interested to test it.

>AFAICS this forcibly refreshes the *whole* listbox.

The *whole* listbox ? I beg to differ here. UpdateWindow does not
necessarily repaint the whole window, what it does is asking the
window to repaint itself *now*. If only a small part of the window
needs repainting and the window repaint everything, it's the decision
of the window itself, not the caller of UpdateWindow. In the case
I have, redrawing the window belongs to the app since it's an
owner-drawn window.

>Not that the current way of doing things in the listbox/listview code is
>perfect (we have way too much flickering left), but...

That's a different problem - not a space question (the *whole*
listbox) but a time question.

>Or am I wrong here ?

No, this will cause more flickering.

The question is how to solve the show example in a more
efficient way ? You see, what Windows does *not* is to try to
never flicker in every combination of sequences of calls.
I guess that Ms engineers have thought that it was too ambitious 
and  would lead to exponentially complex code; clearly, for controls
such as listbox (or listview), the responsability of *eliminating* 
flicker belong to the application itself (you need to take a look
at sample code used to demonstrate these controls); that's the
fonction of the WM_SETREDRAW api (called constantly by the
application I'm trying to fix)

My opinion is that ultimately your question is really : 'do we want 
to do a better Win32 api than the Windows one, or do we want
bug-for-bug emulation'. As I am trying to make existing apps
run (without possibility of code change) I prefer the latter.
But in fact 'having a better windows than windows' and 'bug
for bug compatibility' are not always compatible goals.

If you can point me to a real application that is flickering more
with my patch than without, I'm interested nonetheless.

Gerard

Reply via email to