[vtkusers] RE: Window Flickers

Jean-Dominique Barnichon jeando.barnichon at free.fr
Mon Jun 23 03:14:36 EDT 2003


Hi Amit,

Under MFC, you must modify the OnEraseBkgnd() method in order to avoid
flickering on resize.
You turn off Windows from clearing the background, which is simply done by
editing the OnEraseBkgnd() member function of your view class and by
returning true from this function.

Cheers,
Jean-Do

BOOL CYourView::OnEraseBkgnd(CDC* pDC)
{
    // TODO: Add your message handler code here and/or call default
    //comment out the original call
    //return CView::OnEraseBkgnd(pDC);
    //Tell Windows not to erase the background
    return TRUE;
}





More information about the vtkusers mailing list