GDI+使用双缓冲后,在ontimer中调用invalidate,依然闪屏,怎么办?
以下是ondraw中的代码
CRect rect;
this->GetClientRect(rect);
Bitmap m_bitmap(rect.Width(),rect.Height());
Graphics graphics(&m_bitmap);
Graphics g(pDC->m_hDC);
Image image_luxian(_T("luxian.png"));
graphics.DrawImage(&image_luxian, 0,0,image_luxian.GetWidth(), image_luxian.GetHeight());
Image image_feiji(_T("feiji.png"));
graphics.DrawImage(&image_feiji,(int)feiji_x,(int)feiji_y,image_feiji.GetWidth(), image_feiji.GetHeight());
g.DrawImage(&m_bitmap,0,0);
ReleaseDC(pDC);