利用双缓冲可以避免绘图时图像的闪烁,但是当改变窗体或控件的大小时,依然会有严重的闪烁现象。
可以响应窗口消息WM_ERASEBKGND,重载OnEraseBkgnd(CDC* pDC)直接返回TRUE,来有效避免闪烁。
BOOL ClassName::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default
return TRUE;
//return CDialog::OnEraseBkgnd(pDC);
}
{
// TODO: Add your message handler code here and/or call default
return TRUE;
//return CDialog::OnEraseBkgnd(pDC);
}

1577

被折叠的 条评论
为什么被折叠?



