Can you describe how to use double-buffering to draw the scene to an off
out. This is most likely implemented using GDI+ and altering the
transparency factor. But there is not flicker. Do they use double-buffering
Quote:
"Rohit" <Rohit@discussions.microsoft.comwrote in message
news:64BF9304-CF68-4C21-AE2D-7C7AD9BADD73@microsoft.com...
Thanks. That worked.
Now the problem is that there is too much flickering. Is there a way to
avoid that, or do I have to recode it in DirectX?
>
>
You could invalidate only regions of the window that need redrawing...that
will reduce flicker.
>
Using a transparent background and doing all foreground drawing helps a lot.
>
You could use an offscreen buffer (double-buffering) to draw to and blt the
entire buffer to the screen when necessary.
>
DirectX is certainly a solution, but a different approach than GDI.
>
I personally do a lot of multimedia rendering, and find double buffering
works great for me, both with GDI/GDI+ and WPF.
>
Mark
>
--
Mark Salsbery
Microsoft MVP - Visual C++
>
>
"Mark Salsbery [MVP]" wrote:
"Rohit" <Rohit@discussions.microsoft.comwrote in message
news:7F8392D8-7DCA-44BA-9055-0C6FF44701C3@microsoft.com...
I have a timer object that calls UpdateWindow(). The WM_TIMER message
is
processed in the main Win32 message loop for the window. However, when
I
run
the app, the image doesn't get updated (there is some animation that's
supposed to happen). However, if I constantly resize the window, the
animation happens as expected (but I want the animation to happen
without
me
having to mess with the window size). I verified that the timer is
firing
correctly. What is the problem?
>
Before updating the window, you also need to invalidate all or a portion
of
the window.
>
See InvalidateRect(), etc.
>
Mark
>
--
Mark Salsbery
Microsoft MVP - Visual C++
>
>
>