Quantcast
Channel: C++博客-所有随笔
Viewing all articles
Browse latest Browse all 7882

从Graphics 中获取Bitmap图像

$
0
0
CDC dcTmp;
HDC hDc= graph.GetHDC(); /// <会被加锁>
dcTmp.Attach(hDc);
CBitmap *pBmp = dcTmp.GetCurrentBitmap();
HBITMAP hBITMAP = (HBITMAP)pBmp->GetSafeHandle();
Bitmap bitmap(hBITMAP, 0);
dcTmp.Detach(); /// <释放>
graph.ReleaseHDC(hDc); /// <解锁>


chenjt3533 2014-09-12 16:36 发表评论

Viewing all articles
Browse latest Browse all 7882

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>