Re: How does status windows update?
- From: voidcoder <voidcoder@xxxxxxxxx>
- Date: Tue, 17 Oct 2006 22:18:57 +0200
>>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
- References:
- How does status windows update?
- From: benkokes@xxxxxxxxxxx
- Re: How does status windows update?
- From: voidcoder
- Re: How does status windows update?
- From: benkokes@xxxxxxxxxxx
- How does status windows update?
- Prev by Date: Serial communication problems
- Next by Date: Re: Serial communication problems
- Previous by thread: Re: How does status windows update?
- Next by thread: Can not send message to remote transaction queue.
- Index(es):
Relevant Pages
|