标签:
CDC dcMemory;
dcMemory.CreateCompatibleDC(&dc);
CBitmap bmp;
bmp.CreateCompatibleBitmap(&dc,1024,768);
dcMemory.SelectObject(&bmp);
Graphics _Graphics(dcMemory.m_hDC);
_Graphics.DrawImage(_pImage,0,0,1024,768);
//这是在GDI+中的写法。
dc.BitBlt(0,0,1024,768,&dcMemory,0,0,SRCCOPY);
_Graphics.ReleaseHDC(dcMemory.m_hDC);
dcMemory.DeleteDC();
bmp.DeleteObject();
注意:
OnEraseBkgnd(CDC* pDC)需要返回TRUE。
GDI+中双缓冲的基本写法
标签:
原文地址:http://www.cnblogs.com/dgx/p/5491537.html