Avoiding flickering in mfc views.

Avoiding flickering in mfc views.

Post by Tim Boesck » Sun, 07 Nov 1999 04:00:00



I made a small application using the MSVC 5 app builder (single view) and
MFC.
Basically my application does only blit a bitmap to the view using bitblt.
When the
content of the bitmap is changed I use UpdateAllViews(NULL); to update the
view. So far everything works fine.

However i got one Problem: MFC does always first draw the entire background
of the view white and then call my OnDraw code where I blit the bitmap. This
results in pretty annoying flickering, everytime the view is updated.
How do I avoid this ?

 
 
 

Avoiding flickering in mfc views.

Post by Chris Marriot » Tue, 09 Nov 1999 04:00:00



>I made a small application using the MSVC 5 app builder (single view) and
>MFC.
>Basically my application does only blit a bitmap to the view using bitblt.
>When the
>content of the bitmap is changed I use UpdateAllViews(NULL); to update the
>view. So far everything works fine.

>However i got one Problem: MFC does always first draw the entire background
>of the view white and then call my OnDraw code where I blit the bitmap.
This
>results in pretty annoying flickering, everytime the view is updated.
>How do I avoid this ?

Process the "WM_ERASEBKGND" message and do nothing in response to it. That
will avoid the white "flash" as the window is updated.

Chris
-----------------------------------------------------------------------

Visit our web site at http://www.skymap.com
Astronomy software written by astronomers, for astronomers

 
 
 

1. Flicker-Flicker-Flicker (Netscape and MS IEx)


Not sure if this is the same problem, but this is a solution direct
from MS:

If your screen is flashing when downloading files/pages on IE 3 B2,
there are 2 solutions:

1) Remove and reinstall until it quits (In rare cases, it may take
multiple uninstalls)

2) Delete the registry key:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar

NOTE: Please exercise caution when taking the registry modification
method.

--   FaveSave - Save Internet Explorer "Favorites" quickly   --
--    and easily from within any application in Windows 95   --
--     http://dialspace.dial.pipex.com/nmercier/index.htm    --

2. HTML Printer driver and NT?

3. How to avoid user name/password popup with authentication plug-ins

4. Apache installation stops Frontpage from publishing webs

5. Avoiding flicker while resizing .....

6. Login Script does not run

7. To Avoid Flickering On A DBGrid/FlexGrid Control In A Dialog

8. ERROR: Drive may be invalid or unreadable

9. Converting OWL doc/view to MFC doc/view

10. MFC Document/View question - SDI with multiple views

11. Avoid others to view my personal PST files

12. Flicker Problem .. No MFC

13. Announce: PluginMaker for Navigator plug-ins using MFC and Visual C++ 4