| | | | Browse by category |
Article ID: 312
Last updated: 11 Jun, 2018
Problem
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?
Cause
Action
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.
Example:
BOOL CWndView::OnEraseBkgnd(CDC* pDC) { |
||
return FALSE; | ||
}
void CWndView::OnPaint() |
||
CPaintDC dc(this); // device context for painting
// Erase everything but not the grid |
||
} |
Also take a look at the other article "Decreasing update flicker"
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 312
Last updated: 11 Jun, 2018
Revision: 3
Views: 2159
Posted: 24 Jan, 2001 by
Meltreger B.
Updated: 11 Jun, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)