|| | |||Browse by category|
We have embedded a grid window into a CView. Whenever the view is drawn, the grid window gets erased and we get a lot of flickering. What can we do?
The problem is that the view will erase the grid in its OnEraseBkgnd() message. You should process this message and also override the OnPaint() message.
|BOOL CWndView::OnEraseBkgnd(CDC* pDC)
|CPaintDC dc(this); // device context for painting
// Erase everything but not the grid
Also take a look at the other article "Decreasing update flicker"