如何把DC的内容保存为cbitmap
1个回答
展开全部
Width为位图的宽 Height为位图的高
CBitmap bmp;
bmp.CreateCompatibleBitmap(DC,Width,Height);
CDC MemDC;
MemDC.CreateCompatibleDC(&DC);
CBitmap *oldbitmap=MemDC.SelectObject(&bmp);
MemDC.BitBlt(0,0,Width,Height,&DC,,0,0,SRCCOPY);
MemDC.SelectObject(oldbitmap);
MemDC.DeleteDC();
CBitmap bmp;
bmp.CreateCompatibleBitmap(DC,Width,Height);
CDC MemDC;
MemDC.CreateCompatibleDC(&DC);
CBitmap *oldbitmap=MemDC.SelectObject(&bmp);
MemDC.BitBlt(0,0,Width,Height,&DC,,0,0,SRCCOPY);
MemDC.SelectObject(oldbitmap);
MemDC.DeleteDC();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询