Eric Johnson
2007-09-17 17:43:04 UTC
Hi,
I have an audio processing "plugin" dll that works with several
different host applications. I'm seeing a problem when the plugin dll
is used with one particular host application.
Our plugin app creates its own window and needs to redraw certain
rects within this window at a regular interval. We create a timer to
trigger this animation cycle. When the timer callback is called we
use invalidateRect to invalidate the individual rects that need to be
drawn. Usually, by the time that we see a WM_PAINT message, these
small rects have been combined by Windows into a smaller set of update
rects. For example if we invalidate 8 small rects during the
animation, we'll see 2 WM_PAINT messages generated. Sometimes though,
we see a bunch of WM_PAINT messages with all of the individual small
rects needing to be redrawn. Handling all of the these WM_PAINT
messages results in worse performance for our app. Can anyone explain
what would cause the update rect to be calculated differently in some
situations than others?
Thanks,
Eric
I have an audio processing "plugin" dll that works with several
different host applications. I'm seeing a problem when the plugin dll
is used with one particular host application.
Our plugin app creates its own window and needs to redraw certain
rects within this window at a regular interval. We create a timer to
trigger this animation cycle. When the timer callback is called we
use invalidateRect to invalidate the individual rects that need to be
drawn. Usually, by the time that we see a WM_PAINT message, these
small rects have been combined by Windows into a smaller set of update
rects. For example if we invalidate 8 small rects during the
animation, we'll see 2 WM_PAINT messages generated. Sometimes though,
we see a bunch of WM_PAINT messages with all of the individual small
rects needing to be redrawn. Handling all of the these WM_PAINT
messages results in worse performance for our app. Can anyone explain
what would cause the update rect to be calculated differently in some
situations than others?
Thanks,
Eric