Re: How does status windows update?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




>>So if I do something like a 2Hz updates, I should be fine?

It depends on how is your painting implemented. Say, if you
are erasing the whole background and then sequentially painting
something over it then you may get a flicker effect. In the same
time, if you only update the changed "dirty" regions, this will
significantly reduce flickers. And if you decide to use off-screen
DC to draw everything on it and then copy to on-screen DC, you wont
get flickers.

>>what is 'DC' and 'blinting'?

DC (AKA Device Context) is a handle to internal GDI structure
which represents an abstract "canvas" where you draw using
various drawing operations. This may be window DC, printer DC,
some memory off-screen DC etc. DCs also hold information about
your current drawing modes (ROP, Map Mode, etc) and current
"selected" tools like "pen", "brush", "font", "clip region"
etc.

Blitting is simple "bitmap copy" operation, in GDI world
usually means copying from DC to another DC using BitBlt()
API function.


benkokes@xxxxxxxxxxx wrote:
So if I do something like a 2Hz updates, I should be fine?

what is 'DC' and 'blinting'?

Thanks!
-B
voidcoder wrote:
In the most cases is possible to avoid flicker
drawing first on the off screen DC and then
blitting it to the visible screen DC. Anyway,
it doesn't make sense to do it very often,
2-4 times per second is always enough so use
some simple time checking method (e.g. GetTickCount())
to not update more often than necessary.


On Fri, 13 Oct 2006 23:49:41 +0200, benkokes@xxxxxxxxxxx <benkokes@xxxxxxxxx> wrote:

Hey all,

I was wondering how something like a download status box updates its
text? ( Like the percentage complete).
Invalidating a window and redrawing it would cause a significant amount
of flicker, and it seems that the exsiting status boxes do the update
without flicker...

Any ideas?

Thanks,
-Ben



.



Relevant Pages

  • Re: Transparency (2)
    ... to flicker a bit so... ... I did make some experiments with this in the application's splash form with pretty nice results. ... better off drawing it to a hidden bitmap in memory and then blitting that directly to the main Form. ...
    (comp.lang.basic.visual.misc)
  • Re: Unable to use AllPaintingInWmPaint, and flickering
    ... If you're doing all the drawing and have correctly set up the double ... buffering then you shouldn't see a flicker. ... "Matthew Judd" wrote in message ... they shouldn't effect the drawing of the control right? ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Reducing "icon button" flicker on Vista ?
    ... I was calling the following between the GradientFill and ... I'm basically calling the following when drawing my own icon buttons: ... AlphaBlend or DrawIconEx ... When using a Windows Vista theme and 32 bit color, there is a lot of flicker ...
    (microsoft.public.win32.programmer.gdi)
  • RE: Flicker when drawing owner-drawn control
    ... along with double buffering and OnEraseBkgnd are the only clear ... "eepcat" wrote: ... I am dealing with a flicker issue when drawing an owner drawn custom ... I made a subclass of the CButton class which handles all of the drawing ...
    (microsoft.public.windowsce.embedded.vc)
  • Flicker when drawing owner-drawn control
    ... I am dealing with a flicker issue when drawing an owner drawn custom ... I made a subclass of the CButton class which handles all of the drawing ... ....but I still have flicker when drawing the control, ...
    (microsoft.public.windowsce.embedded.vc)